Ruddog

Node_Red_Flow_WashingMachine

Mar 30th, 2021 (edited)
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [{"id":"2c2e5e4b.778812","type":"tab","label":"Trigger Node (Timer)","disabled":false,"info":""},{"id":"bf1a91fc.b997d","type":"server-state-changed","z":"2c2e5e4b.778812","name":"","server":"","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":170,"y":180,"wires":[["f6ebeb8.f70a118"]]},{"id":"f6ebeb8.f70a118","type":"switch","z":"2c2e5e4b.778812","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lt","v":"1","vt":"str"},{"t":"gte","v":"1","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":180,"wires":[["838cb00d.8c5a"],["3faf7f64.c4884"]]},{"id":"838cb00d.8c5a","type":"change","z":"2c2e5e4b.778812","name":"set payload to off","rules":[{"t":"set","p":"payload","pt":"msg","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":160,"wires":[["3c7c742d.1c6f3c"]]},{"id":"3faf7f64.c4884","type":"change","z":"2c2e5e4b.778812","name":"set payload to on","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":710,"y":200,"wires":[["3c7c742d.1c6f3c"]]},{"id":"3c7c742d.1c6f3c","type":"trigger","z":"2c2e5e4b.778812","name":"","op1":"","op2":"0","op1type":"nul","op2type":"str","duration":"60","extend":false,"overrideDelay":false,"units":"s","reset":"on","bytopic":"all","topic":"topic","outputs":1,"x":1030,"y":180,"wires":[["1bf0e55b.ea901b"]]},{"id":"8ea50640.6d1098","type":"inject","z":"2c2e5e4b.778812","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"str","x":210,"y":40,"wires":[["f6ebeb8.f70a118"]]},{"id":"bdca6c76.6c64b","type":"inject","z":"2c2e5e4b.778812","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"str","x":190,"y":400,"wires":[["f6ebeb8.f70a118"]]},{"id":"1bf0e55b.ea901b","type":"debug","z":"2c2e5e4b.778812","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1270,"y":180,"wires":[]},{"id":"8bc65181.f4b","type":"comment","z":"2c2e5e4b.778812","name":"Input from current sensor","info":"","x":150,"y":140,"wires":[]},{"id":"c55b312e.62fc8","type":"comment","z":"2c2e5e4b.778812","name":"switch node to set limit","info":"","x":460,"y":120,"wires":[]},{"id":"114b24f5.3cfd7b","type":"comment","z":"2c2e5e4b.778812","name":"change the message.payload to \"on\" or \"off\"","info":"","x":710,"y":240,"wires":[]},{"id":"9ae9ce10.09411","type":"comment","z":"2c2e5e4b.778812","name":"set the time delay in this node","info":"Look at the properties in this node. it is set to \"Send Nothing\" at first, we only want to know when it's timer expires. The timer doesn't start until it sees a message.payload of \"off\". As soon as it sees that payload it starts the timer (blue box will show up under the node). If the trigger node sees a message.payload of \"on\" again, it'll stop and reset the timer. Once the timer expires it'll send a payload of 0. Hook that to any type of output node (callservice, MQTT out, Email, etc) and you have it.","x":1000,"y":140,"wires":[]}]
Add Comment
Please, Sign In to add comment