Help with Node-Red Flow

I can't get the flow pictured below to work. The idea is to have the outside lights to come on when the door is opened, but only in the time frame between dusk and dawn. The timer is eztimer.

Thanks

You can modify this for your use:

Summary
[{"id":"9e5a0452.64983","type":"hubitat device","z":"89b93bba.c8fe","name":"Contact - Front Door","server":"a22e0ea9.276dc8","deviceId":"387","attribute":"contact","sendEvent":true,"x":180,"y":360,"wires":[["d472ec.9392f518"]]},{"id":"d472ec.9392f518","type":"switch","z":"89b93bba.c8fe","name":"open only","property":"payload.value","propertyType":"msg","rules":[{"t":"cont","v":"open","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":420,"y":360,"wires":[["89ec8e72.cab548"]]},{"id":"89ec8e72.cab548","type":"time-range-switch","z":"89b93bba.c8fe","name":"Sunset-Sunrise","lat":"29.977091","lon":"-90.143000","startTime":"sunsetStart","endTime":"sunrise","startOffset":"-60","endOffset":"30","x":600,"y":400,"wires":[["cb26fc73.741378"],[]]},{"id":"759d127a.0551fc","type":"switch","z":"89b93bba.c8fe","name":"unlocked/locked","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"unlocked","vt":"str"},{"t":"eq","v":"locked","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":389.2857131958008,"y":444.2857151031494,"wires":[["89ec8e72.cab548"],["13234bc7.54074c"]]},{"id":"cb26fc73.741378","type":"change","z":"89b93bba.c8fe","name":"LVL 100","rules":[{"t":"set","p":"payload","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":400,"wires":[["ae6ddfc.508b3a"]]},{"id":"7e4052ba.e752b4","type":"hubitat device","z":"89b93bba.c8fe","name":"Front Door Lock","server":"a22e0ea9.276dc8","deviceId":"1219","attribute":"lock","sendEvent":true,"x":159.28571319580078,"y":444.2857151031494,"wires":[["759d127a.0551fc"]]},{"id":"13234bc7.54074c","type":"hubitat device","z":"89b93bba.c8fe","name":"Contact - Front Door","server":"a22e0ea9.276dc8","deviceId":"387","attribute":"contact","sendEvent":false,"x":340,"y":500,"wires":[["f905cb87.4deb98"]]},{"id":"ae6ddfc.508b3a","type":"lutron-control","z":"89b93bba.c8fe","confignode":"a09cd867.559bd8","name":"Porch","x":970,"y":451,"wires":[]},{"id":"f905cb87.4deb98","type":"switch","z":"89b93bba.c8fe","name":"closed","property":"payload.value","propertyType":"msg","rules":[{"t":"cont","v":"closed","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":550,"y":500,"wires":[["e384c2c1.828d2"]]},{"id":"304d3bde.ed5f04","type":"change","z":"89b93bba.c8fe","name":"LVL 0","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":830,"y":500,"wires":[["ae6ddfc.508b3a"]]},{"id":"e384c2c1.828d2","type":"delay","z":"89b93bba.c8fe","name":"5 mins","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":690,"y":500,"wires":[["304d3bde.ed5f04"]]},{"id":"a22e0ea9.276dc8","type":"hubitat config","name":"HubitatM","usetls":false,"host":"192.168.1.46","port":"80","appId":"1522","nodeRedServer":"http://192.168.1.4:1880","webhookPath":"/hubitat/webhook","autoRefresh":true,"useWebsocket":false},{"id":"a09cd867.559bd8","type":"lutron-config","name":"Caseta Pro","ipaddress":"192.168.1.32","deviceMap":{"Kitchen Wall":"2","Kitchen Tube":"3","Hallway Down Pico":"5","Bar":"7","Fireplace":"8","Dining":"9","Dining Pico":"10","Bar Pico":"11","Guest Bedroom":"12","Guest Bedroom Pico":"13","Kitchen Pico":"14","Catroom":"15","Catroom PIco":"16","Bedroom":"17","Bedroom PIco":"18","Hallway Up Pico":"6","ALL":"0","Porch":"4","Hallway":"21","LR Audio Pico":"19","Bedroom Audio Pico":"20","Upstairs Patio":"22","Downstairs Patio":"23"},"timeout":"5000"}]
1 Like

Thanks. I'll give it a try.

There are two time-range "switch" nodes that would be useful for your needs (time dependent conditional action). I've used node-red-contrib-time-range-switch. The other is "node-red-contrib-time-switch".

1 Like

Thanks

I use eztimer to trigger scheduled events - it is much simpler than BigTimer and has more capability than the Inject node. You can specify "on" and "off" events by specific time or sun events (sunrise, sunset etc.) and also specify offsets from the event (+ or -). You can also specify the payload values for both events.

Thanks

Download the Hubitat app