Having problem with climate modbus entity - wrong values

Hello!

I have been trying to solve this issue for weeks without any success… I did not find a similar issue on the forum as mine. I am trying to integrate my iCON NGBS climate control device via Modbus TCP.

I have 3 climate entities defined.

  • Ground floor - target temperature address 306
  • First floor - target temperature address 310
  • Studio apartment - target temperature address 314

Versions:

  • Core 2023.11.1
  • Supervisor 2023.10.1
  • OS 11.1
  • Frontend 20231030.1

My config:

modbus:
  - name: iCON
    type: tcp
    host: 10.116.204.50
    port: 502
    message_wait_milliseconds: 50
    retries: 3
    delay: 5
    timeout: 5
    climates:
      - name: "   Ground floor"
        address: 281
        lazy_error_count: 3
        input_type: holding
        precision : 1
        scale: 0.1
        temperature_unit: C
        target_temp_register: 306
        # target_temp_write_registers: 388
        # scan_interval: 60
        # hvac_mode_register:
        #   address: 337
        #   values:
        #     state_heat: 0
        #     state_cool: 1
      - name: "  First floor"
        address: 282
        lazy_error_count: 3
        input_type: holding
        precision : 1
        scale: 0.1
        temperature_unit: C
        target_temp_register: 310
    #     target_temp_write_registers: 342
    #    scan_interval: 60
    #     hvac_mode_register:
    #       address: 337
    #       values:
    #         state_heat: 0
    #         state_cool: 1
      - name: " Studio apartment"
        address: 283
        lazy_error_count: 3
        input_type: holding
        precision : 1
        scale: 0.1
        temperature_unit: C
        target_temp_register: 314
    #     target_temp_write_registers: 346
    #     scan_interval: 30
    #     hvac_mode_register:
    #       address: 337
    #       values:
    #         state_heat: 0
    #         state_cool: 1

It seems to be working fine (the values are showing up) but the problem is that the first defined climate target temperature resets to -1 value every minute. And the key thing is that the “first” defined entity will do this no matter what… So this is not register specific, but config order.

As you can see the home assistant data is fluctuating every minute. Please note as I mentioned earlier that after I commented out the “ground floor” entity, the “first floor” became the fluctuating one…

If I poll the Modbus device with Modbus Poll and graph it, everything works as intended, no fluctuation or error in the data. There are no connection errors as well…

Started debugging:

logger:
  default: warning
  logs:
    homeassistant.components.modbus: debug
    pymodbus: debug

It does not seems to matter how many registers and entites I have. I tried adjusting the frequency from 10-100 seconds, and the waiting between requests from 30 to 10000 ms.

I checked the log and despite the occasional connection error everything seems to be fine. I don’t know what is the reason behind the connection errors (as this is home assistant specific as well), but the number of errors did not explain the periodical fluctuation every minute…

debug log:

