home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.99k stars 30.17k forks source link

Modbus integration does not work since one of the last updates #118250

Closed wurliwax closed 2 months ago

wurliwax commented 4 months ago

The problem

I have two modbus connections:

It worked fine for appr. 2 years and stopped working after one of the last updates. Sorry not to be precise - but I did several at once.

What version of Home Assistant Core has the issue?

2024.5.5

What was the last working version of Home Assistant Core?

2024.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Modbus

Link to integration documentation on our website

https://www.home-assistant.io/integrations/modbus/

Diagnostics information

No response

Example YAML snippet

modbus:
  - name: modbus_growatt
    type: serial
    port: /dev/ttyACM0
    baudrate: 9600
    bytesize: 8
    method: rtu
    parity: E
    stopbits: 1

    delay: 2
    message_wait_milliseconds: 1000
    timeout: 5

    sensors:

      - name: growatt_modbus_SOC
        unit_of_measurement: '%'
        input_type: input
        address: 3171
        scan_interval: 120

      - name: growatt_modbus_discharge_power
        unit_of_measurement: 'W'
        input_type: input
        scale: 0.1
        address: 3178
        data_type: uint32
        scan_interval: 30

      - name: growatt_modbus_charge_power
        unit_of_measurement: 'W'
        input_type: input
        scale: 0.1
        address: 3180
        data_type: uint32
        scan_interval: 30

      - name: growatt_modbus_PV_total_power
        unit_of_measurement: 'W'
        input_type: input
        scale: 0.1
        address: 3001
        data_type: uint32
        scan_interval: 10

      - name: growatt_modbus_PaC_power #Output power
        unit_of_measurement: 'W'
        input_type: input
        scale: 0.1
        address: 3023
        data_type: uint32
        scan_interval: 30

      - name: growatt_modbus_P2user_power #Total forward power
        unit_of_measurement: 'W'
        input_type: input
        scale: 0.1
        address: 3041
        data_type: uint32
        scan_interval: 10

      - name: growatt_modbus_P2grid_power #Total reverse power
        unit_of_measurement: 'W'
        input_type: input
        scale: 0.1
        address: 3043
        data_type: uint32
        scan_interval: 10

      - name: growatt_modbus_P2load_power #Total load power - durrent consumption
        unit_of_measurement: 'W'
        input_type: input
        scale: 0.1
        address: 3045
        data_type: uint32
        scan_interval: 10

      - name: growatt_modbus_E2User_today_10fach #Today energy to user
        unit_of_measurement: 'kWh'
        input_type: input
        #scale: 0.1 #Scaling does not work with uint32 - but uint32 is needed for decoding
        address: 3067
        data_type: uint32
        scan_interval: 120    
        device_class: ENERGY 
        #state_class: total_increasing

      - name: growatt_modbus_E2Grid_today_10fach #Today energy to grid
        unit_of_measurement: 'kWh'
        input_type: input
        #scale: 0.1 #Scaling does not work with uint32 - but uint32 is needed for decoding
        address: 3071
        data_type: uint32
        scan_interval: 120    
        device_class: ENERGY 
        #state_class: total_increasing

      - name: growatt_modbus_EUserLoad_today_10fach #Today energy of user load
        unit_of_measurement: 'kWh'
        input_type: input
        #scale: 0.1 #Scaling does not work with uint32 - but uint32 is needed for decoding
        address: 3075
        data_type: uint32
        scan_interval: 120    
        device_class: ENERGY 
        #state_class: total_increasing

      - name: growatt_modbus_Discharge_today_10fach #Today discharge energy 0.1kWh
        unit_of_measurement: 'kWh'
        input_type: input
        #scale: 0.1 #Scaling does not work with uint32 - but uint32 is needed for decoding
        address: 3125
        data_type: uint32
        scan_interval: 120    
        device_class: ENERGY 
        state_class: total_increasing

      - name: growatt_modbus_Charge_today_10fach #Charge energy today
        unit_of_measurement: 'kWh'
        input_type: input
        #scale: 0.1 #Scaling does not work with uint32 - but uint32 is needed for decoding
        address: 3129
        data_type: uint32
        scan_interval: 120    
        device_class: ENERGY 
        state_class: total_increasing

      - name: growatt_modbus_PVEnergy_today_10fach #Charge energy today
        unit_of_measurement: 'kWh'
        input_type: input
        #scale: 0.1 #Scaling does not work with uint32 - but uint32 is needed for decoding
        address: 91
        data_type: uint32
        scan_interval: 120    
        device_class: ENERGY 
        state_class: total_increasing

      - name: growatt_modbus_SysEnergy_today_10fach #System energy today
        unit_of_measurement: 'kWh'
        input_type: input
        #scale: 0.1 #Scaling does not work with uint32 - but uint32 is needed for decoding
        address: 3123
        data_type: uint32
        scan_interval: 120    
        device_class: ENERGY 
        state_class: total_increasing

  - name: SolvisRemote
    type: tcp
    host: 192.168.178.120
    port: 502

    sensors:
    #  - name: Solvis_Warmwasserpuffer
    #    slave: 10
    #    address: 33024
    #    input_type: holding
    #    unit_of_measurement: °C
    #    count: 1
    #    scale: 0.1
    #    offset: 0
    #    precision: 2
    #    data_type: int32

      - name: Solvis_Speicher_oben
        unit_of_measurement: °C
        scale: 0.1
        slave: 1
        precision: 1
        input_type: holding
        address: 33024

      - name: Solvis_Warmwassertemperatur
        unit_of_measurement: °C
        scale: 0.1
        slave: 1
        precision: 2
        input_type: holding
        address: 33025

      - name: Solvis_Speicherreferenztemperatur
        unit_of_measurement: °C
        scale: 0.1
        slave: 1
        precision: 2
        input_type: holding
        address: 33026

      - name: Solvis_Heizungspuffertemperatur oben
        unit_of_measurement: °C
        scale: 0.1
        slave: 1
        precision: 2
        input_type: holding
        address: 33027

      - name: Solvis_Aussentemperatur
        unit_of_measurement: °C
        scale: 0.1
        slave: 1
        precision: 2
        input_type: holding
        address: 33033

      - name: Solvis_Heizungspuffertemperatur unten
        unit_of_measurement: °C
        scale: 0.1
        slave: 1
        precision: 2
        input_type: holding
        address: 33032

      - name: Solvis_Zirkulationsdurchfluss
        unit_of_measurement: °C
        scale: 0.1
        slave: 1
        precision: 2
        input_type: holding
        address: 33034

      - name: Solvis_Vorlauftemperatur
        unit_of_measurement: °C
        scale: 0.1
        slave: 1
        precision: 2
        input_type: holding
        address: 33035

      - name: Solvis_Kaltwassertemperatur
        unit_of_measurement: °C
        scale: 0.1
        slave: 1
        precision: 2
        input_type: holding
        address: 33038

      - name: Solvis_Durchfluss_Warmwasserzirkualation
        unit_of_measurement: l/min
        slave: 1
        precision: 2
        scale: 0.1
        input_type: holding
        address: 33041

      - name: Solvis_Laufzeit_Brenner
        unit_of_measurement: h
        slave: 1
        precision: 0
        input_type: holding
        address: 33536

      - name: Solvis_Brennerstarts
        unit_of_measurement: Starts 
        slave: 1
        precision: 0
        input_type: holding
        address: 33537

      - name: Solvis_Brennerleistung

        unit_of_measurement: kW
        scale: 0.1
        slave: 1
        precision: 2
        input_type: holding
        address: 33539

      - name: Solvis_Ionisationsstrom
        unit_of_measurement: mA 
        slave: 1
        scale: 0.1
        precision: 1
        input_type: holding
        address: 33540

      - name: Solvis_VersionSC2
        slave: 1
        scale: 0.01
        precision: 2
        input_type: holding
        address: 32770

      - name: Solvis_VersionNBG
        slave: 1
        scale: 0.01
        input_type: holding
        address: 32771

      - name: Solvis_ZirkulationBetriebsart
        slave: 1
        input_type: holding
        address: 2049

