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
70.85k stars 29.54k forks source link

Utility meter not zeroing out corectly at midnight #115273

Open BrackenAlistair opened 4 months ago

BrackenAlistair commented 4 months ago

The problem

I have multiple utility meters created, all set up to daily cycle. Today some of the meters (not all of them) restarted to zero at midnight as they were supposed to but 10 minutes later they all jumped back to last value from previous day and then proceded to measure from that value as if no restart happened. Snímek obrazovky pořízený 2024-04-09 11-09-30 Snímek obrazovky pořízený 2024-04-09 11-20-46 Snímek obrazovky pořízený 2024-04-09 11-21-50

What version of Home Assistant Core has the issue?

core-2024.4.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Utility Meter

Link to integration documentation on our website

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

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 4 months ago

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

Code owner commands Code owners of `utility_meter` 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 utility_meter` 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)


utility_meter documentation utility_meter source (message by IssueLinks)

dgomes commented 4 months ago

I would need some logs and the graphs from the source sensors

BrackenAlistair commented 4 months ago

Here are the graphs, they are in coresponding order to those in first post: Snímek obrazovky pořízený 2024-04-09 13-16-16 Snímek obrazovky pořízený 2024-04-09 13-16-41 Snímek obrazovky pořízený 2024-04-09 13-19-57

Here is history csv for those values: history (2).csv Here is which values are the utility meter tied to:

All of the source sensors are Riemann sum integrals.

The logs will be more of a problem, they are already overwriten by newer ones. I will however be checking for problems this midnight and if the problem reapears I will post the logs.

BrackenAlistair commented 4 months ago

Sorry about the closing, misclicked.

andiukas commented 3 months ago

Same problem

dgomes commented 3 months ago

I'm waiting for https://github.com/home-assistant/core/pull/114967 to get more details from all your setups

bobstaff commented 3 months ago

Similar issue here. It only happenes occasionally though, but lately it's more often. 3 times in the last 6 days. Essentially the reset is after midnight so the utility meter carries over the previous days total energy usage to 12am-1am graph for the next day.

Screenshot_20240527_081537_Chrome Screenshot_20240527_084927_Chrome

For clarity, the top graph is the total of several sensors in my system, the second is the graph of one sensor, but all sensors are affected the same way at the same time. Clock settings are correct. I'm fairly new at HA so I'm not sure what log files to attach. Any guidance to help solve the problem is appreciated.

andiukas commented 1 month ago

any solution ?

dgomes commented 1 month ago

Have you upgraded to 2024.7 ?

If yes, please download the diagnostic available in the device/integration webpage and share (you can send it to me in discord)

bobstaff commented 1 month ago

I have found a workaround. In Developer Tools, select Statistics and from there I go to each sensor that measures power (kwh) over midnight, then click the icon on the far right. This opens a box. I set the time for 12:00 am on the date in question, usually the same morning. I can see the errant reading and other reading 5 minute before and after. I correct the wrong amount and close the box. It recalculated the sums and adjusts the graph. I have 17 sensors so it takes me about 10 minutes to do them all.