cdpuk / givenergy-local

Home Assistant integration for local access to GivEnergy inverter and battery systems
MIT License
47 stars 14 forks source link

Incorrect data reported #21

Closed alfwro13 closed 1 year ago

alfwro13 commented 1 year ago

I have seen this on several occasions when my battery level is reported empty and a couple moments later it reports back the correct values. This is clearly visible when the data is displayed in a form of a graph. Thanks

ianfretwell commented 1 year ago

Yes, I see the same - I just presumed it was due to failures in communicating with the battery itself though...

alfwro13 commented 1 year ago

That is my guess as well - but it would be nice if this was better handled - i.e. instead of recording 0 as it is the case with the sensor.battery_charge it would be better to ignore that value.

JamesSwift commented 1 year ago

I've had random extreme values come through for energy consumption, battery charge, and battery percentage. For example today my battery was at 32,000% for a short time...

cdpuk commented 1 year ago

This is indeed a problem. Unfortunately the attempt to fetch data reports success, yet provides garbage values. Some effort has already gone in to detecting truly impossible values so they can be ignored, but perhaps more can be done here. This is surprisingly difficult as values such as 0% SOC, 0W, while unlikely, are technically valid. The SOC > 100% is something that could be detected, but that alone won't be enough to catch them all.

I'll keep an eye on mine and try to work out some options.

JamesSwift commented 1 year ago

Thank you. I was so happy to find your integration, thanks for all your hard work.

On Feb 1 2023, at 9:43 pm, cdpuk @.***> wrote:

This is indeed a problem. Unfortunately the attempt to fetch data reports success, yet provides garbage values. Some effort (https://github.com/cdpuk/givenergy-local/blob/master/custom_components/givenergy_local/coordinator.py#L75) has already gone in to detecting truly impossible values so they can be ignored, but perhaps more can be done here. This is surprisingly difficult as values such as 0% SOC, 0W, while unlikely, are technically valid. The SOC > 100% is something that could be detected, but that alone won't be enough to catch them all. I'll keep an eye on mine and try to work out some options. — Reply to this email directly, view it on GitHub (https://github.com/cdpuk/givenergy-local/issues/21#issuecomment-1412776360), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAP33TIJNSVQPKSSZ36G5CTWVLKIFANCNFSM6AAAAAAUEDTT24). You are receiving this because you commented.

cdpuk commented 1 year ago

By some luck I had one of these bad data points a few days ago. There's some slightly tweaked logic in v1.6.1 that will improve things a bit. Happy to revisit if it's still a problem.