Openhab reset after Modbus bridge activation - Openhabian 4.3.2 (reproducible)

For a few days I have been fighting with Modbus configuration trying to connect to my Deye Inverter. I came to the point I must ask experts :slight_smile:

First: Configuration:

openhabian@openhabian:/dev/serial/by-id $ ls -l /dev/serial/by-id/
total 0
lrwxrwxrwx 1 root root 13 Sep  2 16:17 usb-0658_0200-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 Sep  2 16:21 usb-FTDI_FT232R_USB_UART_A9JVVF0W-if00-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root 13 Sep  2 16:17 usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_68998d5c510eef11ab39bf2a433abf1e-if00-port0 -> ../../ttyUSB0

The problem:
similar in this post: Modbus communication does not work.. I received the same permission restiction command and figured out about necessery corrections in /etc/default/openhab I made the chabge as following:

EXTRA_JAVA_OPTS="-Xms192m -Xmx768m -XX:+ExitOnOutOfMemoryError -Dgnu.io.rxtx.SerialPorts=/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A9JVVF0W-if00-port0:/dev/seria>

After the Modbus bridge activation Openhab makes a full reset. In the log file I see the Bridge, pollers and one item came to online - shortly :frowning:

My things and Items definition:

Bridge modbus:serial:deyeRS485 "Deye RS485 Bridge" [
  port="/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A9JVVF0W-if00-port0",
  baud=9600,
  dataBits=8,
  stopBits="1.0",
  parity="none",
  encoding="rtu",
  id=0,
  timeBetweenTransactionsMillis=60
] {
  Bridge poller socPoller [ start=37004, length=1, refresh=5000, type="holding" ] {
    Thing data soc "Battery State of Charge" [ readStart="37004", readValueType="int16" ]
  }
}
Number Deye_Batt_SOC "Battery SoC [%d %%]" { channel="modbus:data:deyeRS485:soc:soc:number" }

RS485 converter is connected to Pi. There is no connection to the MODBUS (inverter yet)
Maybe someone can help me to resolve the issue. I wish to have MODBUS Comunication with my Deye inverter

Log files attached:
modbus_log.txt (11.2 KB)

There is definitively sth wrong with the definition of the /etc/default/openhab
uncommenting my configuration file brings previous problems with permition but there is no reset. What do I do wrong?

Log file attached
modbus_log_2.txt (61.6 KB)

I followed this guide

Using the full /dev/serial/by-id/name of adapter did not work for me.

Thank you fro your response. Very useful post. I will definitively go this way.

Meantime I will try to hardcode /dev/ttyUSB1 for RS485 serial converter. I need to see MODBUS connection and first value read out from my inverter.

This does not make openhab resetting.


EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB1:/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A9JVVF0W-if00-port0"

Hi Jacek, @wiewior

What model of the Deye do you setup? I just start on the 50kW Hybrid and after reading all posts decided to go with the serial RTU option, as I have very bad experience with OH interfacing the TCP/RTU converter that I used in previous install (Solis 50kW hybrid ).

Do you have some up to date Deye doc in English, Can you share your .things and items?

Maciej

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.