Daily Schedule with Gate Control

[{"id":"ce75c26918b78527","type":"gate","z":"c83d72886d5b02c0","name":"","controlTopic":"control","defaultState":"closed","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"default","x":960,"y":310,"wires":[[]]},{"id":"0878e020e1a53ff7","type":"inject","z":"c83d72886d5b02c0","name":"Open Gate","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"open","payloadType":"str","x":750,"y":360,"wires":[["ce75c26918b78527"]]},{"id":"f1ac77770884333f","type":"inject","z":"c83d72886d5b02c0","name":"Close Gate","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"control","payload":"close","payloadType":"str","x":750,"y":260,"wires":[["ce75c26918b78527"]]},{"id":"b175219513ad65b0","type":"trigger","z":"c83d72886d5b02c0","name":"Open, Wait and Close","op1":"open","op2":"close","op1type":"str","op2type":"str","duration":"5","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":710,"y":310,"wires":[["ce75c26918b78527"]]},{"id":"bb40b54e5b5cfbb0","type":"change","z":"c83d72886d5b02c0","name":"Gate Control","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"open","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":310,"wires":[["b175219513ad65b0"]]},{"id":"ac710bce85890ac2","type":"cronplus","z":"c83d72886d5b02c0","name":"@ 07:15","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"schedule1","topic":"schedule1","payloadType":"str","payload":"open","expressionType":"cron","expression":"0 15 7 * * * *","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":350,"y":310,"wires":[["bb40b54e5b5cfbb0"]]},{"id":"dc4b6debfedd4f51","type":"inject","z":"c83d72886d5b02c0","name":"Start Schedule","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"start","payload":"schedule1","payloadType":"str","x":140,"y":270,"wires":[["ac710bce85890ac2"]]},{"id":"77049032345f5f2d","type":"inject","z":"c83d72886d5b02c0","name":"Stop Schedule","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"stop","payload":"schedule1","payloadType":"str","x":140,"y":310,"wires":[["ac710bce85890ac2"]]},{"id":"9825e01365ec99a0","type":"inject","z":"c83d72886d5b02c0","name":"Manual Trigger","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"trigger","payload":"schedule1","payloadType":"str","x":140,"y":350,"wires":[["ac710bce85890ac2"]]}]

contrib nodes used.

node-red-contrib-simple-gate 0.5.2

node-red-contrib-cron-plus 1.5.5

1 Like

Hi. Thanks for sharing. It would be useful to list out the contrib nodes used.

1 Like

Thanks a lot for the tip. This was my first attempt. will keep that in mind. Have edited this post.