home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.03k stars 28.28k forks source link

Energy dashboard showing high values after update 5.0 and 5.1 #116762

Closed Anonymouse0104 closed 1 week ago

Anonymouse0104 commented 2 weeks ago

The problem

Since the core update 5.0 (and yesterday 5.1) my energy dashboard values are ruined. It has been working for years but for somehow it reads the values wrong. The biggest misread is the PV side, but the grid side is wrong also if I check the sensor changes in de integration (DSMR).

The dashboard: image image

The input sensors: image

The sensors in the integrations: image image image image image

What version of Home Assistant Core has the issue?

2024.5.1

What was the last working version of Home Assistant Core?

2024.4.4

What type of installation are you running?

Home Assistant Core

Integration causing the issue

GoodWE and DSMR

Link to integration documentation on our website

https://www.home-assistant.io/integrations/goodwe

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 weeks ago

Hey there @mletenay, @starkillerog, mind taking a look at this issue as it has been labeled with an integration (goodwe) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `goodwe` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign goodwe` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


goodwe documentation goodwe source (message by IssueLinks)

Anonymouse0104 commented 2 weeks ago

Edit: seems to be aa GoodWE integration fault? The sensor Total PV Generation sets a 0 value every 5 minutes? image

fnurkje commented 2 weeks ago

Same issue started 2nd of may Screenshot_20240504-161540

mletenay commented 1 week ago

Which inverter model ? And please provide some logs around these 0 values.

fnurkje commented 1 week ago

Model: GW5K-DT GoodWe Firmware: 909.909.09 / None

Just turned on debug logging, let you know results tomorrow Screenshot_20240504-223539 Screenshot_20240504-223458

mletenay commented 1 week ago

Hmmm, it seems I might accidentally break the DT inverter code in this commit https://github.com/marcelblijleven/goodwe/commit/f41674ce0a784f77cdbea6a8858765327f18f3c0 Before that, when inverter failed to response properly (weird on its own), the value decoded to None and now it is 0.

maxxie85 commented 1 week ago

I can confirm the same issue. I also have a GW5K-DT on firmware 10.10.0b

mletenay commented 1 week ago

Fix for the above mentioned problem is on the way, but what bothers me a bit is it looks exactly like this ticket https://github.com/home-assistant/core/issues/115837 , but that was reported on 2024.4.1 where there was previous version of the goodwe library ...

Guy-Manuel commented 1 week ago

Same problem here since 2 may, Goodwe GW8K-DT

Anonymouse0104 commented 1 week ago

Fix for the above mentioned problem is on the way, but what bothers me a bit is it looks exactly like this ticket #115837 , but that was reported on 2024.4.1 where there was previous version of the goodwe library ...

Same Inverter and software, I will wait untill the fix

mletenay commented 1 week ago

Sorry for the troubles caused, but it seems there is a bug/problem with DT inverters that they sometimes report 0xFFFF/-1 as value of the total power/energy registers. And recent fix in underlying library which addressed problems with power values on large inverters changed decoding behavior, which was (unintentionally) working around this (not known) DT problem.

To be honest, I have no idea how to fix your energy dashboard data. If my assumptions are correct, the 0 values should be removed and the rest recalculated ? Not sure how to do it or if it is possible at all ...

This fix is already implemented and is waiting for review. If you cannot or do not want to wait for next HA release, the fix is already present in v0.9.9.18 of HACS version of this integration - https://github.com/mletenay/home-assistant-goodwe-inverter

maxxie85 commented 1 week ago

There are 2 ways to fix the dashboard. Restore the backup you hopefully made before the upgrade from 2024.4.

Another way would be via the development tools, statistics. Then find the correct statistics entry. And there you can adjust incorrect entries. But this is a manual job. It does have a tool to show outliers to find them easy, but you still need to manually calculate the correct value.

Guy-Manuel commented 1 week ago

Thanks for the quick support and actions!

On Sun, May 5, 2024 at 6:39 PM mletenay @.***> wrote:

Sorry for the troubles caused, but it seems there is a bug/problem with DT inverters that they sometimes report 0xFFFF/-1 as value of the total power/energy registers. And recent fix in underlying library which addressed problems with power values on large inverters changed decoding behavior, which was (unintentionally) working around this (not known) DT problem.

To be honest, I have no idea how to fix your energy dashboard data. If my assumptions are correct, the 0 values should be removed and the rest recalculated ? Not sure how to do it or if it is possible at all ...

This fix is already implemented and is waiting for review. If you cannot or do not want to wait for next HA release, the fix is already present in v0.9.9.18 of HACS version of this integration - https://github.com/mletenay/home-assistant-goodwe-inverter

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/116762#issuecomment-2094871467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWNZAWSA2O3LH5HMRTTS4NLZAZOFPAVCNFSM6AAAAABHGVZAHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUHA3TCNBWG4 . You are receiving this because you commented.Message ID: @.***>

-- Met vriendelijke groet,

Jan van Sluisveld

sfstar commented 1 week ago

For anyone reading this ticket. The calculated sum value of the statistics starts massively increasing after a 0 value is reported. In order to fix this you can install the sqlite addon select the records for your goodwe entities metadata_id and export them. Fix them in excel and delete the records in HA and import them again + a restart. Unfortunately I found the developer tools statistics to be lacking when it came to correcting the values of the goodwe entities to a correct value. Maybe a good improvement would be to become more strict with the reset when total increasing is selected. Since the reset values aren't being changed while HA treats the 0 being reported as a reset.