hello, can someone help me how to make 'start' and 'stop' button in nodered dashboard that function as activating the gauge meter and chart that showing the data from mqtt/inject node when start button was selected/push and stopping or unactivated the gaugemeter and chart if the stop button was pushed?
Do you already have a flow to stop and start? If so you can just connect two buttons to the flows.
If you don’t have flows set up, buttons by themselves won’t do anything, you need to connect them to some logic to do the off and on.
could you give me some example of the logical flow of that case sir i need help for my school task:pray:t2:
Can you share the Node-RED flow you have created so far?
As that will enable people to suggest options for you.
Here's a very quick flow as an example of how to use a 'start and stop' button to pass or inhibit the data coming from your MQTT-In node.
[{"id":"87a6eab4f305fa45","type":"tab","label":"Start_Stop_buttons","disabled":false,"info":"","env":[]},{"id":"ee0cf66c48521c1d","type":"ui_button","z":"87a6eab4f305fa45","name":"","group":"a7449be3.fd8418","order":1,"width":0,"height":0,"passthru":false,"label":"start","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"start","payloadType":"str","topic":"topic","topicType":"msg","x":190,"y":100,"wires":[["4647dc7fd8b4052a"]]},{"id":"b07dc660a110b644","type":"ui_button","z":"87a6eab4f305fa45","name":"","group":"a7449be3.fd8418","order":1,"width":0,"height":0,"passthru":false,"label":"stop","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"stop","payloadType":"str","topic":"topic","topicType":"msg","x":190,"y":180,"wires":[["4647dc7fd8b4052a"]]},{"id":"4647dc7fd8b4052a","type":"change","z":"87a6eab4f305fa45","name":"","rules":[{"t":"set","p":"status","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":140,"wires":[[]]},{"id":"b0742a532562b986","type":"inject","z":"87a6eab4f305fa45","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"23","payloadType":"num","x":190,"y":320,"wires":[["2c60c95b9f19bce8"]]},{"id":"2c60c95b9f19bce8","type":"switch","z":"87a6eab4f305fa45","name":"","property":"status","propertyType":"flow","rules":[{"t":"eq","v":"start","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":350,"y":320,"wires":[["62a5f0d60d72a2e5"]]},{"id":"62a5f0d60d72a2e5","type":"debug","z":"87a6eab4f305fa45","name":"Check output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":540,"y":320,"wires":[]},{"id":"285f6c971c616361","type":"inject","z":"87a6eab4f305fa45","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"start","payloadType":"str","x":190,"y":60,"wires":[["4647dc7fd8b4052a"]]},{"id":"638a252deb52d314","type":"inject","z":"87a6eab4f305fa45","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":190,"y":220,"wires":[["4647dc7fd8b4052a"]]},{"id":"cceab04efcd4c834","type":"comment","z":"87a6eab4f305fa45","name":"This simulates an input from your MQTT-In node","info":"","x":300,"y":280,"wires":[]},{"id":"a7449be3.fd8418","type":"ui_group","name":"Default","tab":"b6c1bcde.cfe6d","order":1,"disp":false,"width":"21","collapse":false},{"id":"b6c1bcde.cfe6d","type":"ui_tab","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.