I am running a TIG stack on a cc100 and got an issue with permission for the /dev/ttySTM1 for the Telegraf container.
The container is created with these parameters:
--privileged --user=root --device=/dev/ttySTM1:/dev/serial
telegraf.conf includes this:
[[inputs.modbus]]
.......
controller = "file:/dev/serial"
.........
Get this error after starting the container:
[inputs.modbus::MID] Error in plugin: permission denied
If I run the following on the cc100 before startering the container everything works until the controller is rebooted :
chmod ugo+rw /dev/ttySTM1
What am I missing? If I use the same paramters (–privileged --user=root --device=/dev/ttySTM1:/dev/serial) on a NodeRed container it works flawlessly. So it must be telegraf that does something strange ?
1 Like
Have a look at this thread, it might be helpful.
Steps to use the serial port on the CC100 with NodeRED in Docker.
Disable the PLC Runtime
[image]
The serial port on the CC100 is called /dev/ttySTM1 and has the correct permissions by default.
[image]
Install Node-RED and attach the serial port in privileged mode.
docker run -d --name wago-node-red -d --privileged=true --user=root --network=host --device=/dev/ttySTM1:/dev/ttySTM1:rw -v node_red_user_data:/data nodered/node-red
Open NodeRED GUI in browser at port 1880
https://:…
That works perfectly if I run NodeRED but seems like telegraf acts differently with the same container parameters
–device=/dev/ttySTM1:/dev/serial:rw
I have tried that as well, same problem with telegraf
Very strange issue. Seems like the telegraf container does something wierd
Looks like a user permissions issue… check out this thread for a possible fix.
Hi, I am using telegraf 1.18 and Influxfdb 1.8.5. in Raspberry pi 3 B+. Config below Input modbus Serial controller [[inputs.modbus]] name = “Meter1” slave_id = 1 timeout = “2s” busy_retries = 10 busy_retries_wait = “200ms” ### Serial...
Reading time: 1 mins đź•‘
Likes: 3 ❤