Modbus permission errors

I’m trying to get data from my solar controller, which supports RS485. I have a USB to RJ11 cable connected to a Raspberry Pi4. I can see the USB device under hardware.

Device path:/dev/ttyUSB0

ID:/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_BG00ZBE2-if00-port0

However, the Modbus2MQTT addon keeps complaining about permissions. Anyone ever run across this?

Permission denied for read serial device /dev/ttyUSB0 Error: EACCES: permission denied, access ‘/dev/ttyUSB0’

InitialConnect /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_BG00ZBE2-if00-port0: Error: Permission denied, cannot open /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_BG00ZBE2-if00-port0

How?
[Please quote any code using the forum </> formatting options.]
Have you tried the protocol wizard yet?

Sorry, I’m using an addon called Modbus <=> MQTT.

Are you running this in a VM type environment?

I see you raised an issue in GitHub too.

HAOS on a RaspberryPi4.

Latest updates, cold restart? Any other integrations using your USB/RS485 adapter?
What Solar Controller are you attempting to access?

Yup, no pending updates. Full reboot, power off/power on. I have a brand new Dyness 40A MPPT connected.

Seems like the issue has been encountered before.

See troubleshooting step in the instructions that describes your scenario with Linux access issues.

Let us know if you succeed to connect, and don’t forget to update the GitHub report on your progress as well.

Yeah, I’ve seen several articles out there about changing permissions. However, I am using HAOS and it doesn’t like the typical Linux commands. Below is what I get.

[core-ssh ~]$ sudo usermod -a -G dialout $USER
-bash: sudo: command not found

How are you issuing the commands?

Putty into HAOS (Terminal & SSH) app running to expose port 22). Connected to HAOS as “root” and used the password I specified in the Addon.

The ‘standard’ SSH Addon (cut down to prevent neophytes from hurting themselves), or one with extended features turned on?

Quote:
Known issues and limitations

This app will not enable you to install packages or do anything as root. This is not working with Home Assistant.

(Yeah, I know, it shouldn’t be this hard) - put that in your GitHub update to say the workaround doesn’t work.

Yup, thats the one.

Whst steps did you take to install the RS485 USB Device?

Maybe play with the Wizard instead?

I just plugged the USB device into my RPI4. RJ11 end in Solar Charge Controller. I know the charge controller detected it because as soon as you connect the cable, the screen goes blank.
I tested with wizard and I see “modbus hub connected”, but adding any register/entities for this charge controller reveals no data. I’m starting to wonder if this USB device is junk.