I am using Node-red for automations, and I have created a flow to raise and lower IKEA tredansen blinds (Zigbee, battery powered) at particular times each day.
Here’s what that flow looks like now:
[{"id":"d91d913e1b6097d2","type":"eztimer","z":"90716742c11a46f4","name":"","debug":true,"autoname":"07:00:00","tag":"eztimer","topic":"","suspended":false,"sendEventsOnSuspend":false,"latLongSource":"manual","latLongHaZone":"zone.home","lat":"35.879590","lon":"-78.686420","timerType":"2","startupMessage":false,"ontype":"2","ontimesun":"dawn","ontimetod":"07:00:00","onpropertytype":"msg","onproperty":"payload","onvaluetype":"num","onvalue":1,"onoffset":0,"onrandomoffset":0,"onsuppressrepeats":false,"offtype":"1","offtimesun":"dusk","offtimetod":"dusk","offduration":"00:01:00","offpropertytype":"msg","offproperty":"payload","offvaluetype":"num","offvalue":0,"offoffset":0,"offrandomoffset":0,"offsuppressrepeats":false,"resend":false,"resendInterval":"0s","mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"sun":true,"x":80,"y":180,"wires":[["f70947dfd5581c5e"]]},{"id":"f70947dfd5581c5e","type":"api-call-service","z":"90716742c11a46f4","name":"Set blinds to half-open","server":"3b8950bc.ddba3","version":7,"debugenabled":false,"action":"cover.set_cover_position","floorId":[],"areaId":[],"deviceId":["3cb7d7d1e094ef6c08938c25f90884ce","2fde9ef9c0464eac4b06a427610dc3bb"],"entityId":[],"labelId":[],"data":"{\"position\":47}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[{"property":"position","propertyType":"msg","value":"100","valueType":"num"}],"queue":"none","blockInputOverrides":true,"domain":"cover","service":"set_cover_position","x":300,"y":180,"wires":[[]]},{"id":"3b8950bc.ddba3","type":"server","name":"Home Assistant","addon":true}]
I am running into a bug that I’m not sure how to solve; I’m fairly new to node-red, and this wasn’t an issue when I was doing automations directly in HA.
When the blinds have been inactive for several hours, I suppose they must go into some kind of low-power state; when the node-red automation triggers, it yields a “No connection” error on the action node.
However, if I run the automation again shortly after the failure, it works perfectly. I’ve been testing this with inject nodes to manually trigger the automation.
Has anyone ever run into a similar problem? Are there common ways to retry a node if the “No connection” error is thrown? Ideally I could wait a second or two and then retry it.