ksheumaker / homeassistant-apsystems_ecur

Home Assistant custom component for local querying of APSystems ECU-R Solar System
Apache License 2.0
166 stars 42 forks source link

ECU-R shows entire lifetime energy consumed during one hour in the energy card #124

Closed mackowskim closed 1 year ago

mackowskim commented 1 year ago

Hi,

Home Assistant version: 2022.4.6 Integration version: 1.2.20 (pre-release)

I suppose there is a glitch in the energy calculation, not sure if that's on the ECU-R integration side or home assistant itself, but sometimes during oner hour calculation shows entire lifetime energy production instead of the calculated value.

I've checked the sensor history and it seems it did not use cached data and the device have been working correctly during this time period.

It was also the case in the previous (stable) version of the integration.

obraz

Thanks for your great work so far! Mariusz

HAEdwin commented 1 year ago

I have to dive deeper into this issue for the mean time you should be able to correct these values in HA [Developer Tools] > [Statistics]

mackowskim commented 1 year ago

Thanks for your comment. Going into statistics I think it revealed this glitch root cause: obraz

HAEdwin commented 1 year ago

Unfortunately if all other data is correct I think this is a glitch, and can be corrected in HA [Developer Tools] > [Statistics]. There is no circular redundancy check on the incomming data from the ECU, only a data length check which the integration does use to check on valid data but it only reaches so far. Hope this doesn't happen to often. If you think this issue can be closed, please do.

HAEdwin commented 1 year ago

I'll close the issue. Might something come up - please post a new issue.

arduinopjotr commented 1 year ago

I have the same issue her since a couple of days. I did an upgrade of the ecu-r plugin. After the upgrade it looks like the ECU plugin sometimes write a zero in the entity "sensor.ecu_lifetime_energy" . If the next data is correct again (e.g. 400kWh) Then the statistics will giva a value of 400 because of the delta from 400-0 = 400.
Is it possible that the ECU-R plugin writes a zero when there is no connection to the gateway ? Is it a plan to block the updates of the entity "sensor.ecu_lifetime_energy" if the value is zero. PS The entity sensor.ecu_today_energy" does nog have any gliches.

glitch