Node-red-serial port port selection

Hi there!
I'm looking for a way a user with only access to node-red dashboard to be able to select which serial port to connect to. This topic is exactly talking about it:

However the githubs links seems to be broken and i don't now if the feature request has been implemented yet. If not, does anyone already built a custom serial port set of nodes that can do this? Thanks a lot for your help!

Dynamic serial port selection was merged in 2023: node-red-node-serialport port selection node addition by yhur · Pull Request #1035 · node-red/node-red-nodes · GitHub

@plouc,

As @Steve-Mcl said, it's a part of node-red-node-serialport now, so once installed, you will get the below nodes

And as seen on the below, you can use the serial control to dynamically change the port.

Thank you all for your response.
I actually tried to use the control node. However i might not have expressed what i'd like to do correctly and i'm not sure the control node will help me in that situation.

I would like to have a dashboard where the user can choose which serial port to use to communicate. Say they can plus a USB/serial adapter to the computer, which i have no idea how it will mount.

The flow will list the available serial ports using a command like ls /dev/{tty,cu}.* in MacOS send it to a list in the dashboard. Then the user can choose from it and send it back to the flow. At this point i would like to be able to open that specified com port using the Serial In and/or Out node.

but it seems that i cannot do this, as both Serial and serial control nodes have to be set up to a particular com port.

Is it maybe another way to do it using a node.js library in a function node?

Thanks a lot for your help!

Ok, so sorry for the newbie questions. This actually works great thank you very much for your awesome work.

For someone landing here looking for the same. You have to first configure the serial control node and the serial in and out nodes with an available serial port. Then you can chage it dynamically with serial control.

here is a flow that does the selection from dashboard:

flows.json (5.1 KB)

1 Like

Hi, I am facing on the same problem (Windows os). May I change the command in the exec node? Please, can you advise me witch command have I to place?
Thank you in advance,
n

this should help!