#      - name: Solvis_A01.Pumpe_Zirkulation
#        slave: 1
#        unit_of_measurement: V
#        scale: 0.01
#        precision: 0
#        input_type: holding
#        address: 33280

#      - name: Solvis_A02.Pumpe_Warmwasser
#        slave: 1
#        unit_of_measurement: V
#        scale: 0.01
#        precision: 0
#        input_type: holding
#        address: 33281

      - name: Solvis_A03.Pumpe_HK1
        slave: 1
        unit_of_measurement: V
        scale: 0.01
        precision: 0
        input_type: holding
        address: 33282

#      - name: Solvis_A12.Brennerstatus
#        slave: 1
#        unit_of_measurement: V
#        scale: 0.01
#        precision: 0
#        input_type: holding
#        address: 33291

      - name: Solvis_DigIn_Stoerungen
        slave: 1
        input_type: holding
        address: 33045

      - name: Solvis_HKR1_Betriebsart
        slave: 1
        input_type: holding
        address: 2818
        #        value_template: "{%if states.sensor.hkr1_betriebsart.state == '1' %}Aus{% elif states.sensor.hkr1_betriebsart.state == '2' %}Automatik{% elif states.sensor.hkr1_betriebsart.state == '3' %}Tagbetrieb{% elif states.sensor.hkr1_betriebsart.state == '4' %}Absenkbetrieb{% elif states.sensor.hkr1_betriebsart.state == '5' %}Standby{% elif states.sensor.hkr1_betriebsart.state == '6' %}Eco{% elif states.sensor.hkr1_betriebsart.state == '7' %}Urlaub{% elif states.sensor.hkr1_betriebsart.state == '8' %}WW Vorang{% elif states.sensor.zirkulationbetriebsart.state == '9' %}Frostschutz{% elif states.sensor.zirkulationbetriebsart.state == '10' %}Pumpenschutz{% elif states.sensor.hkr1_betriebsart.state == '11' %}Estrich{% endif %}"

      - name: Solvis_WW_Solltemperatur
        unit_of_measurement: °C
        slave: 1
        input_type: holding
        address: 2305

