huawei_solar
huawei_solar copied to clipboard
Slow reading data
Hi,
i have noticed that the component takes something around 15 seconds on average to retrieve all the data from the inverter.
Every "get" is taking several tenths of a second.
Moreover, sometimes (once a day or something like that) i receive results out of scale, or zero.
Isn't it possible to have a single reading of all the registers? Or a reading of multiple registers? This could reduce overall update time and it could also be easier to eventually skip a complete lecture if some data are out of scale.
I'm asking this because I read that the huawei_solar library has a "multiple_get" function, which is not working inside the component (i tried something like :
lettura_multipla = (await self._inverter.get_multiple(["pv_01_current", "pv_01_voltage", "pv_02_current", "pv_02_voltage"])).value
but i receive an error:
AttributeError: 'AsyncHuaweiSolar' object has no attribute 'get_multiple'
Your thoughts?
As an alternative, do you think it's possible to parallelize the "get" calls?