I have a very simple flow with the Toggle Node and since I'm quite new to Node Red I'm confused as to where I should go to add a Reset input onto it. At this point I know almost nothing about Java Script and I haven't been able to find another node that will do what I'm looking for. Please find attached a screen shot of this simple flow.
what do you want to happen when you hit reset ?
from the built in examples of node-red-contrib-toggle node
[{"id":"367a74a2.19cbdc","type":"debug","z":"70c85b46b7f69ea5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"msg","x":870,"y":2660,"wires":[]},{"id":"36113b47.3526fc","type":"inject","z":"70c85b46b7f69ea5","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"onofftopic","payload":"switchON","payloadType":"str","x":400,"y":2660,"wires":[["aa5f35ad.c3b45","16ce4ed9.45a261"]]},{"id":"7f53c1b9.00898","type":"inject","z":"70c85b46b7f69ea5","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"toggletopic","payload":"toggleSTATE","payloadType":"str","x":410,"y":2740,"wires":[["aa5f35ad.c3b45","16ce4ed9.45a261"]]},{"id":"63bb75b9.729424","type":"inject","z":"70c85b46b7f69ea5","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"onofftopic","payload":"switchOFF","payloadType":"str","x":400,"y":2700,"wires":[["aa5f35ad.c3b45","16ce4ed9.45a261"]]},{"id":"aa5f35ad.c3b45","type":"toggle","z":"70c85b46b7f69ea5","name":"","onOffTopic":"onofftopic","onValue":"switchON","onType":"str","offValue":"switchOFF","offType":"str","toggleTopic":"toggletopic","toggleValue":"toggleSTATE","toggleType":"str","passOnOff":"always","x":700,"y":2660,"wires":[["367a74a2.19cbdc"]]},{"id":"6196024d.fe063c","type":"comment","z":"70c85b46b7f69ea5","name":"Usage with topic","info":"","x":370,"y":2600,"wires":[]},{"id":"16ce4ed9.45a261","type":"debug","z":"70c85b46b7f69ea5","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":690,"y":2740,"wires":[]}]
Quite simple when I hit a ui button elsewhere in the flow I want the toggle node to go to a Boolean False. I will have 8 of the blocks you saw in the previous post with 8 ui buttons which will toggle between true and false every time they are clicked on and then 1 button that resets everything to false. ie. turn all 8 off.
Thanks
the flow i attached should do the job. let me know
[{"id":"aa5f35ad.c3b45","type":"toggle","z":"70c85b46b7f69ea5","name":"","onOffTopic":"onofftopic","onValue":"true","onType":"bool","offValue":"false","offType":"bool","toggleTopic":"toggletopic","toggleValue":"toggleSTATE","toggleType":"str","passOnOff":"always","x":650,"y":2920,"wires":[["2a154d87b0ece1e7"]]},{"id":"2a154d87b0ece1e7","type":"ui_led","z":"70c85b46b7f69ea5","order":0,"group":"a605595c.ac6378","width":"2","height":"2","label":"","labelPlacement":"right","labelAlignment":"center","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":790,"y":2920,"wires":[]},{"id":"fa54c3d6614afff2","type":"ui_button","z":"70c85b46b7f69ea5","name":"","group":"a605595c.ac6378","order":1,"width":"2","height":"3","passthru":false,"label":"Reset","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"false","payloadType":"bool","topic":"onofftopic","topicType":"str","x":470,"y":2880,"wires":[["aa5f35ad.c3b45","5977fca1304dbc2e","daca623c16367bcd","5c92e01b1044955d","66a2242b42e53521"]]},{"id":"bbc5720829140eef","type":"ui_button","z":"70c85b46b7f69ea5","name":"","group":"a605595c.ac6378","order":1,"width":"2","height":"1","passthru":false,"label":"ON/OFF-1","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"toggleSTATE","payloadType":"str","topic":"toggletopic","topicType":"str","x":490,"y":2920,"wires":[["aa5f35ad.c3b45"]]},{"id":"5977fca1304dbc2e","type":"toggle","z":"70c85b46b7f69ea5","name":"","onOffTopic":"onofftopic","onValue":"true","onType":"bool","offValue":"false","offType":"bool","toggleTopic":"toggletopic","toggleValue":"toggleSTATE","toggleType":"str","passOnOff":"always","x":650,"y":2960,"wires":[["cb6ee1d5d0b446f1"]]},{"id":"cb6ee1d5d0b446f1","type":"ui_led","z":"70c85b46b7f69ea5","order":0,"group":"a605595c.ac6378","width":"2","height":"2","label":"","labelPlacement":"right","labelAlignment":"center","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":790,"y":2960,"wires":[]},{"id":"51570509926a03e6","type":"ui_button","z":"70c85b46b7f69ea5","name":"","group":"a605595c.ac6378","order":1,"width":"2","height":"1","passthru":false,"label":"ON/OFF-2","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"toggleSTATE","payloadType":"str","topic":"toggletopic","topicType":"str","x":490,"y":2960,"wires":[["5977fca1304dbc2e"]]},{"id":"daca623c16367bcd","type":"toggle","z":"70c85b46b7f69ea5","name":"","onOffTopic":"onofftopic","onValue":"true","onType":"bool","offValue":"false","offType":"bool","toggleTopic":"toggletopic","toggleValue":"toggleSTATE","toggleType":"str","passOnOff":"always","x":650,"y":3000,"wires":[["6e8b50e5062b7f0c"]]},{"id":"6e8b50e5062b7f0c","type":"ui_led","z":"70c85b46b7f69ea5","order":0,"group":"a605595c.ac6378","width":"2","height":"2","label":"","labelPlacement":"right","labelAlignment":"center","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":790,"y":3000,"wires":[]},{"id":"8e99761033ff4b99","type":"ui_button","z":"70c85b46b7f69ea5","name":"","group":"a605595c.ac6378","order":1,"width":"2","height":"1","passthru":false,"label":"ON/OFF-3","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"toggleSTATE","payloadType":"str","topic":"toggletopic","topicType":"str","x":490,"y":3000,"wires":[["daca623c16367bcd"]]},{"id":"5c92e01b1044955d","type":"toggle","z":"70c85b46b7f69ea5","name":"","onOffTopic":"onofftopic","onValue":"true","onType":"bool","offValue":"false","offType":"bool","toggleTopic":"toggletopic","toggleValue":"toggleSTATE","toggleType":"str","passOnOff":"always","x":650,"y":3040,"wires":[["93ec843235ed2d1f"]]},{"id":"93ec843235ed2d1f","type":"ui_led","z":"70c85b46b7f69ea5","order":0,"group":"a605595c.ac6378","width":"2","height":"2","label":"","labelPlacement":"right","labelAlignment":"center","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":790,"y":3040,"wires":[]},{"id":"8d185f86e48790cb","type":"ui_button","z":"70c85b46b7f69ea5","name":"","group":"a605595c.ac6378","order":1,"width":"2","height":"1","passthru":false,"label":"ON/OFF-4","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"toggleSTATE","payloadType":"str","topic":"toggletopic","topicType":"str","x":490,"y":3040,"wires":[["5c92e01b1044955d"]]},{"id":"66a2242b42e53521","type":"toggle","z":"70c85b46b7f69ea5","name":"","onOffTopic":"onofftopic","onValue":"true","onType":"bool","offValue":"false","offType":"bool","toggleTopic":"toggletopic","toggleValue":"toggleSTATE","toggleType":"str","passOnOff":"always","x":650,"y":3080,"wires":[["b6450537072287b1"]]},{"id":"b6450537072287b1","type":"ui_led","z":"70c85b46b7f69ea5","order":0,"group":"a605595c.ac6378","width":"2","height":"2","label":"","labelPlacement":"right","labelAlignment":"center","colorForValue":[{"color":"#ff0000","value":"false","valueType":"bool"},{"color":"#008000","value":"true","valueType":"bool"}],"allowColorForValueInMessage":false,"shape":"circle","showGlow":true,"name":"","x":790,"y":3080,"wires":[]},{"id":"e1373a084f25d163","type":"ui_button","z":"70c85b46b7f69ea5","name":"","group":"a605595c.ac6378","order":1,"width":"2","height":"1","passthru":false,"label":"ON/OFF-5","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"toggleSTATE","payloadType":"str","topic":"toggletopic","topicType":"str","x":490,"y":3080,"wires":[["66a2242b42e53521"]]},{"id":"a605595c.ac6378","type":"ui_group","name":"Default","tab":"78387f0f.22098","order":1,"disp":true,"width":"12","collapse":false,"className":""},{"id":"78387f0f.22098","type":"ui_tab","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
Yes it does work exactly like I want. Thanks
Now I'm trying to add a button that turns them all on and I've had no luck. I don't really understand what's going on with this flow you sent me. I don't get the idea of topics and all the other choices in a "msg" box. I'm pretty sure I got payloads but other than that I'm pretty confused.
Duplicate the 'reset' button and replace the payload from boolean false to boolean true.
try it out, and reply if you dont get it, i will post the solution.
in the toggle node
you are declaring what 'payload' you will be sending (ON value ,OFF Value and Toggle Value) under what 'topics' to control it.
so the topic to turn ON or OFF is 'onofftopic' and the payload is boolean true
for ON and boolean false
for OFF. this can be set to anything you like.
and the topic to 'toggle' the status is 'toggletopic' and the payload is toggleSTATE. this can also be set to anything you like.
Here's what I came up with but I'm sure you'd have a better way to do it.
[
{
"id": "24ac9cf336fcf334",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "1b7a58ed8cc592b6",
"type": "arduino-board",
"device": "/dev/ttyUSB0"
},
{
"id": "56dac134f05e9fae",
"type": "serial-port",
"name": "ARD-57600-USB0",
"serialport": "/dev/ttyUSB0",
"serialbaud": "57600",
"databits": 8,
"parity": "none",
"stopbits": 1,
"waitfor": "",
"dtr": "none",
"rts": "none",
"cts": "none",
"dsr": "none",
"newline": "\\n",
"bin": "false",
"out": "char",
"addchar": "",
"responsetimeout": 10000
},
{
"id": "aae86d7a6a09f458",
"type": "ui_tab",
"name": "MyFlow",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
},
{
"id": "03eabb95d5aa08dc",
"type": "ui_group",
"name": "MyGroup",
"tab": "aae86d7a6a09f458",
"order": 1,
"disp": true,
"width": 8,
"collapse": false,
"className": ""
},
{
"id": "736c4d540002767d",
"type": "ui_spacer",
"z": "24ac9cf336fcf334",
"name": "spacer",
"group": "03eabb95d5aa08dc",
"order": 17,
"width": 8,
"height": 1
},
{
"id": "72d3ea7a5a9f85d3",
"type": "ui_base",
"theme": {
"name": "theme-light",
"lightTheme": {
"default": "#0094CE",
"baseColor": "#0094CE",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": true,
"reset": false
},
"darkTheme": {
"default": "#097479",
"baseColor": "#097479",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": false
},
"customTheme": {
"name": "Untitled Theme 1",
"default": "#4B7930",
"baseColor": "#4B7930",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
},
"themeState": {
"base-color": {
"default": "#0094CE",
"value": "#0094CE",
"edited": false
},
"page-titlebar-backgroundColor": {
"value": "#0094CE",
"edited": false
},
"page-backgroundColor": {
"value": "#fafafa",
"edited": false
},
"page-sidebar-backgroundColor": {
"value": "#ffffff",
"edited": false
},
"group-textColor": {
"value": "#1bbfff",
"edited": false
},
"group-borderColor": {
"value": "#ffffff",
"edited": false
},
"group-backgroundColor": {
"value": "#ffffff",
"edited": false
},
"widget-textColor": {
"value": "#111111",
"edited": false
},
"widget-backgroundColor": {
"value": "#0094ce",
"edited": false
},
"widget-borderColor": {
"value": "#ffffff",
"edited": false
},
"base-font": {
"value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
}
},
"angularTheme": {
"primary": "indigo",
"accents": "blue",
"warn": "red",
"background": "grey",
"palette": "light"
}
},
"site": {
"name": "Node-RED Dashboard",
"hideToolbar": "false",
"allowSwipe": "false",
"lockMenu": "false",
"allowTempTheme": "true",
"dateFormat": "DD/MM/YYYY",
"sizes": {
"sx": 48,
"sy": 48,
"gx": 6,
"gy": 6,
"cx": 6,
"cy": 6,
"px": 0,
"py": 0
}
}
},
{
"id": "fd468a822f2ba36d",
"type": "ui_led",
"z": "24ac9cf336fcf334",
"order": 1,
"group": "03eabb95d5aa08dc",
"width": 2,
"height": 2,
"label": "",
"labelPlacement": "right",
"labelAlignment": "center",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "bool"
},
{
"color": "#ffff00",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "LED-1",
"x": 870,
"y": 420,
"wires": []
},
{
"id": "00e92970fed5b0e1",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 5,
"width": 2,
"height": 1,
"passthru": false,
"label": "BUTTON-1",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "toggleSTATE",
"payloadType": "str",
"topic": "toggletopic",
"topicType": "str",
"x": 250,
"y": 440,
"wires": [
[
"9c55a82bb540948e"
]
]
},
{
"id": "613a1505cb4e704c",
"type": "ui_led",
"z": "24ac9cf336fcf334",
"order": 2,
"group": "03eabb95d5aa08dc",
"width": 2,
"height": 2,
"label": "",
"labelPlacement": "right",
"labelAlignment": "center",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "bool"
},
{
"color": "#ffff00",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "LED-2",
"x": 870,
"y": 520,
"wires": []
},
{
"id": "f37c73b049d17eeb",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 6,
"width": 2,
"height": 1,
"passthru": false,
"label": "BUTTON-2",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "toggleSTATE",
"payloadType": "str",
"topic": "toggletopic",
"topicType": "str",
"x": 250,
"y": 540,
"wires": [
[
"0f5e583f6e963055"
]
]
},
{
"id": "e027e0af31892fcd",
"type": "ui_led",
"z": "24ac9cf336fcf334",
"order": 3,
"group": "03eabb95d5aa08dc",
"width": 2,
"height": 2,
"label": "",
"labelPlacement": "right",
"labelAlignment": "center",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "bool"
},
{
"color": "#ffff00",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "LED-3",
"x": 870,
"y": 620,
"wires": []
},
{
"id": "0ba20c3aded11af1",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 7,
"width": 2,
"height": 1,
"passthru": false,
"label": "BUTTON-3",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "toggleSTATE",
"payloadType": "str",
"topic": "toggletopic",
"topicType": "str",
"x": 250,
"y": 640,
"wires": [
[
"64b8ccf8c7d3238a"
]
]
},
{
"id": "ac7e3417f64d767a",
"type": "ui_led",
"z": "24ac9cf336fcf334",
"order": 4,
"group": "03eabb95d5aa08dc",
"width": 2,
"height": 2,
"label": "",
"labelPlacement": "right",
"labelAlignment": "center",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "bool"
},
{
"color": "#ffff00",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "LED-4",
"x": 870,
"y": 720,
"wires": []
},
{
"id": "723bcb0ec647b90a",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 8,
"width": 2,
"height": 1,
"passthru": false,
"label": "BUTTON-4",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "toggleSTATE",
"payloadType": "str",
"topic": "toggletopic",
"topicType": "str",
"x": 250,
"y": 740,
"wires": [
[
"f262e1a05596496b"
]
]
},
{
"id": "5dced00c18a9e274",
"type": "ui_led",
"z": "24ac9cf336fcf334",
"order": 9,
"group": "03eabb95d5aa08dc",
"width": 2,
"height": 2,
"label": "",
"labelPlacement": "right",
"labelAlignment": "center",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "bool"
},
{
"color": "#ffff00",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "LED-5",
"x": 870,
"y": 820,
"wires": []
},
{
"id": "9a83f1f5574f6758",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 13,
"width": 2,
"height": 1,
"passthru": false,
"label": "BUTTON-5",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "toggleSTATE",
"payloadType": "str",
"topic": "toggletopic",
"topicType": "str",
"x": 250,
"y": 840,
"wires": [
[
"807b937574312f80"
]
]
},
{
"id": "9c55a82bb540948e",
"type": "toggle",
"z": "24ac9cf336fcf334",
"name": "",
"onOffTopic": "onofftopic",
"onValue": "true",
"onType": "bool",
"offValue": "false",
"offType": "bool",
"toggleTopic": "toggletopic",
"toggleValue": "toggleSTATE",
"toggleType": "str",
"passOnOff": "always",
"x": 710,
"y": 440,
"wires": [
[
"fd468a822f2ba36d",
"03baaf91ee5f8334"
]
]
},
{
"id": "0f5e583f6e963055",
"type": "toggle",
"z": "24ac9cf336fcf334",
"name": "",
"onOffTopic": "onofftopic",
"onValue": "true",
"onType": "bool",
"offValue": "false",
"offType": "bool",
"toggleTopic": "toggletopic",
"toggleValue": "toggleSTATE",
"toggleType": "str",
"passOnOff": "always",
"x": 710,
"y": 540,
"wires": [
[
"613a1505cb4e704c",
"584fd5460d341eb7"
]
]
},
{
"id": "64b8ccf8c7d3238a",
"type": "toggle",
"z": "24ac9cf336fcf334",
"name": "",
"onOffTopic": "onofftopic",
"onValue": "true",
"onType": "bool",
"offValue": "false",
"offType": "bool",
"toggleTopic": "toggletopic",
"toggleValue": "toggleSTATE",
"toggleType": "str",
"passOnOff": "always",
"x": 710,
"y": 640,
"wires": [
[
"e027e0af31892fcd",
"4fae9e74c991a312"
]
]
},
{
"id": "f262e1a05596496b",
"type": "toggle",
"z": "24ac9cf336fcf334",
"name": "",
"onOffTopic": "onofftopic",
"onValue": "true",
"onType": "bool",
"offValue": "false",
"offType": "bool",
"toggleTopic": "toggletopic",
"toggleValue": "toggleSTATE",
"toggleType": "str",
"passOnOff": "always",
"x": 710,
"y": 740,
"wires": [
[
"ac7e3417f64d767a",
"3eef4e0e097cab67"
]
]
},
{
"id": "807b937574312f80",
"type": "toggle",
"z": "24ac9cf336fcf334",
"name": "",
"onOffTopic": "onofftopic",
"onValue": "true",
"onType": "bool",
"offValue": "false",
"offType": "bool",
"toggleTopic": "toggletopic",
"toggleValue": "toggleSTATE",
"toggleType": "str",
"passOnOff": "always",
"x": 710,
"y": 840,
"wires": [
[
"5dced00c18a9e274",
"74b04211e8b80f0e"
]
]
},
{
"id": "a45f059e5e68e52d",
"type": "ui_led",
"z": "24ac9cf336fcf334",
"order": 10,
"group": "03eabb95d5aa08dc",
"width": 2,
"height": 2,
"label": "",
"labelPlacement": "right",
"labelAlignment": "center",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "bool"
},
{
"color": "#ffff00",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "LED-6",
"x": 870,
"y": 920,
"wires": []
},
{
"id": "2bdee8807da28df5",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 14,
"width": 2,
"height": 1,
"passthru": false,
"label": "BUTTON-6",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "toggleSTATE",
"payloadType": "str",
"topic": "toggletopic",
"topicType": "str",
"x": 250,
"y": 940,
"wires": [
[
"ab1e65db65b523e1"
]
]
},
{
"id": "ab1e65db65b523e1",
"type": "toggle",
"z": "24ac9cf336fcf334",
"name": "",
"onOffTopic": "onofftopic",
"onValue": "true",
"onType": "bool",
"offValue": "false",
"offType": "bool",
"toggleTopic": "toggletopic",
"toggleValue": "toggleSTATE",
"toggleType": "str",
"passOnOff": "always",
"x": 710,
"y": 940,
"wires": [
[
"a45f059e5e68e52d",
"8cf905cef37f69e4"
]
]
},
{
"id": "33bcd31429ccd189",
"type": "ui_led",
"z": "24ac9cf336fcf334",
"order": 11,
"group": "03eabb95d5aa08dc",
"width": 2,
"height": 2,
"label": "",
"labelPlacement": "right",
"labelAlignment": "center",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "bool"
},
{
"color": "#ffff00",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "LED-7",
"x": 870,
"y": 1020,
"wires": []
},
{
"id": "5fbc7abf395bb7a0",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 15,
"width": 2,
"height": 1,
"passthru": false,
"label": "BUTTON-7",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "toggleSTATE",
"payloadType": "str",
"topic": "toggletopic",
"topicType": "str",
"x": 250,
"y": 1040,
"wires": [
[
"28284c20b68e5a4d"
]
]
},
{
"id": "28284c20b68e5a4d",
"type": "toggle",
"z": "24ac9cf336fcf334",
"name": "",
"onOffTopic": "onofftopic",
"onValue": "true",
"onType": "bool",
"offValue": "false",
"offType": "bool",
"toggleTopic": "toggletopic",
"toggleValue": "toggleSTATE",
"toggleType": "str",
"passOnOff": "always",
"x": 710,
"y": 1040,
"wires": [
[
"33bcd31429ccd189",
"9d5296bfdf4cc31d"
]
]
},
{
"id": "7689e34ad64df914",
"type": "ui_led",
"z": "24ac9cf336fcf334",
"order": 12,
"group": "03eabb95d5aa08dc",
"width": 2,
"height": 2,
"label": "",
"labelPlacement": "right",
"labelAlignment": "center",
"colorForValue": [
{
"color": "#ff0000",
"value": "false",
"valueType": "bool"
},
{
"color": "#ffff00",
"value": "true",
"valueType": "bool"
}
],
"allowColorForValueInMessage": false,
"shape": "circle",
"showGlow": true,
"name": "LED-8",
"x": 870,
"y": 1120,
"wires": []
},
{
"id": "4c34c5e4e30126b3",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 16,
"width": 2,
"height": 1,
"passthru": false,
"label": "BUTTON-8",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "toggleSTATE",
"payloadType": "str",
"topic": "toggletopic",
"topicType": "str",
"x": 250,
"y": 1140,
"wires": [
[
"9271a85e2cf9a980"
]
]
},
{
"id": "9271a85e2cf9a980",
"type": "toggle",
"z": "24ac9cf336fcf334",
"name": "",
"onOffTopic": "onofftopic",
"onValue": "true",
"onType": "bool",
"offValue": "false",
"offType": "bool",
"toggleTopic": "toggletopic",
"toggleValue": "toggleSTATE",
"toggleType": "str",
"passOnOff": "always",
"x": 710,
"y": 1140,
"wires": [
[
"7689e34ad64df914",
"4ef58cf853e0679b"
]
]
},
{
"id": "843eafe37b01d781",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 19,
"width": 8,
"height": 1,
"passthru": false,
"label": "ALL-ON",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "true",
"payloadType": "bool",
"topic": "onofftopic",
"topicType": "str",
"x": 240,
"y": 200,
"wires": [
[
"8eb7410f4b0fd65e"
]
]
},
{
"id": "4450a6c260cf9a43",
"type": "ui_button",
"z": "24ac9cf336fcf334",
"name": "",
"group": "03eabb95d5aa08dc",
"order": 18,
"width": 8,
"height": 1,
"passthru": false,
"label": "ALL OFF",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "false",
"payloadType": "bool",
"topic": "onofftopic",
"topicType": "str",
"x": 240,
"y": 320,
"wires": [
[
"8eb7410f4b0fd65e"
]
]
},
{
"id": "8eb7410f4b0fd65e",
"type": "change",
"z": "24ac9cf336fcf334",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "onofftopic",
"fromt": "str",
"to": "true",
"tot": "bool"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "onofftopic",
"fromt": "str",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 460,
"y": 260,
"wires": [
[
"9c55a82bb540948e",
"0f5e583f6e963055",
"64b8ccf8c7d3238a",
"f262e1a05596496b",
"807b937574312f80",
"ab1e65db65b523e1",
"28284c20b68e5a4d",
"9271a85e2cf9a980"
]
]
},
{
"id": "80601a2b2e064cc0",
"type": "inject",
"z": "24ac9cf336fcf334",
"name": "RESET",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "onofftopic",
"payload": "false",
"payloadType": "bool",
"x": 260,
"y": 260,
"wires": [
[
"8eb7410f4b0fd65e"
]
]
},
{
"id": "a612e0eb0c86cde4",
"type": "serial control",
"z": "24ac9cf336fcf334",
"name": "ARD-57600-USB0",
"serial": "56dac134f05e9fae",
"x": 270,
"y": 100,
"wires": [
[]
]
},
{
"id": "03baaf91ee5f8334",
"type": "arduino out",
"z": "24ac9cf336fcf334",
"name": "",
"pin": "2",
"state": "OUTPUT",
"arduino": "1b7a58ed8cc592b6",
"x": 870,
"y": 460,
"wires": []
},
{
"id": "584fd5460d341eb7",
"type": "arduino out",
"z": "24ac9cf336fcf334",
"name": "",
"pin": "3",
"state": "OUTPUT",
"arduino": "1b7a58ed8cc592b6",
"x": 870,
"y": 560,
"wires": []
},
{
"id": "4fae9e74c991a312",
"type": "arduino out",
"z": "24ac9cf336fcf334",
"name": "",
"pin": "4",
"state": "OUTPUT",
"arduino": "1b7a58ed8cc592b6",
"x": 870,
"y": 660,
"wires": []
},
{
"id": "3eef4e0e097cab67",
"type": "arduino out",
"z": "24ac9cf336fcf334",
"name": "",
"pin": "5",
"state": "OUTPUT",
"arduino": "1b7a58ed8cc592b6",
"x": 870,
"y": 760,
"wires": []
},
{
"id": "74b04211e8b80f0e",
"type": "arduino out",
"z": "24ac9cf336fcf334",
"name": "",
"pin": "6",
"state": "OUTPUT",
"arduino": "1b7a58ed8cc592b6",
"x": 870,
"y": 860,
"wires": []
},
{
"id": "8cf905cef37f69e4",
"type": "arduino out",
"z": "24ac9cf336fcf334",
"name": "",
"pin": "7",
"state": "OUTPUT",
"arduino": "1b7a58ed8cc592b6",
"x": 870,
"y": 960,
"wires": []
},
{
"id": "9d5296bfdf4cc31d",
"type": "arduino out",
"z": "24ac9cf336fcf334",
"name": "",
"pin": "8",
"state": "OUTPUT",
"arduino": "1b7a58ed8cc592b6",
"x": 870,
"y": 1060,
"wires": []
},
{
"id": "4ef58cf853e0679b",
"type": "arduino out",
"z": "24ac9cf336fcf334",
"name": "",
"pin": "9",
"state": "OUTPUT",
"arduino": "1b7a58ed8cc592b6",
"x": 870,
"y": 1160,
"wires": []
}
]
as long as it is working as per your requirement, should be good enough.
of course there are many ways to acheive same results, effificiently.
what is this change node doing in the flow ?
there is no string 'onofftopic' in the payload to search for. It comes in the topic. the payload is already a boolean true or false.
and also, you have given two rules , which do not make any sense.
remove the change node, and the flow will still work.
I used the change node as just a combiner so that there's far less connections from the three upper nodes to all of the toggle nodes. Your right about the rules, I removed them and the flow still works as needed.
I'm working on something for work that has me stumped. We run tumblers that require water injection with two very different cycles, one for aluminum and one for steel. Both flows have been created and now I need to lock one out until the other has completed. I can't seem to figure out how to get a continuous output from any node, it all seems to be momentary and so I can't lock out a flow when another is running. Is there a way to disable or lock out a group of nodes (flow) until the other groups cycle has completed.
Thanks
Node-red is inherently event driven.
When you initiate a flow, eg with a dashboard button, you can use that message to block another flow, eg using a gate or semaphore node, and when the process it controls ends , maybe detected with a Complete node, you can reopen the gate/drop the semaphore.
How much care you take to prevent edge cases where both processes can start running simultaneously depends on how catastrophic that would be!
you can use a junction node for that.
you could use a simple gate ( node-red-contrib-simple-gate
) as @jbudd suggests, and use a single control to 'toggle' the gates.
sample here.
[{"id":"2b71a09107af342a","type":"group","z":"24ac9cf336fcf334","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["322fb40c9bbb1b17","9e973d073c28cb07","88b3b36396513961","b4f2326dd276c3f1","648d5de47b81205e","3f0b17c71410d08d","c38eaa280e768400","7b0fb1360217e152","31290dc32a7c6f0e","ef1cc432de6da017","ccd388b134520e77","e766f3384db0fe86","b58ceb517987e580","869b3c14c7c8f541","bb72037b9d4c7c9b","54e2adc0fd6b3741","456860fd7ef795bf","9d3afd2468a7b6d5","7c038c7ffb69705e","f271d4a0ab6d11dd"],"x":74,"y":939,"w":1272,"h":342},{"id":"322fb40c9bbb1b17","type":"gate","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Gate-1","controlTopic":"gatecontrol","defaultState":"open","openCmd":"ONE","closeCmd":"TWO","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memory","x":1090,"y":1100,"wires":[["31290dc32a7c6f0e"]]},{"id":"9e973d073c28cb07","type":"gate","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Gate-2","controlTopic":"gatecontrol","defaultState":"closed","openCmd":"TWO","closeCmd":"ONE","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memory","x":1090,"y":1180,"wires":[["ef1cc432de6da017"]]},{"id":"88b3b36396513961","type":"toggle","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","onOffTopic":"onofftopic","onValue":"ONE","onType":"str","offValue":"TWO","offType":"str","toggleTopic":"toggletopic","toggleValue":"toggle","toggleType":"str","passOnOff":"always","x":515,"y":1200,"wires":[["3f0b17c71410d08d"]],"l":false},{"id":"b4f2326dd276c3f1","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"OPEN GATE ONE AND CLOSE GATE TWO","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"onofftopic","payload":"ONE","payloadType":"str","x":290,"y":1160,"wires":[["88b3b36396513961"]]},{"id":"648d5de47b81205e","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"OPEN GATE TWO AND CLOSE GATE TWO","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"onofftopic","payload":"TWO","payloadType":"str","x":290,"y":1240,"wires":[["88b3b36396513961"]]},{"id":"3f0b17c71410d08d","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":1200,"wires":[["456860fd7ef795bf","7c038c7ffb69705e"]],"l":false},{"id":"c38eaa280e768400","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Flow-1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"$round($random()*1000,0)","payloadType":"jsonata","x":920,"y":1040,"wires":[["322fb40c9bbb1b17"]]},{"id":"7b0fb1360217e152","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Flow-1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"$round($random()*1000,0)","payloadType":"jsonata","x":920,"y":1240,"wires":[["9e973d073c28cb07"]]},{"id":"31290dc32a7c6f0e","type":"debug","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Flow-1","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1250,"y":1100,"wires":[]},{"id":"ef1cc432de6da017","type":"debug","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Flow-2 ","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1250,"y":1200,"wires":[]},{"id":"ccd388b134520e77","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"CLOSE BOTH GATES","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":340,"y":1000,"wires":[["e766f3384db0fe86","b58ceb517987e580"]]},{"id":"e766f3384db0fe86","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"ONE","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":980,"wires":[["7c038c7ffb69705e"]],"l":false},{"id":"b58ceb517987e580","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"TWO","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":1020,"wires":[["456860fd7ef795bf"]],"l":false},{"id":"869b3c14c7c8f541","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"OPEN BOTH GATES","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":340,"y":1080,"wires":[["54e2adc0fd6b3741","bb72037b9d4c7c9b"]]},{"id":"bb72037b9d4c7c9b","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"ONE","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":1100,"wires":[["456860fd7ef795bf"]],"l":false},{"id":"54e2adc0fd6b3741","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"TWO","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":1060,"wires":[["7c038c7ffb69705e"]],"l":false},{"id":"456860fd7ef795bf","type":"link out","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"link out 431","mode":"link","links":["9d3afd2468a7b6d5"],"x":755,"y":1100,"wires":[]},{"id":"9d3afd2468a7b6d5","type":"link in","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"link in 288","links":["456860fd7ef795bf","ce6458a633d52c58"],"x":975,"y":1100,"wires":[["322fb40c9bbb1b17"]]},{"id":"7c038c7ffb69705e","type":"link out","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"link out 432","mode":"link","links":["f271d4a0ab6d11dd"],"x":755,"y":1180,"wires":[]},{"id":"f271d4a0ab6d11dd","type":"link in","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"link in 289","links":["7c038c7ffb69705e","fbead293faa2aebe"],"x":975,"y":1180,"wires":[["9e973d073c28cb07"]]}]
Just noticed, I forgot to add single control with toggle for gate control. here is the flow with the single input toggle control for two gates.
[{"id":"2b71a09107af342a","type":"group","z":"24ac9cf336fcf334","style":{"stroke":"#999999","stroke-opacity":"1","fill":"none","fill-opacity":"1","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["322fb40c9bbb1b17","9e973d073c28cb07","88b3b36396513961","b4f2326dd276c3f1","648d5de47b81205e","3f0b17c71410d08d","c38eaa280e768400","7b0fb1360217e152","31290dc32a7c6f0e","ef1cc432de6da017","ccd388b134520e77","e766f3384db0fe86","b58ceb517987e580","869b3c14c7c8f541","bb72037b9d4c7c9b","54e2adc0fd6b3741","456860fd7ef795bf","9d3afd2468a7b6d5","7c038c7ffb69705e","f271d4a0ab6d11dd","804a3c9b689313e1"],"x":74,"y":939,"w":1272,"h":402},{"id":"322fb40c9bbb1b17","type":"gate","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Gate-1","controlTopic":"gatecontrol","defaultState":"open","openCmd":"ONE","closeCmd":"TWO","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memory","x":1090,"y":1100,"wires":[["31290dc32a7c6f0e"]]},{"id":"9e973d073c28cb07","type":"gate","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Gate-2","controlTopic":"gatecontrol","defaultState":"closed","openCmd":"TWO","closeCmd":"ONE","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memory","x":1090,"y":1180,"wires":[["ef1cc432de6da017"]]},{"id":"88b3b36396513961","type":"toggle","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","onOffTopic":"onofftopic","onValue":"ONE","onType":"str","offValue":"TWO","offType":"str","toggleTopic":"toggletopic","toggleValue":"toggle","toggleType":"str","passOnOff":"always","x":515,"y":1200,"wires":[["3f0b17c71410d08d"]],"l":false},{"id":"b4f2326dd276c3f1","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"OPEN GATE ONE AND CLOSE GATE TWO","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"onofftopic","payload":"ONE","payloadType":"str","x":290,"y":1180,"wires":[["88b3b36396513961"]]},{"id":"648d5de47b81205e","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"OPEN GATE TWO AND CLOSE GATE TWO","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"onofftopic","payload":"TWO","payloadType":"str","x":290,"y":1240,"wires":[["88b3b36396513961"]]},{"id":"3f0b17c71410d08d","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":1200,"wires":[["456860fd7ef795bf","7c038c7ffb69705e"]],"l":false},{"id":"c38eaa280e768400","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Flow-1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"$round($random()*1000,0)","payloadType":"jsonata","x":920,"y":1040,"wires":[["322fb40c9bbb1b17"]]},{"id":"7b0fb1360217e152","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Flow-2","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"$round($random()*1000,0)","payloadType":"jsonata","x":920,"y":1240,"wires":[["9e973d073c28cb07"]]},{"id":"31290dc32a7c6f0e","type":"debug","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Flow-1","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1250,"y":1100,"wires":[]},{"id":"ef1cc432de6da017","type":"debug","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"Flow-2 ","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1250,"y":1200,"wires":[]},{"id":"ccd388b134520e77","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"CLOSE BOTH GATES","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":340,"y":1000,"wires":[["e766f3384db0fe86","b58ceb517987e580"]]},{"id":"e766f3384db0fe86","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"ONE","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":980,"wires":[["7c038c7ffb69705e"]],"l":false},{"id":"b58ceb517987e580","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"TWO","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":1020,"wires":[["456860fd7ef795bf"]],"l":false},{"id":"869b3c14c7c8f541","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"OPEN BOTH GATES","props":[],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":340,"y":1080,"wires":[["54e2adc0fd6b3741","bb72037b9d4c7c9b"]]},{"id":"bb72037b9d4c7c9b","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"ONE","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":1100,"wires":[["456860fd7ef795bf"]],"l":false},{"id":"54e2adc0fd6b3741","type":"change","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"gatecontrol","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"TWO","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":585,"y":1060,"wires":[["7c038c7ffb69705e"]],"l":false},{"id":"456860fd7ef795bf","type":"link out","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"link out 431","mode":"link","links":["9d3afd2468a7b6d5"],"x":755,"y":1100,"wires":[]},{"id":"9d3afd2468a7b6d5","type":"link in","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"link in 288","links":["456860fd7ef795bf","ce6458a633d52c58"],"x":975,"y":1100,"wires":[["322fb40c9bbb1b17"]]},{"id":"7c038c7ffb69705e","type":"link out","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"link out 432","mode":"link","links":["f271d4a0ab6d11dd"],"x":755,"y":1180,"wires":[]},{"id":"f271d4a0ab6d11dd","type":"link in","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"link in 289","links":["7c038c7ffb69705e","fbead293faa2aebe"],"x":975,"y":1180,"wires":[["9e973d073c28cb07"]]},{"id":"804a3c9b689313e1","type":"inject","z":"24ac9cf336fcf334","g":"2b71a09107af342a","name":"TOGGLE STATES","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"toggletopic","payload":"toggle","payloadType":"str","x":350,"y":1300,"wires":[["88b3b36396513961"]]}]
Hey thanks, these flows that you guys have supplied are absolutely and I've been implementing some ot them in a flow for a Tumbler Automation System I've been working on.
Thank you, thank you, thank,you.
I'm looking for a Countdown Timer that I can use in a Tumbler Automation System. Here's what I'm looking for, a countdown timer that displays Days, Hours, Minutes and Seconds similar to the node-red-contrib-ui-digital-clock. I would like all the digits to be the same size and there are two timer times that I will need that will only be edited in the flows. One needs to be roughly 5Hrs and the second will be 2 to 3 weeks long, 672 - 1008 hours. One is for tumbling Aluminum, the other for Steel parts and once we have times that polish them the way we like they will be locked in.
If there are Nodes that I can install that are close to what I'm looking for that would be fantastic. I've had no luck tracking even one down.
I would advice you to start a new thread so that, people who are not following this thread can also have a look and advice. also for future reference for any other user, the title may be misleading.
nevertheless try here to start