Anything in the logs that might be useful for us?

From the UI (Protocols)
Pymodbus: SolvisRemote: Error: device: 1 address: 33024 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
Pymodbus: modbus_growatt: Error: device: 0 address: 3178 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries

---
From the logfile:
2024-05-27 17:28:58.470 INFO (MainThread) [homeassistant.components.modbus] Modbus reloading
2024-05-27 17:28:58.472 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33035 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.480 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33038 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.481 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33041 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.483 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33536 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.484 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33537 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.487 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33539 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.488 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33540 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.489 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 32770 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.490 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 32771 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.490 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 2049 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.491 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33282 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.492 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33045 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.493 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 2818 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:58.495 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 2305 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:28:59.489 DEBUG (MainThread) [pymodbus.logging] Connection lost comm due to Server not responding
2024-05-27 17:28:59.492 DEBUG (MainThread) [pymodbus.logging] callback_disconnected called: Server not responding
2024-05-27 17:28:59.493 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: modbus_growatt: Error: device: 0 address: 3043 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries
2024-05-27 17:28:59.494 DEBUG (MainThread) [pymodbus.logging] Wait comm 100.0 ms before reconnecting.
2024-05-27 17:28:59.596 DEBUG (MainThread) [pymodbus.logging] Connecting to /dev/ttyACM0.
2024-05-27 17:28:59.596 DEBUG (MainThread) [pymodbus.logging] Connecting comm
2024-05-27 17:28:59.604 DEBUG (MainThread) [pymodbus.logging] Connected to comm
2024-05-27 17:28:59.605 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-05-27 17:29:00.496 DEBUG (MainThread) [pymodbus.logging] Adding transaction 472
2024-05-27 17:29:00.497 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-05-27 17:29:00.497 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xb 0xe5 0x0 0x2 0x63 0xc9
2024-05-27 17:29:00.530 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x4 0x0 0x0 0x64 0x3e 0x50 0x94 old_data:  addr=None
2024-05-27 17:29:00.530 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x4 0x0 0x0 0x64 0x3e 0x50 0x94
2024-05-27 17:29:00.531 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x4 0x0 0x0 0x64 0x3e
2024-05-27 17:29:00.532 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4]
2024-05-27 17:29:00.532 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!!
2024-05-27 17:29:00.533 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1
2024-05-27 17:29:00.533 DEBUG (MainThread) [pymodbus.logging] Unrequested message: ReadInputRegistersResponse (2)
2024-05-27 17:29:05.500 DEBUG (MainThread) [pymodbus.logging] Adding transaction 472
2024-05-27 17:29:05.501 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-05-27 17:29:05.501 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xb 0xe5 0x0 0x2 0x63 0xc9
2024-05-27 17:29:05.538 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x4 0x0 0x0 0x65 0x36 0x50 0xc2 old_data:  addr=None
2024-05-27 17:29:05.539 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x4 0x0 0x0 0x65 0x36 0x50 0xc2
2024-05-27 17:29:05.539 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x4 0x0 0x0 0x65 0x36
2024-05-27 17:29:05.540 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4]
2024-05-27 17:29:05.541 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!!
2024-05-27 17:29:05.541 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1
2024-05-27 17:29:05.541 DEBUG (MainThread) [pymodbus.logging] Unrequested message: ReadInputRegistersResponse (2)
2024-05-27 17:29:10.505 DEBUG (MainThread) [pymodbus.logging] Adding transaction 472
2024-05-27 17:29:10.505 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-05-27 17:29:10.506 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xb 0xe5 0x0 0x2 0x63 0xc9
2024-05-27 17:29:10.542 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x4 0x0 0x0 0x65 0x41 0x10 0xe4 old_data:  addr=None
2024-05-27 17:29:10.542 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x4 0x0 0x0 0x65 0x41 0x10 0xe4
2024-05-27 17:29:10.543 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x4 0x0 0x0 0x65 0x41
2024-05-27 17:29:10.543 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4]
2024-05-27 17:29:10.543 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!!
2024-05-27 17:29:10.544 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1
2024-05-27 17:29:10.544 DEBUG (MainThread) [pymodbus.logging] Unrequested message: ReadInputRegistersResponse (2)
2024-05-27 17:29:13.303 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33024 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.347 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33025 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.349 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33026 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.426 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33027 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.428 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33033 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.434 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33032 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.436 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33034 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.473 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33035 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.480 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33038 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.485 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33041 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.490 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33536 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.491 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33537 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.492 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33539 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.494 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33540 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.495 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 32770 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.497 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 32771 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.498 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 2049 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.500 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33282 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.501 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 33045 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.506 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 2818 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:13.507 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: SolvisRemote: Error: device: 1 address: 2305 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.178.120:502]
2024-05-27 17:29:15.510 DEBUG (MainThread) [pymodbus.logging] Adding transaction 472
2024-05-27 17:29:15.511 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 
2024-05-27 17:29:15.511 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xb 0xe5 0x0 0x2 0x63 0xc9
2024-05-27 17:29:15.548 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x4 0x0 0x0 0xd 0x27 0xbf 0xe old_data:  addr=None
2024-05-27 17:29:15.548 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x4 0x0 0x0 0xd 0x27 0xbf 0xe
2024-05-27 17:29:15.549 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x4 0x0 0x0 0xd 0x27
2024-05-27 17:29:15.549 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4]
2024-05-27 17:29:15.550 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!!
2024-05-27 17:29:15.550 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1
2024-05-27 17:29:15.551 DEBUG (MainThread) [pymodbus.logging] Unrequested message: ReadInputRegistersResponse (2)
2024-05-27 17:29:20.515 DEBUG (MainThread) [pymodbus.logging] Connection lost comm due to Server not responding
2024-05-27 17:29:20.518 DEBUG (MainThread) [pymodbus.logging] callback_disconnected called: Server not responding
2024-05-27 17:29:20.519 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: modbus_growatt: Error: device: 0 address: 3045 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries

