huawei_solar icon indicating copy to clipboard operation
huawei_solar copied to clipboard

Slow reading data

Open galtamur opened this issue 1 year ago • 1 comments

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?

galtamur avatar Apr 08 '23 10:04 galtamur

As an alternative, do you think it's possible to parallelize the "get" calls?

galtamur avatar Apr 08 '23 10:04 galtamur