Serial device permission error with Modbus plugin

Hi

I have two solar inverters connected to Telegraf through the Modbus plugin. The configuration works fine the first time I run it but shortly afterwards, the service indicates “Permission denied” and “Serial device timed out” on the one serial device.

I think it might be important to note that the one unit that is working fine has a CP210x serial chip. The problematic unit has a XR21V1410 serial chip. I took quite a bit of time to get the driver installed and the default driver (cdc-acm) disabled.

Hello @ddt,
Welcome! I’m really not sure. I’ll tag @Jay_Clifford as he’s our IoT expert.

Hi @ddt,
I am wondering if the chip is being overloaded with two many requests. Do you have any documentation on the modbus endpoint for the chip?

Hi

Thanks @Anaisdg!

I managed to get this working but what I mission… I ended up using a Banana Pi -M4 I had, running Ubuntu 16 server with kernel version 4.9. I had to compile the driver for the XR21V1410 but that was relatively easy following their website instructions and FAQ. Key note though, RS485 is not enabled by default on this driver, I had to enable it under the flow control function before compiling it. I also had to blacklist the cdc-acm driver and then had to bind the port to the right driver.

Oddly enough, it was not necessary for me to compile a driver for CP210x as it was working immediately upon connection on this kernel.

I then followed all the steps to install Telegraf on the Banana Pi and on a small home server I hosted Influxdb. It is all working fine now. I suspect the kernel version change had something to do with the drivers challenges but I am not sure.

Just as reference, see link below for the Modbus registers and “manual”. It leaves much to be desired but I managed to pick up the correct registers by scanning the range with a Modbus tool from my laptop. Unfortunately no additional hardware information on the comms that I could get my hands on (Inverter model SPF5000ES).

Link to registers: https://www.amosplanet.org/wp-content/uploads/2022/05/OffGrid-Modbus-RS485RS232-RTU-Protocol-V0.14-20210420.pdf

(Note Growatt used multiple chipsets for the same model. I just happen to have two different ones)

Thanks for prompt support! Awesome!

1 Like

@ddt
Thank you for sharing your solution!!