I am new to Node Red and tried a very simple automation: turn on landscape lights at sunset, and off at 10:30pm, using BigTimer. This was failing for me, and I figured out a simple workaround. I am posting here to help others who might run into the same problem.
Whichever branch of the switch should be active, the node turning the lights on or off fails with “No Connection”. The log shows this: “[error] [api-call-service:Turn On Landscape] Call-Service attempted without connection to server.” as the problem. Based on other posts here I thought this might be related to firewall or problems with docker containers communicating and went down a rabbit hole, but the cause is a lot simpler than that.
I had the BigTimer “Output at startup” checkbox selected so that the lights are in the right state after I deploy, or restart, or a power failure, or whatever. But Node Red doesn’t wait to execute the BigTimer output until everything is set up. So the output of BigTimer gets to the Call Service node before it is ready, The solution is to insert a delay like this:
The default 5 seconds seems to do the trick.
Seems like a bug to me but with an easy workaround. More experienced folks: is this actually a bug or would some useful bit of Node Red be gone if flows waited for all the nodes to be set up before kicking off? If it is a bug, where would I submit an issue?