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
RevPi4 Connect RS485 NodeRed
Re: RevPi4 Connect RS485 NodeRed
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.
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).
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
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).
Re: RevPi4 Connect RS485 NodeRed
Thank you so much ...
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
Code: Select all
sudo adduser nodered dialout
Many greetings