core: Reading multiple consecutive modbus registers have a real bad performance and high system load
The problem
Each read is a modbus transaction, causing a higher than needed system load on both the HA server and the modbus device. When configuring more than 40 sensors (when reading a solar panel inverter) and the HA server is a raspberry pi it is not possible to have a scan_interval of 10 seconds. For power calculations a scan_interval berween 1-5 seconds are needed.
What is version of Home Assistant Core has the issue?
dev
What was the last working version of Home Assistant Core?
all
What type of installation are you running?
Home Assistant Core
Integration causing the issue
modbus
Link to integration documentation on our website
No response
Example YAML snippet
_No response_
Anything in the logs that might be useful for us?
_No response_
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (19 by maintainers)
Of course the modbus protocol supports it (read_coils etc…).
Well good that you only need code for that, but if you had a 16bit relay card, you might want to read all 16bit in 1 request instead of 16 requests.
Nope, I have identical code for all platforms.
in works for binary_sensor (first step).