Disabling nodes from dashboard

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.

You can use the API (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, but i am not sure how to use this API.

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.

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

1 Like

@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.

1 Like

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

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

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

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