# Disabling nodes from dashboard

**URL:** https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319
**Category:** General
**Created:** [15 April 2022 07:10 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319 "2022-04-15T07:10:35Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![rxdeath](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@rxdeath](https://discourse.nodered.org/u/rxdeath)
#### Post date: [15 April 2022 07:10 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319/1 "2022-04-15T07:10:35Z")

</div>

is there a way to disable/enable nodes from the dashboard? this is a solution to my problem but i think its not possible.

here is what i'm trying to accomplish:

i want to be able to get the serial stream coming from an arduino. (done, i get the stream using the brown serial port read node)

i also want to be able to write to that serial port as needed for firmware read/writes. this is done simply with a exec node.

the exec node will not run when the serial read node is connected obviously. how can i get all these things to happen? they don't need to happen at the same time, but i want to be able to debug, turn on the stream, see what happening. then if i so choose, go backup/restore the firmware without any special user interaction.

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [15 April 2022 07:55 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319/2 "2022-04-15T07:55:19Z")

</div>

~~You can [use the API](https://nodered.org/docs/api/admin/methods/put/nodes/module/) (`PUT /nodes/:module`) to disable/enable a node.~~

my mistake, that disables the whole module. I don't see an option to disable a single node, perhaps it exists, but not documented, or it doesn't exist (yet).

There is a runtime [api method for enabling/disabling a node](https://nodered.org/docs/api/modules/v/1.3/@node-red_runtime_nodes.html#.setNodeSetState), but i am not sure how to use this API.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [15 April 2022 10:42 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319/3 "2022-04-15T10:42:55Z")

</div>

I would take a different approach. Rather than trying to mess with the nodes API, I would simply put some gates into your flow. Then you can use data from Dashboard to open/close the appropriate gate.

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [15 April 2022 11:06 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319/4 "2022-04-15T11:06:12Z")

</div>

I don't think that works for hardware-connected nodes as the serial node will have exclusivity on the port (?), ie. in-use.

---

<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: [15 April 2022 11:11 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319/5 "2022-04-15T11:11:16Z")

</div>

@bakman2 if you were replying to Julian’s comment, the gate won't stop the hardware-connected node from arriving, but by add the gate after the hardware-connected node it would stop any msgs from passing onward.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [15 April 2022 12:35 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319/6 "2022-04-15T12:35:49Z")

</div>

Yes. But the point is that Node-RED had already grabbed the serial port so a gate won’t release it so the exec node can then use it.

So short answer is no you can’t disable it from Node-RED

---

<div class="post-metadata">

### Author: ![rxdeath](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@rxdeath](https://discourse.nodered.org/u/rxdeath)
#### Post date: [21 April 2022 04:25 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319/7 "2022-04-21T04:25:23Z")

</div>

sorry for the delay in reply, i couldn't find a way around it either. i guess since i don't need the serial debug often, i can just enable/disable it in the flow when needed. wouldn't be nice if there was a more elegant answer though

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [21 April 2022 08:25 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319/8 "2022-04-21T08:25:01Z")

</div>

If you need to share a serial port, there are ways to do that as well.

---

<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: [20 June 2022 08:25 UTC](https://discourse.nodered.org/t/disabling-nodes-from-dashboard/61319/9 "2022-06-20T08:25:26Z")

</div>

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