Hello,
I am trying to control the simple-gate-node using change nodes.
I'm new to Node-Red and really dont know what to do.
Can someone explain to me how this works?
Kind regards,
Max
Hello,
I am trying to control the simple-gate-node using change nodes.
I'm new to Node-Red and really dont know what to do.
Can someone explain to me how this works?
Kind regards,
Max
Max what is it you like to do,
post your flow I don't know what you have, know and or did try
You need to set the the msg.topic to 'control', give me a minute and I'll let you have an example flow.
Does this example help you -
[{"id":"c545c385.8182a","type":"inject","z":"b3b413d1.05b1b","name":"input","topic":"","payload":"","payloadType":"date","repeat":"3","crontab":"","once":false,"onceDelay":0.1,"x":145,"y":1415,"wires":[["c94df585.e57e28"]]},{"id":"c714207b.a377a","type":"inject","z":"b3b413d1.05b1b","name":"open","topic":"","payload":"open","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":145,"y":1455,"wires":[["5740aa2c.4674e4"]]},{"id":"7d10beff.05a77","type":"inject","z":"b3b413d1.05b1b","name":"close","topic":"","payload":"close","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":145,"y":1495,"wires":[["5740aa2c.4674e4"]]},{"id":"7eed6b8a.5462b4","type":"inject","z":"b3b413d1.05b1b","name":"toggle","topic":"control","payload":"toggle","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":145,"y":1535,"wires":[["5740aa2c.4674e4"]]},{"id":"c94df585.e57e28","type":"gate","z":"b3b413d1.05b1b","name":"","controlTopic":"control","defaultState":"open","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","persist":false,"x":490,"y":1500,"wires":[["2f2dd7bd.48d128"]]},{"id":"5740aa2c.4674e4","type":"change","z":"b3b413d1.05b1b","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":330,"y":1530,"wires":[["c94df585.e57e28"]]},{"id":"2f2dd7bd.48d128","type":"debug","z":"b3b413d1.05b1b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":635,"y":1500,"wires":[]}]
Almost everything you need to know about using the node is shown in the examples provided when you install it. From the Import item in the "hamburger" menu, select Examples and import the gate-demo
flow.
That flow and the one posted by @Paul-Reed should help solve your problem.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.