2023-11-05 10:41:17.277 DEBUG (SyncWorker_2) [pymodbus.logging] Connection to Modbus server established. Socket ('10.116.204.11', 45018)
2023-11-05 10:41:17.277 INFO (SyncWorker_2) [homeassistant.components.modbus.modbus] modbus iCON communication open
2023-11-05 10:41:29.887 DEBUG (SyncWorker_3) [pymodbus.logging] Current transaction state - IDLE
2023-11-05 10:41:29.887 DEBUG (SyncWorker_3) [pymodbus.logging] Running transaction 1
2023-11-05 10:41:29.887 DEBUG (SyncWorker_3) [pymodbus.logging] SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x36 0x0 0x1
2023-11-05 10:41:29.887 DEBUG (SyncWorker_3) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:29.889 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:29.892 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:29.892 DEBUG (SyncWorker_3) [pymodbus.logging] RECV: 0x0 0x1 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xe
2023-11-05 10:41:29.892 DEBUG (SyncWorker_3) [pymodbus.logging] Processing: 0x0 0x1 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xe
2023-11-05 10:41:29.892 DEBUG (SyncWorker_3) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:29.892 DEBUG (SyncWorker_3) [pymodbus.logging] Adding transaction 1
2023-11-05 10:41:29.892 DEBUG (SyncWorker_3) [pymodbus.logging] Getting transaction 1
2023-11-05 10:41:29.892 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:29.992 DEBUG (SyncWorker_4) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:29.992 DEBUG (SyncWorker_4) [pymodbus.logging] Running transaction 2
2023-11-05 10:41:29.992 DEBUG (SyncWorker_4) [pymodbus.logging] SEND: 0x0 0x2 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x3a 0x0 0x1
2023-11-05 10:41:29.993 DEBUG (SyncWorker_4) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:29.993 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:29.994 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:29.994 DEBUG (SyncWorker_4) [pymodbus.logging] RECV: 0x0 0x2 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xfa
2023-11-05 10:41:29.994 DEBUG (SyncWorker_4) [pymodbus.logging] Processing: 0x0 0x2 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xfa
2023-11-05 10:41:29.994 DEBUG (SyncWorker_4) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:29.995 DEBUG (SyncWorker_4) [pymodbus.logging] Adding transaction 2
2023-11-05 10:41:29.995 DEBUG (SyncWorker_4) [pymodbus.logging] Getting transaction 2
2023-11-05 10:41:29.995 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:30.319 DEBUG (SyncWorker_11) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:30.319 DEBUG (SyncWorker_11) [pymodbus.logging] Running transaction 3
2023-11-05 10:41:30.319 DEBUG (SyncWorker_11) [pymodbus.logging] SEND: 0x0 0x3 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x21 0x0 0x1
2023-11-05 10:41:30.319 DEBUG (SyncWorker_11) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:30.322 DEBUG (SyncWorker_11) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:30.339 DEBUG (SyncWorker_11) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:30.340 DEBUG (SyncWorker_11) [pymodbus.logging] RECV: 0x0 0x3 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xd8
2023-11-05 10:41:30.340 DEBUG (SyncWorker_11) [pymodbus.logging] Processing: 0x0 0x3 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xd8
2023-11-05 10:41:30.340 DEBUG (SyncWorker_11) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:30.340 DEBUG (SyncWorker_11) [pymodbus.logging] Adding transaction 3
2023-11-05 10:41:30.340 DEBUG (SyncWorker_11) [pymodbus.logging] Getting transaction 3
2023-11-05 10:41:30.340 DEBUG (SyncWorker_11) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:30.639 DEBUG (SyncWorker_4) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:30.639 DEBUG (SyncWorker_4) [pymodbus.logging] Running transaction 4
2023-11-05 10:41:30.639 DEBUG (SyncWorker_4) [pymodbus.logging] SEND: 0x0 0x4 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x22 0x0 0x1
2023-11-05 10:41:30.639 DEBUG (SyncWorker_4) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:30.645 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:30.645 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:30.645 DEBUG (SyncWorker_4) [pymodbus.logging] RECV: 0x0 0x4 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xfa
2023-11-05 10:41:30.645 DEBUG (SyncWorker_4) [pymodbus.logging] Processing: 0x0 0x4 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xfa
2023-11-05 10:41:30.645 DEBUG (SyncWorker_4) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:30.645 DEBUG (SyncWorker_4) [pymodbus.logging] Adding transaction 4
2023-11-05 10:41:30.645 DEBUG (SyncWorker_4) [pymodbus.logging] Getting transaction 4
2023-11-05 10:41:30.645 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:30.762 DEBUG (SyncWorker_11) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:30.762 DEBUG (SyncWorker_11) [pymodbus.logging] Running transaction 5
2023-11-05 10:41:30.762 DEBUG (SyncWorker_11) [pymodbus.logging] SEND: 0x0 0x5 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x23 0x0 0x1
2023-11-05 10:41:30.762 DEBUG (SyncWorker_11) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:30.763 DEBUG (SyncWorker_11) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:30.775 DEBUG (SyncWorker_11) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:30.775 DEBUG (SyncWorker_11) [pymodbus.logging] RECV: 0x0 0x5 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x2 0x10
2023-11-05 10:41:30.775 DEBUG (SyncWorker_11) [pymodbus.logging] Processing: 0x0 0x5 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x2 0x10
2023-11-05 10:41:30.775 DEBUG (SyncWorker_11) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:30.775 DEBUG (SyncWorker_11) [pymodbus.logging] Adding transaction 5
2023-11-05 10:41:30.775 DEBUG (SyncWorker_11) [pymodbus.logging] Getting transaction 5
2023-11-05 10:41:30.776 DEBUG (SyncWorker_11) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:30.917 DEBUG (SyncWorker_7) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:30.917 DEBUG (SyncWorker_7) [pymodbus.logging] Running transaction 6
2023-11-05 10:41:30.917 DEBUG (SyncWorker_7) [pymodbus.logging] SEND: 0x0 0x6 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x52 0x0 0x1
2023-11-05 10:41:30.917 DEBUG (SyncWorker_7) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:30.919 DEBUG (SyncWorker_7) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:30.920 DEBUG (SyncWorker_7) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:30.920 DEBUG (SyncWorker_7) [pymodbus.logging] RECV: 0x0 0x6 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0x81
2023-11-05 10:41:30.920 DEBUG (SyncWorker_7) [pymodbus.logging] Processing: 0x0 0x6 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0x81
2023-11-05 10:41:30.920 DEBUG (SyncWorker_7) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:30.920 DEBUG (SyncWorker_7) [pymodbus.logging] Adding transaction 6
2023-11-05 10:41:30.920 DEBUG (SyncWorker_7) [pymodbus.logging] Getting transaction 6
2023-11-05 10:41:30.920 DEBUG (SyncWorker_7) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:30.995 DEBUG (SyncWorker_4) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:30.995 DEBUG (SyncWorker_4) [pymodbus.logging] Running transaction 7
2023-11-05 10:41:30.995 DEBUG (SyncWorker_4) [pymodbus.logging] SEND: 0x0 0x7 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x11 0x0 0x1
2023-11-05 10:41:30.995 DEBUG (SyncWorker_4) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:30.995 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:31.006 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:31.007 DEBUG (SyncWorker_4) [pymodbus.logging] RECV: 0x0 0x7 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0x14
2023-11-05 10:41:31.007 DEBUG (SyncWorker_4) [pymodbus.logging] Processing: 0x0 0x7 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0x14
2023-11-05 10:41:31.007 DEBUG (SyncWorker_4) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:31.007 DEBUG (SyncWorker_4) [pymodbus.logging] Adding transaction 7
2023-11-05 10:41:31.007 DEBUG (SyncWorker_4) [pymodbus.logging] Getting transaction 7
2023-11-05 10:41:31.007 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:31.066 DEBUG (SyncWorker_0) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:31.067 DEBUG (SyncWorker_0) [pymodbus.logging] Running transaction 8
2023-11-05 10:41:31.067 DEBUG (SyncWorker_0) [pymodbus.logging] SEND: 0x0 0x8 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x1a 0x0 0x1
2023-11-05 10:41:31.067 DEBUG (SyncWorker_0) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:31.072 DEBUG (SyncWorker_0) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:31.072 DEBUG (SyncWorker_0) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:31.072 DEBUG (SyncWorker_0) [pymodbus.logging] RECV: 0x0 0x8 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xe6
2023-11-05 10:41:31.072 DEBUG (SyncWorker_0) [pymodbus.logging] Processing: 0x0 0x8 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xe6
2023-11-05 10:41:31.072 DEBUG (SyncWorker_0) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:31.072 DEBUG (SyncWorker_0) [pymodbus.logging] Adding transaction 8
2023-11-05 10:41:31.072 DEBUG (SyncWorker_0) [pymodbus.logging] Getting transaction 8
2023-11-05 10:41:31.072 DEBUG (SyncWorker_0) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:31.141 DEBUG (SyncWorker_3) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:31.141 DEBUG (SyncWorker_3) [pymodbus.logging] Running transaction 9
2023-11-05 10:41:31.141 DEBUG (SyncWorker_3) [pymodbus.logging] SEND: 0x0 0x9 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x1b 0x0 0x1
2023-11-05 10:41:31.141 DEBUG (SyncWorker_3) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:31.142 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:31.143 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:31.143 DEBUG (SyncWorker_3) [pymodbus.logging] RECV: 0x0 0x9 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xb1
2023-11-05 10:41:31.143 DEBUG (SyncWorker_3) [pymodbus.logging] Processing: 0x0 0x9 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xb1
2023-11-05 10:41:31.143 DEBUG (SyncWorker_3) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:31.143 DEBUG (SyncWorker_3) [pymodbus.logging] Adding transaction 9
2023-11-05 10:41:31.143 DEBUG (SyncWorker_3) [pymodbus.logging] Getting transaction 9
2023-11-05 10:41:31.143 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:44.780 DEBUG (SyncWorker_10) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:44.780 DEBUG (SyncWorker_10) [pymodbus.logging] Running transaction 10
2023-11-05 10:41:44.780 DEBUG (SyncWorker_10) [pymodbus.logging] SEND: 0x0 0xa 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x36 0x0 0x1
2023-11-05 10:41:44.780 DEBUG (SyncWorker_10) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:44.781 DEBUG (SyncWorker_10) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:44.782 DEBUG (SyncWorker_10) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:44.782 DEBUG (SyncWorker_10) [pymodbus.logging] RECV: 0x0 0xa 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xe
2023-11-05 10:41:44.782 DEBUG (SyncWorker_10) [pymodbus.logging] Processing: 0x0 0xa 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xe
2023-11-05 10:41:44.782 DEBUG (SyncWorker_10) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:44.782 DEBUG (SyncWorker_10) [pymodbus.logging] Adding transaction 10
2023-11-05 10:41:44.782 DEBUG (SyncWorker_10) [pymodbus.logging] Getting transaction 10
2023-11-05 10:41:44.782 DEBUG (SyncWorker_10) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:44.835 DEBUG (SyncWorker_8) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:44.836 DEBUG (SyncWorker_8) [pymodbus.logging] Running transaction 11
2023-11-05 10:41:44.836 DEBUG (SyncWorker_8) [pymodbus.logging] SEND: 0x0 0xb 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x3a 0x0 0x1
2023-11-05 10:41:44.836 DEBUG (SyncWorker_8) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:44.837 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:44.837 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:44.837 DEBUG (SyncWorker_8) [pymodbus.logging] RECV: 0x0 0xb 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xfa
2023-11-05 10:41:44.837 DEBUG (SyncWorker_8) [pymodbus.logging] Processing: 0x0 0xb 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xfa
2023-11-05 10:41:44.837 DEBUG (SyncWorker_8) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:44.837 DEBUG (SyncWorker_8) [pymodbus.logging] Adding transaction 11
2023-11-05 10:41:44.837 DEBUG (SyncWorker_8) [pymodbus.logging] Getting transaction 11
2023-11-05 10:41:44.837 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:44.888 DEBUG (SyncWorker_0) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:44.888 DEBUG (SyncWorker_0) [pymodbus.logging] Running transaction 12
2023-11-05 10:41:44.888 DEBUG (SyncWorker_0) [pymodbus.logging] SEND: 0x0 0xc 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x21 0x0 0x1
2023-11-05 10:41:44.888 DEBUG (SyncWorker_0) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:44.888 DEBUG (SyncWorker_0) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:44.890 DEBUG (SyncWorker_0) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:44.890 DEBUG (SyncWorker_0) [pymodbus.logging] RECV: 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xd8
2023-11-05 10:41:44.890 DEBUG (SyncWorker_0) [pymodbus.logging] Processing: 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xd8
2023-11-05 10:41:44.890 DEBUG (SyncWorker_0) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:44.890 DEBUG (SyncWorker_0) [pymodbus.logging] Adding transaction 12
2023-11-05 10:41:44.890 DEBUG (SyncWorker_0) [pymodbus.logging] Getting transaction 12
2023-11-05 10:41:44.890 DEBUG (SyncWorker_0) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:44.942 DEBUG (SyncWorker_7) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:44.942 DEBUG (SyncWorker_7) [pymodbus.logging] Running transaction 13
2023-11-05 10:41:44.942 DEBUG (SyncWorker_7) [pymodbus.logging] SEND: 0x0 0xd 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x22 0x0 0x1
2023-11-05 10:41:44.942 DEBUG (SyncWorker_7) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:44.943 DEBUG (SyncWorker_7) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:44.944 DEBUG (SyncWorker_7) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:44.944 DEBUG (SyncWorker_7) [pymodbus.logging] RECV: 0x0 0xd 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xfa
2023-11-05 10:41:44.944 DEBUG (SyncWorker_7) [pymodbus.logging] Processing: 0x0 0xd 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0xfa
2023-11-05 10:41:44.944 DEBUG (SyncWorker_7) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:44.944 DEBUG (SyncWorker_7) [pymodbus.logging] Adding transaction 13
2023-11-05 10:41:44.944 DEBUG (SyncWorker_7) [pymodbus.logging] Getting transaction 13
2023-11-05 10:41:44.944 DEBUG (SyncWorker_7) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:44.996 DEBUG (SyncWorker_3) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:44.996 DEBUG (SyncWorker_3) [pymodbus.logging] Running transaction 14
2023-11-05 10:41:44.996 DEBUG (SyncWorker_3) [pymodbus.logging] SEND: 0x0 0xe 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x23 0x0 0x1
2023-11-05 10:41:44.996 DEBUG (SyncWorker_3) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:44.996 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:44.998 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:44.998 DEBUG (SyncWorker_3) [pymodbus.logging] RECV: 0x0 0xe 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x2 0x10
2023-11-05 10:41:44.998 DEBUG (SyncWorker_3) [pymodbus.logging] Processing: 0x0 0xe 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x2 0x10
2023-11-05 10:41:44.998 DEBUG (SyncWorker_3) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:44.998 DEBUG (SyncWorker_3) [pymodbus.logging] Adding transaction 14
2023-11-05 10:41:44.998 DEBUG (SyncWorker_3) [pymodbus.logging] Getting transaction 14
2023-11-05 10:41:44.998 DEBUG (SyncWorker_3) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:45.053 DEBUG (SyncWorker_2) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:45.053 DEBUG (SyncWorker_2) [pymodbus.logging] Running transaction 15
2023-11-05 10:41:45.053 DEBUG (SyncWorker_2) [pymodbus.logging] SEND: 0x0 0xf 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x52 0x0 0x1
2023-11-05 10:41:45.053 DEBUG (SyncWorker_2) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:45.054 DEBUG (SyncWorker_2) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:45.162 DEBUG (SyncWorker_2) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:45.162 DEBUG (SyncWorker_2) [pymodbus.logging] RECV: 0x0 0xf 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0x81
2023-11-05 10:41:45.162 DEBUG (SyncWorker_2) [pymodbus.logging] Processing: 0x0 0xf 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0x81
2023-11-05 10:41:45.162 DEBUG (SyncWorker_2) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:45.162 DEBUG (SyncWorker_2) [pymodbus.logging] Adding transaction 15
2023-11-05 10:41:45.162 DEBUG (SyncWorker_2) [pymodbus.logging] Getting transaction 15
2023-11-05 10:41:45.162 DEBUG (SyncWorker_2) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:45.214 DEBUG (SyncWorker_10) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:45.214 DEBUG (SyncWorker_10) [pymodbus.logging] Running transaction 16
2023-11-05 10:41:45.214 DEBUG (SyncWorker_10) [pymodbus.logging] SEND: 0x0 0x10 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x11 0x0 0x1
2023-11-05 10:41:45.214 DEBUG (SyncWorker_10) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:45.214 DEBUG (SyncWorker_10) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:45.215 DEBUG (SyncWorker_10) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:45.215 DEBUG (SyncWorker_10) [pymodbus.logging] RECV: 0x0 0x10 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0x14
2023-11-05 10:41:45.215 DEBUG (SyncWorker_10) [pymodbus.logging] Processing: 0x0 0x10 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x1 0x14
2023-11-05 10:41:45.216 DEBUG (SyncWorker_10) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:45.216 DEBUG (SyncWorker_10) [pymodbus.logging] Adding transaction 16
2023-11-05 10:41:45.216 DEBUG (SyncWorker_10) [pymodbus.logging] Getting transaction 16
2023-11-05 10:41:45.216 DEBUG (SyncWorker_10) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:45.267 DEBUG (SyncWorker_8) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:45.267 DEBUG (SyncWorker_8) [pymodbus.logging] Running transaction 17
2023-11-05 10:41:45.267 DEBUG (SyncWorker_8) [pymodbus.logging] SEND: 0x0 0x11 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x1a 0x0 0x1
2023-11-05 10:41:45.267 DEBUG (SyncWorker_8) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:45.268 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:45.268 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:45.268 DEBUG (SyncWorker_8) [pymodbus.logging] RECV: 0x0 0x11 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xe6
2023-11-05 10:41:45.269 DEBUG (SyncWorker_8) [pymodbus.logging] Processing: 0x0 0x11 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xe6
2023-11-05 10:41:45.269 DEBUG (SyncWorker_8) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:45.269 DEBUG (SyncWorker_8) [pymodbus.logging] Adding transaction 17
2023-11-05 10:41:45.269 DEBUG (SyncWorker_8) [pymodbus.logging] Getting transaction 17
2023-11-05 10:41:45.269 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:45.320 DEBUG (SyncWorker_0) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:45.320 DEBUG (SyncWorker_0) [pymodbus.logging] Running transaction 18
2023-11-05 10:41:45.320 DEBUG (SyncWorker_0) [pymodbus.logging] SEND: 0x0 0x12 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x1b 0x0 0x1
2023-11-05 10:41:45.320 DEBUG (SyncWorker_0) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:45.321 DEBUG (SyncWorker_0) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:45.322 DEBUG (SyncWorker_0) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:45.322 DEBUG (SyncWorker_0) [pymodbus.logging] RECV: 0x0 0x12 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xb1
2023-11-05 10:41:45.322 DEBUG (SyncWorker_0) [pymodbus.logging] Processing: 0x0 0x12 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xb1
2023-11-05 10:41:45.322 DEBUG (SyncWorker_0) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:45.322 DEBUG (SyncWorker_0) [pymodbus.logging] Adding transaction 18
2023-11-05 10:41:45.322 DEBUG (SyncWorker_0) [pymodbus.logging] Getting transaction 18
2023-11-05 10:41:45.322 DEBUG (SyncWorker_0) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2023-11-05 10:41:59.781 DEBUG (SyncWorker_4) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2023-11-05 10:41:59.781 DEBUG (SyncWorker_4) [pymodbus.logging] Running transaction 19
2023-11-05 10:41:59.781 DEBUG (SyncWorker_4) [pymodbus.logging] SEND: 0x0 0x13 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x36 0x0 0x1
2023-11-05 10:41:59.781 DEBUG (SyncWorker_4) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:59.781 DEBUG (SyncWorker_4) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:59.781 ERROR (SyncWorker_4) [homeassistant.components.modbus.modbus] Pymodbus: iCON: Modbus Error: [Connection] ModbusTcpClient(10.116.204.50:502): Connection unexpectedly closed 6.079673767089844e-05 seconds into read of 8 bytes without response from slave before it closed connection
2023-11-05 10:41:59.835 DEBUG (SyncWorker_8) [pymodbus.logging] Connection to Modbus server established. Socket ('10.116.204.11', 44658)
2023-11-05 10:41:59.836 DEBUG (SyncWorker_8) [pymodbus.logging] Current transaction state - WAITING_FOR_REPLY
2023-11-05 10:41:59.836 DEBUG (SyncWorker_8) [pymodbus.logging] Running transaction 20
2023-11-05 10:41:59.836 DEBUG (SyncWorker_8) [pymodbus.logging] SEND: 0x0 0x14 0x0 0x0 0x0 0x6 0x0 0x3 0x1 0x3a 0x0 0x1
2023-11-05 10:41:59.836 DEBUG (SyncWorker_8) [pymodbus.logging] New Transaction state "SENDING"
2023-11-05 10:41:59.836 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2023-11-05 10:41:59.838 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2023-11-05 10:41:59.838 DEBUG (SyncWorker_8) [pymodbus.logging] RECV: 0x0 0x14 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xfa
2023-11-05 10:41:59.838 DEBUG (SyncWorker_8) [pymodbus.logging] Processing: 0x0 0x14 0x0 0x0 0x0 0x5 0x0 0x3 0x2 0x0 0xfa
2023-11-05 10:41:59.838 DEBUG (SyncWorker_8) [pymodbus.logging] Factory Response[ReadHoldingRegistersResponse': 3]
2023-11-05 10:41:59.838 DEBUG (SyncWorker_8) [pymodbus.logging] Adding transaction 20
2023-11-05 10:41:59.839 DEBUG (SyncWorker_8) [pymodbus.logging] Getting transaction 20
2023-11-05 10:41:59.839 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"

Thank you very much for your help!

Can somebody please help me? I could not find the reason for this behaviour… I don’t think that it is caused by the modbus device…

Hi Laszlo,

I have the same issue with the same device you have.

2023-12-23 15:51:13.761 ERROR (SyncWorker_8) [homeassistant.components.modbus.modbus] Pymodbus: modbus_hub: Error: device: 0 address: 387 -> Modbus Error: [Connection] ModbusTcpClient(192.168.8.248:502): Connection unexpectedly closed 1.4066696166992188e-05 seconds into read of 8 bytes without response from slave before it closed connection

Unfortunately the connection is closed by the iCON device with no special reason. I was able to handle it in case of a sensor entity with the “lazy_error_count: 5” but it not helps in case of the climate entity.

Have you find the solution already?

I think I have find the reason but not the solution. Here is the post for more details:

Hi,
Did you manage to solve the problem?
Thanks!

I want to solve the same problem (control/monitor the NGBS system from HA) but with a different approach. I’m thinking on mirroring the HTTP traffic the mobile application does. Has anyone experimented with that?

I see that several people here use an NGBS iCON-2 controller. Could someone please show me an example modbus configuration? (read thermostat temperature/humidity values, switches etc.)