node red – modbus rtu on nodered docker

How can I configure serial communication (modbus rtu), specifically with an Arduino device, within a Node-RED Docker container using the provided docker-compose.yml file?

Here is a snippet from my docker-compose.yml file:

`
version: “3”

services:
node-red:
image: nodered/node-red:latest
environment:
– TZ=Asia/Jakarta
– NODE_RED_ADMIN_PW=${NODE_RED_PW_1}
container_name: secure_noderedx
ports:
– “1880:1880”
– “1883:1883”
command:
– “/settings/settings.js”
volumes:
– volume_server_1:/data
– ./settings/settings.js:/data/settings.js
devices:
– /dev/ttyACM0 # <– Arduino device
env_file:
– .env
`

I have connected my Arduino device to /dev/ttyACM0, but it seems like Node-RED running inside the Docker container is not able to access it. Is there a specific configuration or step that I am missing to enable serial communication between the Arduino and Node-RED within a Docker container?

Any help or guidance on how to properly configure serial communication in a Dockerized Node-RED environment would be greatly appreciated. Thank you!

Read more here: Source link