Additional information

No response

home-assistant[bot] commented 4 months ago

Hey there @janiversen, mind taking a look at this issue as it has been labeled with an integration (modbus) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `modbus` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign modbus` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


modbus documentation modbus source (message by IssueLinks)

janiversen commented 4 months ago

Your device is not accepting connections hence we cannot read data.

ojoojoo commented 4 months ago

I have the exact same problem since the upgrade:

Log details (ERROR) Logger: homeassistant.components.modbus.modbus Source: components/modbus/modbus.py:331 integration: Modbus (documentation, issues) First occurred: 3:20:00 PM (4 occurrences) Last logged: 3:20:00 PM

Pymodbus: SMA1 488: Error: device: 3 address: 30775 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.23.101:502] Pymodbus: SMA2 572: Error: device: 3 address: 30775 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.23.102:502] Pymodbus: SMA3 863: Error: device: 3 address: 30775 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.23.103:502] Pymodbus: SMA4 266: Error: device: 3 address: 30775 -> Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.23.104:502]

wurliwax commented 4 months ago

Hi @janiversen thanks for the quick reply. It seems that the device (Solvis) is not acccepting communication. But the second device seems to do so but none of the entities is updated. Furthermore the Solvice device can be reached and did work for 2 years w/o issues. Is there anythings I can try that gives better / more logfiles that enables you to dig into this problem. ojoojoo seems to have the same trouble...

BTW: ojoojoo and I have the same problem message on AsyncModbusTcpClient // with my other integration it does not update but is a USB device and not TCP...

janiversen commented 4 months ago

How do you come to the conclusion that it is an error in the modbus integration p, nothing in the debug logs indicate that.

The whole HA is released as a package, meaning there are many other just as valid possibilities...Modbus had a major change a couple of releases ago, making it a lot faster and lighter on cpu usage, the downside is that detects more disconnects than before.

wurliwax commented 4 months ago

Hi @janiversen,

I deleted one of the two connections that your replied: "Connection not accepted" The other one (using USB device) shows after a complete reboot the following behavior:

At start it fills one sensor entity but all the others are not available. After a while also the first entity is unavailable. --> seems not to be a connection problem.

Any possibility to roll back before you advanced the CPU usage ? Or any configuration element I can use?

Log Files from my test:

STARTING ... 2024-05-29 20:59:03.130 DEBUG (MainThread) [pymodbus.logging] Connecting to /dev/ttyACM0. 2024-05-29 20:59:03.131 DEBUG (MainThread) [pymodbus.logging] Connecting comm 2024-05-29 20:59:03.138 INFO (MainThread) [homeassistant.components.modbus.modbus] modbus modbus_growatt communication open 2024-05-29 20:59:03.149 DEBUG (MainThread) [pymodbus.logging] Connected to comm 2024-05-29 20:59:03.150 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 2024-05-29 20:59:08.853 DEBUG (MainThread) [pymodbus.logging] Adding transaction 1 2024-05-29 20:59:08.853 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 2024-05-29 20:59:08.854 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xc 0x63 0x0 0x1 0xc3 0x55 2024-05-29 20:59:08.894 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x2 0x0 0x53 0xf9 0xd old_data: addr=None 2024-05-29 20:59:08.895 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x2 0x0 0x53 0xf9 0xd 2024-05-29 20:59:08.895 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x2 0x0 0x53 2024-05-29 20:59:08.896 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4] 2024-05-29 20:59:08.896 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!! 2024-05-29 20:59:08.896 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1 2024-05-29 20:59:09.901 DEBUG (MainThread) [pymodbus.logging] Adding transaction 2 2024-05-29 20:59:09.901 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 2024-05-29 20:59:09.902 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xc 0x6a 0x0 0x2 0x53 0x56 2024-05-29 20:59:09.972 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x4 0x0 0x0 0xd 0x34 0xfe 0xc3 old_data: addr=None 2024-05-29 20:59:09.973 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x4 0x0 0x0 0xd 0x34 0xfe 0xc3 2024-05-29 20:59:09.973 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x4 0x0 0x0 0xd 0x34 2024-05-29 20:59:09.974 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4] 2024-05-29 20:59:09.974 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!! 2024-05-29 20:59:09.974 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1 2024-05-29 20:59:09.975 DEBUG (MainThread) [pymodbus.logging] Unrequested message: ReadInputRegistersResponse (2)

--> showing exactly one (the first one in my config) senor entity, but no other

....

AFTER A WHILE --> all modbus sensor entities are "not available"

2024-05-29 21:44:59.903 DEBUG (MainThread) [pymodbus.logging] Wait comm 100.0 ms before reconnecting. 2024-05-29 21:45:00.005 DEBUG (MainThread) [pymodbus.logging] Connecting to /dev/ttyACM0. 2024-05-29 21:45:00.006 DEBUG (MainThread) [pymodbus.logging] Connecting comm 2024-05-29 21:45:00.014 DEBUG (MainThread) [pymodbus.logging] Connected to comm 2024-05-29 21:45:00.015 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 2024-05-29 21:45:00.905 DEBUG (MainThread) [pymodbus.logging] Adding transaction 69 2024-05-29 21:45:00.906 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 2024-05-29 21:45:00.906 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xc 0x63 0x0 0x1 0xc3 0x55 2024-05-29 21:45:00.941 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x2 0x0 0x4f 0xf8 0xc4 old_data: addr=None 2024-05-29 21:45:00.941 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x2 0x0 0x4f 0xf8 0xc4 2024-05-29 21:45:00.942 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x2 0x0 0x4f 2024-05-29 21:45:00.943 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4] 2024-05-29 21:45:00.943 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!! 2024-05-29 21:45:00.944 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1 2024-05-29 21:45:00.944 DEBUG (MainThread) [pymodbus.logging] Unrequested message: ReadInputRegistersResponse (1) 2024-05-29 21:45:10.910 DEBUG (MainThread) [pymodbus.logging] Adding transaction 69 2024-05-29 21:45:10.911 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 2024-05-29 21:45:10.911 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xc 0x63 0x0 0x1 0xc3 0x55 2024-05-29 21:45:10.946 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x2 0x0 0x4f 0xf8 0xc4 old_data: addr=None 2024-05-29 21:45:10.947 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x2 0x0 0x4f 0xf8 0xc4 2024-05-29 21:45:10.947 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x2 0x0 0x4f 2024-05-29 21:45:10.948 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4] 2024-05-29 21:45:10.948 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!! 2024-05-29 21:45:10.949 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1 2024-05-29 21:45:10.949 DEBUG (MainThread) [pymodbus.logging] Unrequested message: ReadInputRegistersResponse (1) 2024-05-29 21:45:20.914 DEBUG (MainThread) [pymodbus.logging] Adding transaction 69 2024-05-29 21:45:20.914 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 2024-05-29 21:45:20.915 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xc 0x63 0x0 0x1 0xc3 0x55 2024-05-29 21:45:20.948 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x2 0x0 0x4f 0xf8 0xc4 old_data: addr=None 2024-05-29 21:45:20.949 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x2 0x0 0x4f 0xf8 0xc4 2024-05-29 21:45:20.950 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x2 0x0 0x4f 2024-05-29 21:45:20.950 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4] 2024-05-29 21:45:20.951 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!! 2024-05-29 21:45:20.951 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1 2024-05-29 21:45:20.951 DEBUG (MainThread) [pymodbus.logging] Unrequested message: ReadInputRegistersResponse (1) 2024-05-29 21:45:30.917 DEBUG (MainThread) [pymodbus.logging] Adding transaction 69 2024-05-29 21:45:30.918 DEBUG (MainThread) [pymodbus.logging] Resetting frame - Current Frame in buffer - 2024-05-29 21:45:30.918 DEBUG (MainThread) [pymodbus.logging] send: 0x0 0x4 0xc 0x63 0x0 0x1 0xc3 0x55 2024-05-29 21:45:30.951 DEBUG (MainThread) [pymodbus.logging] recv: 0x1 0x4 0x2 0x0 0x4f 0xf8 0xc4 old_data: addr=None 2024-05-29 21:45:30.952 DEBUG (MainThread) [pymodbus.logging] Processing: 0x1 0x4 0x2 0x0 0x4f 0xf8 0xc4 2024-05-29 21:45:30.953 DEBUG (MainThread) [pymodbus.logging] Getting Frame - 0x4 0x2 0x0 0x4f 2024-05-29 21:45:30.953 DEBUG (MainThread) [pymodbus.logging] Factory Response[ReadInputRegistersResponse': 4] 2024-05-29 21:45:30.954 DEBUG (MainThread) [pymodbus.logging] Frame advanced, resetting header!! 2024-05-29 21:45:30.954 DEBUG (MainThread) [pymodbus.logging] Getting transaction 1 2024-05-29 21:45:30.955 DEBUG (MainThread) [pymodbus.logging] Unrequested message: ReadInputRegistersResponse (1) 2024-05-29 21:45:40.921 DEBUG (MainThread) [pymodbus.logging] Connection lost comm due to Server not responding 2024-05-29 21:45:40.924 DEBUG (MainThread) [pymodbus.logging] callback_disconnected called: Server not responding 2024-05-29 21:45:40.925 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: modbus_growatt: Error: device: 0 address: 3171 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries 2024-05-29 21:45:40.927 DEBUG (MainThread) [pymodbus.logging] Wait comm 100.0 ms before reconnecting.

janiversen commented 4 months ago

Your device is not accepting connections as you can see in the first lines of the log.

wurliwax commented 4 months ago

Really? I read:

2024-05-29 20:59:03.138 INFO (MainThread) [homeassistant.components.modbus.modbus] modbus modbus_growatt communication open 2024-05-29 20:59:03.149 DEBUG (MainThread) [pymodbus.logging] Connected to comm

Does this not mean, that the connection is established?

janiversen commented 4 months ago

Of course read when the problem start:

AFTER A WHILE --> all modbus sensor entities are "not available"

2024-05-29 21:44:59.903 DEBUG (MainThread) [pymodbus.logging] Wait comm 100.0 ms before reconnecting.

ojoojoo commented 4 months ago

Can it be that the requirements for the configuration files have changed? What is wrong in my config now, this setup has worked for over a year without any problems, and only after the update the problems with the connection begun.

Configuration files: https://we.tl/t-UvW4UX1jYw

When I put the logger on debug, I don't see a lot of useful information:

logger: default: warning logs: homeassistant.components.sma: debug pysma: debug

home-assistant_2024-05-30T08-19-50.671Z.log.pdf

janiversen commented 4 months ago

Please read the release notes, the configuration file have changed, but this is a channel to report bugs, not do support.

ojoojoo commented 4 months ago

Please read the release notes, the configuration file have changed, but this is a channel to report bugs, not do support.

I think it's a bug when you need to manually modify the config files with each release.

janiversen commented 4 months ago

That is NOT a bug by any normal definition. it is normal and natural thst software manually configured needs to be manually upgraded (auto configured software typically upgrade automatically).

Anyhow if you consider it a bug feel free to submit a pull request to change it.

wurliwax commented 4 months ago

I consider my initial report as a "bug by a normal definition": You wrote in your PR https://github.com/home-assistant/core/pull/113450 about a breaking change expecting "side effects". One side effect seems to be an unstable connection (my setup it is working initially and than loses its connection). In https://github.com/home-assistant/core/issues/115236 you track several issues with the PR 113450. One is simply declared as "outside of HA" because of weak cables. I did check the cables & have two very HW different setups using modbus. Both stopped working after the update. To define it as a problem outside HA is easy, but does not help.

Proposal: I check my setup by rolling back to version 2024.3.3 whether it is working in this version (as you wrote in https://github.com/home-assistant/core/issues/115236) Just to ensure that we can nail the problem down to that change. After that I can only hope for a bugfix - otherwise I will be stucked with the version 2024.3.3 forever.

janiversen commented 4 months ago

Please do as you prefer, that is not my decision to make!

Any change in software have side effects, I have still not seen a single log indicating that there is a bug in the modbus integration, I have seen and have warned about a different behavior.

janiversen commented 4 months ago

Open source is driven by a collective effort, not by users making demands,,.....if you see a bug, you need to make that bug visible to the maintainers, so they can fix it, just telling it is a bug is not really a collective effort.

wurliwax commented 4 months ago

Hi Jan - more than a fair point and I am glad that open source enables a whole world of cool stuff at home. Let me dig into it and do some tests (as I promised). Is there any further log mechanism I can enable? (only telling that connection is lost will not help us, if I find out that the whole setup I have works in older versions and not now) Another idea: Do you think it will help to use the most recent HA version, but to put modbus in an older version as custom component and use this one to ensure that no other integration has side effects? Would that work?

FreFre commented 4 months ago

I have the same issue since I upgrade to 2024.x

The problem only exists on the modbus device that is connecting via TCP (Solis Hybrid Inverter). The 3 other modbus devices (non tcp/ip) work fine. I'm an HA enthousiast and I'm not experienced in py nor low level tcp/ip, so not sure how I ever would be able to debug this. Surely it's undeniable that there is an issue with the modbus tcp/ip client.

janiversen commented 4 months ago

That is not undeniable, around the modbus client are a lot of code that too have had changes.....so please do not just blame the modbus client unless there are some proof.

My production HA uses a modbus tcp/ip connection to a huawei sun2000 solar inverter and in a couple of days it celebrates 3 months without a single restart.

ojoojoo commented 4 months ago

The only thing I see you do is deny the problem people have and not actually helping or putting them on the right track. I think this complete discussion is a waste of time!

janiversen commented 4 months ago

I am not denying that there is a problem, but so far I have not seen a single log indicating the problem is within the modbus integration.

Provide me with a log that shows something else than that the connection is being closed or the device do not accept a connect. without that I have absolutely no way of finding the bug. The lack of log may or may not show that another component is causing trouble like e.g. HA core.

Please understand you cannot expect me to search for a theoretical bug in the integration, when there are no indications.

As I wrote to someone a while ago, open source is a collective effort, if you report a bug you need to make it visible to the maintainer so he/she can fix it. Just telling there is a bug is not really a collective effort.

FreFre commented 4 months ago

That is not undeniable, around the modbus client are a lot of code that too have had changes.....so please do not just blame the modbus client unless there are some proof.

My production HA uses a modbus tcp/ip connection to a huawei sun2000 solar inverter and in a couple of days it celebrates 3 months without a single restart.

First of all, let me start with a word of gratitude. Thanks to your efforts enthusiasts like me can build the most unbelievable automations. I understand the frustration of only receiving issues/bugs and complaints. :-)

I understand your point. But please be aware that people that end up here are mostly HA enthusiasts. I myself have no knowledge of the interaction between different community components that can impact modbus tcp/ip. I only know that I have troubles with the modbus integration since the upgrade, so for me this is an entry point to start looking for a solution. There is nothing in the logs that point to any other component.

I hear you, I really do, but it doesn't help by saying "look elsewhere" and "it works on my machine". For me this is the endpoint unless someone here can point me in the right direction.

janiversen commented 4 months ago

Well if my somewhat longer explanation doesn't help, then please do not forget I am a HA enthusiast like yourself, but also a volunteer and have more than enough to do, so believe me I am not sitting waiting for bug reports or enhancement requests.

Please do not expect me to solve your problem if you do not help identify the problem, to be blunt I solve bug reports fast, when the issuer identifies the problem, because that is the spirit of open source, but I have no obligation to do so !

I understand why you see it as your endpoint, but please also understand it is not my problem or in any way my obligation, I am just helping solve identified problems.

Miq1 commented 3 months ago

I might join in here. I am new in respect to HA, but somewhat experienced in networking and particularly in Modbus.

The below was rubbish - sorry.

I set up a fresh HAOS device on a Raspi5 and attempted to add some Modbus switches and sensors to it. While the YAML seems to be correct (see below), no connection is even attempted by HA (proof further down).

YAML (modbus.yaml included by modbus: !include modbus.yaml in configuration.yaml):

- name: Treppenlicht
  type: rtuovertcp
  host: 192.168.178.47
  port: 502
  lights:
    - name: TRLSW
      device_address: 1
      unique_id: TreppenlichSW
      address: 1
      write_type: holding
      verify:
        input_type: holding
        address: 1
- name: OVAG
  type: rtuovertcp
  host: 192.168.178.77
  port: 6502
  sensors:
    - name: erster
      device_address: 4
      address: 1
      unique_id: erster1
      input_type: holding
      scan_interval: 30

This is resulting in the error messages as were posted before - no connection, no response after 3 retries etc.

I installed the inetutils in the Docker container and checked with tcpdump: there is not a single attempt to connect to the tcp devices as are in the YAML.

A ping is successful, though, and even a telnet session can be opened to the devices supporting that.

So it looks to me like the Modbus integration is missing to connect but is not aware of that.

janiversen commented 3 months ago

Please add a debug log as pr modbus documentation otherwise we cannot see what is happening.

Miq1 commented 3 months ago

My bad... Sorry for troubling you, the root cause was sitting in front of the keyboard, as ever. 😉

I had type: rtuovertcp in my configuration, since I had the impression that a device_address would not be accepted by type: tcp. Hence HA was sending RTU messages including the CRC bytes, that confused the TCP clients. As soon as I changed to type: tcp all was working of course.

janiversen commented 3 months ago

Ok, closing

wurliwax commented 3 months ago

Hi @janiversen - you have been pretty fast to close it... My original problem is not yet solved. I promised tests and I am working on it. I am using a current version of ha and an older version of modbus as custom component. Now my environment works again. Tests are not yet complete - I want to see which version exactly causes problems. Hence please reopen. Just a solution for one in this row does not help all ..

janiversen commented 3 months ago

The message above my close is 3 days old and says its user error...,since you did not comment, I could only think everything was solved.

janiversen commented 3 months ago

I still cannot help without a debug log that shows a problem !

janiversen commented 3 months ago

You do not need to test on old versions, we only search for bugs in the newest version, but you do not to provide something that indicates it's a modbus integration problem, something I can use to pin down a bug (if there is one;

janiversen commented 3 months ago

I have just read in another context, that the library pyserial might have problems with python 3.12 which HA uses...that could at least explain some of the problem, and a5 the same time again indicate it is a problem the modbus integration do not control.