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.11k stars 29.79k forks source link

Danfoss ECL Comfort 210 / Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received) #108349

Closed ND1988 closed 7 months ago

ND1988 commented 7 months ago

The problem

With the HA-Modbus Intergration no data can be recieved from Danfoss ECL Comfort 210. Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)

When I hook up the serial adaptor to my Windows PC and using the Software "Modbus Poll" the data can be recieved. The settings in the two systems seem to be comparable to me.

Thanks, for any help to get this running!

What version of Home Assistant Core has the issue?

core-2024.1.3

What was the last working version of Home Assistant Core?

No response

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
modbus:
  - name: modbus_hub
    type: serial
    port: /dev/ttyUSB0
    baudrate: 38400
    bytesize: 8
    method: rtu
    parity: E
    stopbits: 1
    delay: 1
    message_wait_milliseconds: 1000
    timeout: 5
    sensors:
      - name: Sensor1
        slave: 1
        address: 11201
      - name: Sensor2
        slave: 1
        address: 10201

Anything in the logs that might be useful for us?

2024-01-19 08:57:58.466 DEBUG (SyncWorker_9) [pymodbus.logging] Changing transaction state from "WAITING_FOR_REPLY" to "RETRYING"
2024-01-19 08:57:59.067 DEBUG (SyncWorker_9) [pymodbus.logging] Sleeping 0.6
2024-01-19 08:57:59.072 DEBUG (SyncWorker_9) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 08:58:04.076 DEBUG (SyncWorker_9) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 08:58:04.084 DEBUG (SyncWorker_9) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 08:58:14.092 DEBUG (SyncWorker_9) [pymodbus.logging] Transaction failed. (Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)) 
2024-01-19 08:58:14.092 DEBUG (SyncWorker_9) [pymodbus.logging] Retry on empty response - 1
2024-01-19 08:58:14.093 DEBUG (SyncWorker_9) [pymodbus.logging] Changing transaction state from "WAITING_FOR_REPLY" to "RETRYING"
2024-01-19 08:58:15.293 DEBUG (SyncWorker_9) [pymodbus.logging] Sleeping 1.2
2024-01-19 08:58:15.301 DEBUG (SyncWorker_9) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 08:58:20.302 DEBUG (SyncWorker_9) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 08:58:20.305 DEBUG (SyncWorker_9) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 08:58:30.338 DEBUG (SyncWorker_9) [pymodbus.logging] Transaction failed. (Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)) 
2024-01-19 08:58:30.338 DEBUG (SyncWorker_9) [pymodbus.logging] Processing: 
2024-01-19 08:58:30.338 DEBUG (SyncWorker_9) [pymodbus.logging] Getting transaction 1
2024-01-19 08:58:30.338 DEBUG (SyncWorker_9) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2024-01-19 08:58:30.339 ERROR (SyncWorker_9) [homeassistant.components.modbus.modbus] Pymodbus: modbus_hub: Error: device: 1 address: 11201 -> Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)
2024-01-19 08:58:31.348 DEBUG (SyncWorker_8) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2024-01-19 08:58:31.348 DEBUG (SyncWorker_8) [pymodbus.logging] Running transaction 2
2024-01-19 08:58:31.349 DEBUG (SyncWorker_8) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 08:58:31.349 DEBUG (SyncWorker_8) [pymodbus.logging] Changing state to IDLE - Last Frame End - None Current Time stamp - 1705651111.349277
2024-01-19 08:58:31.353 DEBUG (SyncWorker_8) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 08:58:31.354 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 08:58:41.391 DEBUG (SyncWorker_8) [pymodbus.logging] No response received, Expected 7 bytes Received 0 bytes !!!!
2024-01-19 08:58:41.391 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2024-01-19 08:58:41.391 DEBUG (SyncWorker_8) [pymodbus.logging] RECV: 
2024-01-19 08:58:41.392 DEBUG (SyncWorker_8) [pymodbus.logging] Retry on empty response - 3
2024-01-19 08:58:41.392 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING_FOR_REPLY" to "RETRYING"
2024-01-19 08:58:41.692 DEBUG (SyncWorker_8) [pymodbus.logging] Sleeping 0.3
2024-01-19 08:58:41.693 DEBUG (SyncWorker_8) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 08:58:46.694 DEBUG (SyncWorker_8) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 08:58:46.695 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 08:58:56.738 DEBUG (SyncWorker_8) [pymodbus.logging] No response received, Expected 7 bytes Received 0 bytes !!!!
2024-01-19 08:58:56.738 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2024-01-19 08:58:56.738 DEBUG (SyncWorker_8) [pymodbus.logging] RECV: 
2024-01-19 08:58:56.738 DEBUG (SyncWorker_8) [pymodbus.logging] Retry on empty response - 2
2024-01-19 08:58:56.739 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING_FOR_REPLY" to "RETRYING"
2024-01-19 08:58:57.339 DEBUG (SyncWorker_8) [pymodbus.logging] Sleeping 0.6
2024-01-19 08:58:57.340 DEBUG (SyncWorker_8) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 08:59:02.341 DEBUG (SyncWorker_8) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 08:59:02.343 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 08:59:12.350 DEBUG (SyncWorker_8) [pymodbus.logging] No response received, Expected 7 bytes Received 0 bytes !!!!
2024-01-19 08:59:12.350 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2024-01-19 08:59:12.350 DEBUG (SyncWorker_8) [pymodbus.logging] RECV: 
2024-01-19 08:59:12.350 DEBUG (SyncWorker_8) [pymodbus.logging] Retry on empty response - 1
2024-01-19 08:59:12.350 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING_FOR_REPLY" to "RETRYING"
2024-01-19 08:59:13.551 DEBUG (SyncWorker_8) [pymodbus.logging] Sleeping 1.2
2024-01-19 08:59:13.552 DEBUG (SyncWorker_8) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 08:59:18.553 DEBUG (SyncWorker_8) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 08:59:18.555 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 08:59:28.590 DEBUG (SyncWorker_8) [pymodbus.logging] No response received, Expected 7 bytes Received 0 bytes !!!!
2024-01-19 08:59:28.590 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2024-01-19 08:59:28.590 DEBUG (SyncWorker_8) [pymodbus.logging] RECV: 
2024-01-19 08:59:28.590 DEBUG (SyncWorker_8) [pymodbus.logging] Processing: 
2024-01-19 08:59:28.590 DEBUG (SyncWorker_8) [pymodbus.logging] Getting transaction 1
2024-01-19 08:59:28.595 DEBUG (SyncWorker_8) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2024-01-19 08:59:28.595 DEBUG (SyncWorker_8) [homeassistant.components.modbus.modbus] Pymodbus: modbus_hub: Error: device: 1 address: 11201 -> Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response
2024-01-19 08:59:29.612 DEBUG (SyncWorker_1) [pymodbus.logging] Current transaction state - TRANSACTION_COMPLETE
2024-01-19 08:59:29.612 DEBUG (SyncWorker_1) [pymodbus.logging] Running transaction 3
2024-01-19 08:59:29.613 DEBUG (SyncWorker_1) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 08:59:29.613 DEBUG (SyncWorker_1) [pymodbus.logging] Changing state to IDLE - Last Frame End - None Current Time stamp - 1705651169.613104
2024-01-19 08:59:29.615 DEBUG (SyncWorker_1) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 08:59:29.617 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 08:59:39.630 DEBUG (SyncWorker_1) [pymodbus.logging] No response received, Expected 7 bytes Received 0 bytes !!!!
2024-01-19 08:59:39.631 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2024-01-19 08:59:39.631 DEBUG (SyncWorker_1) [pymodbus.logging] RECV: 
2024-01-19 08:59:39.631 DEBUG (SyncWorker_1) [pymodbus.logging] Retry on empty response - 3
2024-01-19 08:59:39.631 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "WAITING_FOR_REPLY" to "RETRYING"
2024-01-19 08:59:39.932 DEBUG (SyncWorker_1) [pymodbus.logging] Sleeping 0.3
2024-01-19 08:59:39.932 DEBUG (SyncWorker_1) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 08:59:44.933 DEBUG (SyncWorker_1) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 08:59:44.934 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 08:59:50.214 WARNING (MainThread) [aioecowitt.server] Unhandled sensor type heap value 123000
2024-01-19 08:59:50.216 WARNING (MainThread) [aioecowitt.server] Unhandled sensor type soilad1 value 178
2024-01-19 08:59:54.980 DEBUG (SyncWorker_1) [pymodbus.logging] No response received, Expected 7 bytes Received 0 bytes !!!!
2024-01-19 08:59:54.981 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2024-01-19 08:59:54.981 DEBUG (SyncWorker_1) [pymodbus.logging] RECV: 
2024-01-19 08:59:54.981 DEBUG (SyncWorker_1) [pymodbus.logging] Retry on empty response - 2
2024-01-19 08:59:54.981 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "WAITING_FOR_REPLY" to "RETRYING"
2024-01-19 08:59:55.582 DEBUG (SyncWorker_1) [pymodbus.logging] Sleeping 0.6
2024-01-19 08:59:55.583 DEBUG (SyncWorker_1) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 09:00:00.585 DEBUG (SyncWorker_1) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 09:00:00.586 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 09:00:10.611 DEBUG (SyncWorker_1) [pymodbus.logging] No response received, Expected 7 bytes Received 0 bytes !!!!
2024-01-19 09:00:10.611 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2024-01-19 09:00:10.611 DEBUG (SyncWorker_1) [pymodbus.logging] RECV: 
2024-01-19 09:00:10.612 DEBUG (SyncWorker_1) [pymodbus.logging] Retry on empty response - 1
2024-01-19 09:00:10.612 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "WAITING_FOR_REPLY" to "RETRYING"
2024-01-19 09:00:11.812 DEBUG (SyncWorker_1) [pymodbus.logging] Sleeping 1.2
2024-01-19 09:00:11.813 DEBUG (SyncWorker_1) [pymodbus.logging] SEND: 0x1 0x3 0x2b 0xc1 0x0 0x1 0xdc 0x12
2024-01-19 09:00:16.814 DEBUG (SyncWorker_1) [pymodbus.logging] New Transaction state "SENDING"
2024-01-19 09:00:16.815 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-19 09:00:26.854 DEBUG (SyncWorker_1) [pymodbus.logging] No response received, Expected 7 bytes Received 0 bytes !!!!
2024-01-19 09:00:26.854 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "WAITING FOR REPLY" to "PROCESSING REPLY"
2024-01-19 09:00:26.854 DEBUG (SyncWorker_1) [pymodbus.logging] RECV: 
2024-01-19 09:00:26.854 DEBUG (SyncWorker_1) [pymodbus.logging] Processing: 
2024-01-19 09:00:26.855 DEBUG (SyncWorker_1) [pymodbus.logging] Getting transaction 1
2024-01-19 09:00:26.856 DEBUG (SyncWorker_1) [pymodbus.logging] Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"
2024-01-19 09:00:26.856 DEBUG (SyncWorker_1) [homeassistant.components.modbus.modbus] Pymodbus: modbus_hub: Error: device: 1 address: 11201 -> Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response

Additional information

Danfoss Documentation: Link Modbus Poll settings: Screenshot 2024-01-19 090625 Screenshot 2024-01-19 091111

home-assistant[bot] commented 7 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 7 months ago

This is not a bug in the modbus integration!

your device is not responding, maybe because you use a wrong framer.

Closing as not being a bug,

ND1988 commented 7 months ago

Any hint where I can get some help? Thanks!

janiversen commented 7 months ago

This is not a channel for support, only for bug reporting...try the user forums.

ND1988 commented 7 months ago

Root cause of my problem was my abandoned MBus project. The wMBus Addon tried to communicate over the USB to Modbus-Adaptor at /dev/ttyUSB parallely to the Modbus Integration. As soon as I stopped the wMBus Addon, data could also be received. Turning the wMBus Addon on again replicates the error of no data received.

janiversen commented 7 months ago

Of course the usb adapter cannot be shared. Closing