core: Modbus unavailable after timeout error from SyncWorker in HA Core 2021.7.1
The problem
I have made the adjustment to the new configuration file setup for modbus. Everything functions again. I am using, sensors, switches and climates.
But after a while the modbus connection gets lost and I have to restart HA to get it to work again.
Have tried with different timeout and delay without any changes to the problem.
What is version of Home Assistant Core has the issue?
core_2021.7.1
What was the last working version of Home Assistant Core?
core_2021.6.6
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Modbus
Link to integration documentation on our website
No response
Example YAML snippet
modbus:
- name: hub1
type: tcp
host: 10.10.10.25
port: 502
timeout: 4
climates:
- name: Heru FTX
address: 1
data_type: int
input_type: holding
target_temp_register: 1
count: 1
temp_step: 1
max_temp: 22
min_temp: 15
switches:
- name: Ventilation Overpressure
address: 1
write_type: coil
- name: Ventilation Boost
address: 2
write_type: coil
- name: Ventilation Away
address: 3
write_type: coil
sensors:
- name: FTX Uteluft
input_type: input
address: 1
unit_of_measurement: "°C"
- name: FTX Tilluft
input_type: input
address: 2
unit_of_measurement: "°C"
- name: FTX Frånluft
input_type: input
address: 3
unit_of_measurement: "°C"
- name: FTX Avluft
input_type: input
address: 4
unit_of_measurement: "°C"
- name: FTX Rotor
input_type: input
address: 6
unit_of_measurement: "°C"
- name: FTX Fläkt Tilluft
input_type: input
address: 24
scan_interval: 5
unit_of_measurement: "%"
- name: FTX Fläkt Frånluft
input_type: input
address: 25
scan_interval: 5
unit_of_measurement: "%"
Anything in the logs that might be useful for us?
2021-07-09 17:51:48 DEBUG (SyncWorker_7) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-07-09 17:51:53 DEBUG (SyncWorker_3) [pymodbus.client.sync] New Transaction state 'SENDING'
2021-07-09 17:51:57 ERROR (SyncWorker_3) [homeassistant.components.modbus.modbus] Pymodbus: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)
2021-07-09 17:52:01 ERROR (SyncWorker_7) [pymodbus.client.sync] Connection to (10.10.10.25, 502) failed: timed out
2021-07-09 17:52:01 DEBUG (SyncWorker_7) [homeassistant.components.modbus.modbus] Pymodbus: Modbus Error: [Connection] Failed to connect[ModbusTcpClient(10.10.10.25:502)]
Additional information
I tried to go back to core_2021.6.6 and then of course it works as long as i revert back to the old config files.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 17 (6 by maintainers)
PS. Thanks for staying constructive ! Many people do not understand that bug fixing is a two way street, in general fixing bugs that we cannot reproduce is very difficult, and that is where you and other are very helpful.
Solved on dev and in the coming beta.