Hello, ever since upgrading from 2023.6.x to 2023.8.1 the modbus sensor keeps disconnecting and becomes unavailable. When I restart modbus via developers tools menu then it goes online again for a while. Any idea what might be casuing this? All was OK with previous versions. Updated now to 2023.8.2 to see if it will help…
Hi @raenji-sk did you ever get a resolution to this? My TCP Modbus also appears to disconnect after a while, it’s been working for years and the only change to my environment is HA version - same as you, a restart in dev tools brings things back up.
hi, I have the same problem. I use modbus for my SMA inverter and the sensors goes into unavailable state after some time.
I used the integration over a year without problems and now with the 20.23.9 update I got these errors. Only error I found:
2023-09-10 11:07:51.844 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.modbus
2023-09-10 15:34:27.937 ERROR (SyncWorker_2) [homeassistant.components.modbus.modbus] Pymodbus: sma: Modbus Error: [Input/Output] No Response received from the remote slave/Unable to decode response
2023-09-10 20:34:09.546 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'modbus_hub'
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 236, in async_restart_hub
KeyError: 'modbus_hub'
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 236, in async_restart_hub
KeyError: 'modbus_hub'
2023-09-10 20:34:24.441 INFO (MainThread) [homeassistant.components.modbus] Modbus reloading
2023-09-10 20:34:24.441 WARNING (MainThread) [homeassistant.components.modbus.modbus] modbus sma communication closed
2023-09-10 20:34:24.457 INFO (SyncWorker_10) [homeassistant.components.modbus.modbus] modbus sma communication open
If I reload the modbus service, sensors are available again.