# Start and Stop Button In Dashboard

**URL:** <https://discourse.nodered.org/t/start-and-stop-button-in-dashboard/86060>\
**Category:** Dashboard\
**Tags:** node-red-dashboard, mqtt\
**Created:** [1 March 2024 15:13 UTC](https://discourse.nodered.org/t/start-and-stop-button-in-dashboard/86060 "2024-03-01T15:13:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel90](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@daniel90](https://discourse.nodered.org/u/daniel90)\
**Post date:** [1 March 2024 15:13 UTC](https://discourse.nodered.org/t/start-and-stop-button-in-dashboard/86060/1 "2024-03-01T15:13:14Z")

</div>

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? 🙏🏻

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [1 March 2024 15:26 UTC](https://discourse.nodered.org/t/start-and-stop-button-in-dashboard/86060/2 "2024-03-01T15:26:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![daniel90](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@daniel90](https://discourse.nodered.org/u/daniel90)\
**Post date:** [1 March 2024 17:51 UTC](https://discourse.nodered.org/t/start-and-stop-button-in-dashboard/86060/3 "2024-03-01T17:51:06Z")

</div>

could you give me some example of the logical flow of that case sir 🙏🏻 i need help for my school task​:pray:t2:

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [1 March 2024 17:56 UTC](https://discourse.nodered.org/t/start-and-stop-button-in-dashboard/86060/4 "2024-03-01T17:56:46Z")

</div>

Can you share the Node-RED flow you have created so far?  
As that will enable people to suggest options for you.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [1 March 2024 18:11 UTC](https://discourse.nodered.org/t/start-and-stop-button-in-dashboard/86060/5 "2024-03-01T18:11:01Z")

</div>

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.  
 ![start_stop](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/726fb5082a8e01268e1cfe63e2cbd59cd7948b93.png)

```auto
[{"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}]

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [31 March 2024 18:11 UTC](https://discourse.nodered.org/t/start-and-stop-button-in-dashboard/86060/6 "2024-03-31T18:11:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
