Using RS485 port on CC100 with NodeRED

Please check the FW for both CC100’s. In the short term, it may be necessary to install older FW.

@WagoKurt Thanks for you reply. Both my CC100 have 03.09.07(21) firmware. So that is not the issue it seems.

Interesting. Can you please check the versions of the node-red-contrib-modbus and Node-RED?

11 Aug 18:00:19 - [info] Node-RED version: v3.0.2
11 Aug 18:00:19 - [info] Node.js version: v16.20.1
11 Aug 18:00:19 - [info] Linux 5.10.21-rt34w03.01.06 arm LE

node-red-contrib-modbus 5.26.0

I suspect this might actually caused by incorret permission for node red to use the serial port.

(Dont mind the date, but I get the same return)

docker exec -it wago-node-red /bin/bash
ls -l /dev/ttySTM1
crw-rw---- 1 root 106 247, 1 Jun 15 10:04 /dev/ttySTM1

Should it not be lrwxrwxrwx?

I also have to make the permissions persisten somehow. Will test this ASAP.

Docker is installed by uploading the docker ipk in the wbm. node red run command:
docker run -d --restart unless-stopped --name wago-node-red -d --privileged=true --user=root -p
1880:1880 --device=/dev/ttySTM1:/dev/serial:rw --security-opt=seccomp=unconfined -v
node_red_user_data:/data nodered/node-red

I dont think this procedure automatically grants all the neccessary permissions for node red to access the serial port and then throws node red into infinate reboot loop when using a modbus node.

I think I’ve might been a bit confused by the initial post in this thread, where it says that node red should have the correct permissions by default.

hi, do we have a solution to the problem of the serial port not working properly?

Hello WAGO community,

Did anyone solve this issue with serial port and Node Red on Wago CC-100 ?
I had exactly the same issue with Node-RED stuck in infinite crash loop after trying to set up modbus connection through serial port.
The only solution that works for me is using older Node-Red version (v 3.0.2) installed with container from the image:
docker run -d
–name node-red
–restart always
–privileged=true
–user=root
-p 1880:1880
-p 505:505
-v node_red_user_data:/data
-v /dev/ttySTM1:/dev/serial
wagoautomation/node-red-cc100:1.0.0

rather than from image:
docker run -d --name node-red --restart=always
-d --privileged=true --user=root
-p 1880:1880
-p 505:505
-v node_red_user_data:/data
-v /dev/ttySTM1:/dev/serial
nodered/node-red
where with version 3.1 serial port will not work with modbus nodes in NodeRed :confused:

1 Like

You might want to try using modbus@5.25.0 along with dependencies serialport@10.5.0 and modbus-serial@8.0.8.

I’m hoping WAGO releases a new cc100 image that supports Node.js > 18 and Node-RED 4, along with a fully functional CC100 serial port. Dashboard 1 is depreceated and dashboard 2 can’t be used with current wago CC100 image

Hello,
In the vanilla node-red installation, does the problem came from the serial node ?
Last time I was able to make it work by using this work around:

  • I you don’t have Portainer:
    Login in the PFC100/PFC200/CC100 with SSH then go to elevated user by using the command su -
    Then use the command docker exec -ti --user root <containername> /bin/bash to open the container console as root.
  • If you have Portainer, use it to log in the container console in root.
  • In the container console, go to the node-red data folder cd /data/
  • Execute the command npm rebuild --build-from-source

This will rebuild the serial node from source to the specific of the system.

NodeRed CC100 Modbus RTU:

please do the following steps:

  1. stop the container
  2. delete the container and volume
  3. start the container new
  4. enter the container and build node-red-contrib-modbus new

docker stop node-red
docker rm
docker volume rm node_red_user_data
docker run --name wago-node-red --privileged=true --user=root --network=host --device=/dev/ttySTM1:/dev/ttySTM1:rw -v node_red_user_data:/data nodered/node-red
docker exec -it wago-node-red /bin/bash

npm install node-red-contrib-modbus
npm rebuild --build-from-source

1 Like

Works Perfect! :slight_smile: THX