Modbus Error with Core Version > 2024.3.3

I am using a USB2Serial (RS485) adapter to get data from an energy meter, what has worked well for month.

After Updating HA-OS from 12.0 to 12.2 (and HA-Core from 2024.3.3 (not sure) to 2024.4.3), I can’t connect my USB2Serial-Adapter. Everything in HA looks fine, as far as I can see, but I get the following error:

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:318
integration: Modbus (documentation, issues)
First occurred: 15:16:56 (2 occurrences)
Last logged: 15:18:57

Pymodbus: EM_Heizung: Error: device: 0 address: 1024 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries
Pymodbus: EM_Heizung: Error: device: 0 address: 1056 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries

I have tried to change from USB0 to USB1, also different baudrates, nothing works.

I have disconnected the USB adapter from the HA and connected it to my Windows PC and read out data from the same device (energy meter), which worked perfectly.

Here is my yaml-configuration:

modbus:

  • name: EM_Heizung
    type: serial
    port: /dev/ttyUSB0
    baudrate: 115200
    bytesize: 8
    method: rtu
    parity: N
    stopbits: 1
    delay: 0
    message_wait_milliseconds: 30
    timeout: 5

Here is my hardware-configuration:

ttyUSB0 /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

Subsystem: tty
Device path: /dev/ttyUSB0
ID: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0

DEVLINKS: >-
/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
/dev/serial/by-path/pci-0000:00:06.1-usb-0:2:1.0-port0
/dev/serial/by-path/pci-0000:00:06.1-usbv1-0:2:1.0-port0
DEVNAME: /dev/ttyUSB0
DEVPATH: /devices/pci0000:00/0000:00:06.1/usb3/3-2/3-2:1.0/ttyUSB0/tty/ttyUSB0
ID_BUS: usb
ID_MODEL: USB_Serial
ID_MODEL_ENC: USB\x20Serial
ID_MODEL_ID: ‘7523’
ID_PATH: pci-0000:00:06.1-usb-0:2:1.0
ID_PATH_TAG: pci-0000_00_06_1-usb-0_2_1_0
ID_PATH_WITH_USB_REVISION: pci-0000:00:06.1-usbv1-0:2:1.0
ID_REVISION: ‘0264’
ID_SERIAL: 1a86_USB_Serial
ID_TYPE: generic
ID_USB_DRIVER: ch341
ID_USB_INTERFACES: ‘:ff0102:’
ID_USB_INTERFACE_NUM: ‘00’
ID_USB_MODEL: USB_Serial
ID_USB_MODEL_ENC: USB\x20Serial
ID_USB_MODEL_ID: ‘7523’
ID_USB_REVISION: ‘0264’
ID_USB_SERIAL: 1a86_USB_Serial
ID_USB_TYPE: generic
ID_USB_VENDOR: 1a86
ID_USB_VENDOR_ENC: 1a86
ID_USB_VENDOR_ID: 1a86
ID_VENDOR: 1a86
ID_VENDOR_ENC: 1a86
ID_VENDOR_ID: 1a86
MAJOR: ‘188’
MINOR: ‘0’
SUBSYSTEM: tty
TAGS: ‘:systemd:’
USEC_INITIALIZED: ‘9600961691’

Is there something I can’t see? And what do the addresses 1024 and 1056 in the error message mean?

I’m guessing the integration was set-up with you connecting to a specific serial port like

You should be able to set it up using the id of the device instead, then no matter what serial port the OS assigns it to at reboot, it will find it.
I don’t know exactly with that integration, but all the zwave, zigbee, bluetooth integrations I’ve used this works.

Probably something like one of these.

I have tried this, but using the ID (in modbus.yaml) does not work and terminates other modbus integrations (tcp) additionally.
I am actually sure that I am using the correct USB port, depending on which one the adapter is currently using (/dev/ttyUSB0 or /dev/ttyUSB1). I think that is not the problem. I am aware of the problem because I also have a Sonoff Zigbee USB adapter in use and sometimes the two switch USB ports. There are no problems with the Sonoff USB-Adapter.

1 Like

There seems to be a problem with the new update of the Core. I have downgraded to version 2024.3.3

On CLI:
ha core update --version 2024.3.3

and now the integration is running smoothly again.

and fixed in 2024.4.4 (according to the release notes)

I am also reading data from my energy meter with modbus, in my case I am using USR-DR302 to convert from modbus to TCP and with type: rtuovertcp as modbus in configuration.

And In my situation even after upgrading to 2024.4.4 I still can’t read data from energy meter.

Downgrading to 2024.3.3 fixes it :frowning:

This is my log file on 2024.4.4:

2024-04-26 19:40:02.114 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: inepro380: Error: device: 0 address: 20482 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries
2024-04-26 19:40:02.115 DEBUG (MainThread) [pymodbus.logging] Wait comm 100.0 ms before reconnecting.
2024-04-26 19:40:02.146 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: inepro380: Error: device: 0 address: 20484 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 10.10.1.221:23]
2024-04-26 19:40:02.179 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: inepro380: Error: device: 0 address: 20486 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 10.10.1.221:23]
2024-04-26 19:40:02.211 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: inepro380: Error: device: 0 address: 20492 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 10.10.1.221:23]
2024-04-26 19:40:02.266 DEBUG (MainThread) [pymodbus.logging] Connecting to 10.10.1.221:23.
2024-04-26 19:40:02.267 DEBUG (MainThread) [pymodbus.logging] Connecting comm
2024-04-26 19:40:02.273 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: inepro380: Error: device: 0 address: 20494 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 10.10.1.221:23]
2024-04-26 19:40:02.277 DEBUG (MainThread) [pymodbus.logging] Connected to comm

@Iceman03, could you please check it your issue has been fixed with 2024.4.4, please?

I have tried today. 2024.4.4 did not fix the issue. Going back to 2024.3.3 now.

Using Core 2024.5.1 and Operating System 12.2
Using Modbus via TCP, still have the same issue.