Hi everyone!
I have a serial in node from node-red-node-serialport (2.0.3) that works as expected. Unfortunately, the serial port, which is in my case "/dev/ttymxc3", needs to be configured also in other parts of my Node-RED flows. In order to achieve a better cohesion I tried to utilize an environment variable for the setting "Serial Port" within the serial port configuration node. However, it seems that environment variables are not supported for this purpose.
In order to set the serial port with an environment variable, I tried utilizing the "serial control" node from node-red-node-serialport (2.0.3).
This is a part of the docs for the serial control node:
In order to control the communication, just send msg.payload containing.
{
"serialport": "/dev/ttyUSB0",
"serialbaud": 115200,
"databits": 8,
"parity": "none",
"stopbits": 1,
"enabled": true
}
After Node-RED starts, my serial control node gets the following incoming message:
{
"payload": {
"serialport": "/dev/ttymxc3",
"serialbaud": 9600,
"databits": 8,
"parity": "none",
"stopbits": 1,
"enabled": true
}
}
After the serial control node gets this message, the status of the node seems ok, but it does not output any messages as I would expect. Is the serial control node really able to mimic the functionality of a serial in node? If yes, has anybody an idea what I got wrong?