sfstar / hass-victron

Integration for Home Assistant to fetch data from the victron gx device via modbusTCP
Apache License 2.0
160 stars 24 forks source link

sensor resetting to 0 on inverter disconnect #143

Open Daniel-Peeeh opened 8 months ago

Daniel-Peeeh commented 8 months ago

problem: values of pv-inverters overall produced kwh from time to time reset to 0. this happens

solution in Hass could be to create a filtered sensor. See solution here: https://community.home-assistant.io/t/how-to-prevent-entity-from-resetting-to-0/369363/4

for me it would be bad solution to create new sensors. i already have 1 year of data collected for the sensors created by this addon. removing them from energy dashboard is not an option.

is there a way to prevent the existing entities of my 3 inverters to reset? a filter to not set 0 values would be enough.

sfstar commented 1 month ago

Thank you for opening this issue. A few questions to better understand the problem:

Daniel-Peeeh commented 1 month ago

Hey, thanks for response. grafik Screenshot is showing the SMA inverter sensor inside Victron connection last night. Value is going down to zero for a while and returning to old value afterwards. In Hass statistics this creates the 5900kwh production entry when returning to the higher value. In VRM I can see the inverter's Yield and it shows nothing in that night. Also the total produced kwh in VRM are correct and not showing the additional amount of 59xx kwhs.

This is randomly happening to all my inverters (1x SMA, 2x Hoymiles, 1x Sungrow). Connection in Venus OS is done by dbus (Hoymiles, Sungrow) and native SMA connection. After this longer period of time, i can say that it is happining far more often to the SMA than the others. But I have no idea why.

I do a correction of my statistics data everytime this happens. In the meantime HASS introduced the feature to search for the high statistics values, which makes it much more easy to find them. But still I would prefer a stable solution ;)

sfstar commented 1 week ago

I get your struggles. Had the same issue with my goodwe inverter that randomly (daily) reset itself to 0 and immediatly after spiking back up to the previous value. Gets really annoying real fast (to fix the statistics data). I will look further into the issue to how we can prevent the statistics data from being contaminated. Do the affected inverters stay online during the entire night?