Serial nodes can be deactivated if not used in a given configuration

Hello everyone.
I have several serial nodes in my flow. Depending on the user's hardware configuration, not all of them are used. I would like to be able to deactivate them, but I understand that NR loads them as soon as the flows start (even though I have deactivated them in the flow according to my tests). Do you think there's a way of disabling a serial node so that it doesn't generate an error in the console saying that this device isn't present, which is indeed the case if, for example, only 1 USB port is connected and not the others?
Note that the error has absolutely no effect on subsequent operation.
I hope I've made myself clear, it's not easy to explain.
Thanks for your feedback

Did you disable the serial config nodes?

In fact, the user fills in fields upstream in a control panel (in HA) designating which USB port is used. This is then written to a file which is reread at NR startup to adapt to the client's configuration.
I've tried to disable a serial port, but even in this case NR or Nodejs hogs the port and doesn't leave it available. For example, I have VMs running in parallel that have the serial port stolen even when it has been disabled in the flow.

But have you tried disabling the serial config nodes?

Also, are you using the very latest serial node? There was a feature merged recently that introduces a Serial Control node: node-red-nodes/io/serialport/ at master · yhur/node-red-nodes · GitHub

Yes, disabled into the flow without success. The deactivated port is still occupied by NR, as I understand it.

This is the version i'm using. This is the docker version integrated into home assistant. Is it good ?
NR is V 3.1.4


This what is on the function node to setup de serial


That does NOT disable the serial config.

Open the node, open the config (by clicking the pencil), then disable the config

Where do you send that? To what kind of node?


there is a demo flow in that link i posted - it shows you how to do dynamic control, including ENABLE/DISABLE

1 Like

it's much better this way indeed :+1:

Which device do you mean? These are inverters and battery BMSs.

It works in the same way as the manipulation above? if so, that's perfect. I'll have to test it as soon as possible. Top.

I meant "To what kind of node" as in a serial-in node, a serial-out node, a serial-request node

All you showed was the innards of a function node.

Ah ok, sorry, these are serial control nodes


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