configurable data reading for each data point #676
Replies: 1 comment 1 reply
-
TL;DR: Increasing configurability means increasing complexity, so we need to strike a balance. Due to how requests are batched, it does not make sense. The long story: Many modbus registers are requested in batch, meaning that reading all power meter registers is 1 call to the inverter, reading all inverter registers is up to 3 calls. Batching requests proves to be very efficient: update times are mainly dictated by the amount of calls, not by the amount of registers read in each call. Before your suggestion would yield any actual improvement, you already need to be aware of the exact register layout to see if it is technically possible to improve performance. I think that 99% of the users does not want to do such a deep dive into the actual process. Say that you are only interested in a high speed update of 2 sensors which correspond with registers number 32001 and 32016, then that will bulk request all 16 registers 32001-32016: it is faster than doing 2 separate requests instead. Note that this "limitation" already applies to the current approach of disabling sensors: if you disable all sensors which correspond to register numbers 32002 to 32015, this will yield no change to the request being made to the inverter. The exact logic to compute which calls are batched can be found here: https://github.com/wlcrs/huawei-solar-lib/blob/216e27b70ab3d8b7d9e08a581219fc5a15f55c93/src/huawei_solar/bridge.py#L252 Starting from v1.4.0 it will be possible to configure a separate refresh interval for inverter, power meter and battery information. That makes sense as for each of the 3, separate register ranges are being queried. The downside is that users that want to customize their update speed already need to make 3 automations instead of 1. That is already quite a big increase in user-visible complexity! 😔 |
Beta Was this translation helpful? Give feedback.
-
As not all of the available Data from ModBuis is needed by every readout (e.g. AC Voltage level of the phases, daily yield, internal temperature) wouldn't it make sense to to have a selector for every data point to select how often (every 1st, 2nd, 3rd, 4th, xth reading) this data should be read via modbus? Actually you only have the option to deactivate a data point completely. overall you could create a Modbus reading which would fit your specific needs for automations, data calculations and data visualisations.
Beta Was this translation helpful? Give feedback.
All reactions