I am trying to get lights to work with HA that are controlled over Modbus TCP. The configuration is like
- name: Treppenlicht
type: rtuovertcp
host: 192.168.178.47
port: 502
timeout: 10
lights:
- name: TRLSW
device_address: 1
unique_id: TreppenlichSW
address: 1
write_type: holding
verify:
input_type: holding
address: 1
But HA has these log lines for it:
2024-06-07 16:55:38.028 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: Treppenlicht: Error: device: 1 address: 1 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries
2024-06-07 16:55:38.028 WARNING (MainThread) [homeassistant.components.modbus.modbus] modbus Treppenlicht communication closed
2024-06-07 16:55:38.038 INFO (MainThread) [homeassistant.components.modbus.modbus] modbus Treppenlicht communication open
2024-06-07 16:55:44.025 ERROR (MainThread) [pymodbus.logging] Cancel send, because not connected!
2024-06-07 16:55:44.025 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: Treppenlicht: Error: device: 1 address: 1 -> Modbus Error: [Connection] Client is not connected
2024-06-07 16:56:08.029 DEBUG (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: Treppenlicht: Error: device: 1 address: 1 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries
2024-06-07 16:56:14.027 ERROR (MainThread) [pymodbus.logging] Cancel send, because not connected!
The device is online and responding to Modbus requests from another client program, but does not log any attempt from HA to connect at all.
- how to find out more details?
- how to fix that?
[Update]
I added another device, a sensor from a different vendor:
- 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
The reaction is identical, though:
2024-06-07 17:36:41.096 INFO (MainThread) [homeassistant.components.modbus.modbus] modbus Treppenlicht communication open
2024-06-07 17:36:41.100 INFO (MainThread) [homeassistant.components.modbus.modbus] modbus OVAG communication open
2024-06-07 17:36:50.274 ERROR (MainThread) [pymodbus.logging] Cancel send, because not connected!
2024-06-07 17:36:50.274 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: Treppenlicht: Error: device: 1 address: 1 -> Modbus Error: [Connection] Client is not connected
2024-06-07 17:36:53.277 ERROR (MainThread) [homeassistant.components.modbus.modbus] Pymodbus: OVAG: Error: device: 4 address: 1 -> Modbus Error: [Input/Output] ERROR: No response received after 3 retries
Must be something general, so it seems.