RevPi4 Connect RS485 NodeRed

Topics about the Hardware of Revolution Pi
Post Reply
Rawpnzl
Posts: 4
Joined: 12 Feb 2025, 16:27

RevPi4 Connect RS485 NodeRed

Post by Rawpnzl »

Hi all,

I am new in RevPi4 but not new in Raspberry. I want to use the RS485 in Node Red for Modbus to get data from a solar charge controller. In Node Red I use "/dev/ttyRS485" but I get error messages "Error: Error: Permission denied, cannot open /dev/ttyRS485". I read somewhere that is not possible to use "/dev/ttyRS485" in Pictory and Node Red at the same time. In Pictory I configured nothing so far, it is in factory settings.

How can I access "/dev/ttyRS485" in Node Red?

Thank you very much for your help and support and many greetings
tboehler
KUNBUS
Posts: 14
Joined: 02 May 2023, 16:22

Re: RevPi4 Connect RS485 NodeRed

Post by tboehler »

Hi! The error message "Error: Error: Permission denied, cannot open /dev/ttyRS485" indicates that the file isn't accessible by the user Node-RED is running as.
As per the release notes for the image Bookworm 10/2024 (i.e. our initial bookworm release) the nodered user, which is the user Node-RED is running as, will have to be added to the dialout group before you can access RS485 throught Node-RED.

Code: Select all

sudo adduser nodered dialout
You can find the release notes here: https://revolutionpi.com/en/support/downloads#c1069

Please also keep in mind that the file "/dev/ttyRS485" is deprecated with bookworm and will be removed with the next major release "Trixie". Uses of "/dev/ttyRS485" should be replaced with "/dev/ttyRS485-0". This change was done to keep the numbering consistent between devices with 1 and 2 RS485 interfaces (i.e. Connect 4 and Flat S).
Rawpnzl
Posts: 4
Joined: 12 Feb 2025, 16:27

Re: RevPi4 Connect RS485 NodeRed

Post by Rawpnzl »

Thank you so much ...

Code: Select all

sudo adduser nodered dialout
That was the hint. It works now. Also many thanks for the information regarding "/dev/ttyRS485-0". I changed it now under Bookworm, so that should work with Trixie.

Many greetings
Post Reply