wlcrs / huawei_solar

Home Assistant integration for Huawei Solar inverters via Modbus
GNU Affero General Public License v3.0
543 stars 88 forks source link

[Bug?]: Data sometimes not valid #435

Closed t0bse closed 1 year ago

t0bse commented 1 year ago

Describe the issue

i am runnig this integration for a while now, since a few days we got bad weather here in germany, so sometimes i have the sun changing in one minute for a few times.

now i noticed, that the sensors are wrong sometimes. (i think it's only happening if the clouds are coming/going)

see screenshots, all values have the same timestamp.

may also be a huawei problem? it seems like the values are not saved at the same second, one of the both values seems to be a few seconds older, sometimes.

inverter_active_power: image

power_meter_active_power: image

my sensor calculates "inverter minus power_meter active power" and so it says image

i can also see this the other way: inverter_active_power: image power_meter_active_power: image so my sensor: image

Bescribe your Huawei Solar Setup

Inverter Type: SUN2000-10KTL-M0 Inverter Firmware version: V100R001C00SPC153 SDongle present: yes Power meter present: three phase Battery: None Battery Firmware version:

How do you connect to the inverter?

Via the SDongle, wired connection

jires commented 1 year ago

I'm experiencing same issues. I have figured out, that sometimes Integration has problems to read all registers and retrying. Those registers which are not read at the first time, cannot be updated together with others registers on pooling time, so there can be 2 options. Either they will be "unavailable" until they get new reading, or they will keep current value. Thankfully to newly changes, they keeping current value. Unfortunately, it can be a situation, where different registers values are "shifted" in time for some seconds, therefore is mismatch in values when they changing very fast.

I think this is good trade off, what we get from integration and what inverter/usb dongle is capable of deliver. Only way to avoid this is to turn off completely all those registers which are not used/ not essentials, and make less load on Modbus module in the inverter.

wlcrs commented 1 year ago

Thank you @jires for the fine explanation.

This integration just exposes what it can read from the inverter. I batch-read as much as possible to get consistent values. If the values that you see are strange, it is the fault of the inverter, not of the integration.