I have raised an issue on github about the energy dashboard not showing data for 23:00 → 00:00
The last entry is for 11:00pm. The first entry in the next day is 1200am which is really the data that should be in the 23:00 > 00::slot
Are you sure? there’s 24 separate bars each day so there’s data for every hour?
Yes.Have you read my issue? I explained this in the issue.
Each hour is posted to the graph at the 12th minute past the hour on the hour. The last one is 11pm.
If you have a look at your first bar in the 24 bars its says 12am. If the first bar is 12am then that means its the previous hours data.
Have read. I had to explain my think in there, The graph looks back it cant see the future
Additionally
In my case the data is pretty much the same as my electricity usage between 23:00 → 00:00 and 00:00 → 01:00 is usually the same as we are in bed asleep but sometimes my solar HWS booster cuts in during these times and can have an impact.
Have you tried looking at the statistics database using SQLite web to get a better idea of what is going on behind the scenes?
Example.
This is my grid import energy sensor statistics
SELECT *
FROM "statistics"
Where metadata_id = 8
Order by created desc
All times are in utc by the way.
I don’t have that level of skill. I don’t know how to do that.
I think I can see what you are saying though.
Are saying that the data is stored correctly but reported incorrectly or vice versa?
I am monitoring the pH level of my pool water with the statistics card and it does the the same thing.
Your database should be no different to mine when it stores data, what does your data base store the period from 23:00 to 00:00 as? The energy level may be different but the date & times should be the same relatively I would think?
There are 24 bars, there are 24 hours shown.
The 11:00 is the hour the bar starts at and covers the period 11-12. Look at the period that ran at 21:12 in the raw data in the post above yours. The start of the period for that calculation is 20:00
The title should really say 11-12 for clarity.
Yes there are 24 bars.
The first bar says 12am the last bar is 11pm
The data is posted at 12 minutes past the hour every hour. This means it’s posting the last hours stats for that period.
I have watched the data post and that is exactly what it does. Refresh your browser about 12-13 minutes after the hour and you will see it update.
The machine cannot see into the future.
They are posted 12 minutes past the hour - for the hour prior. The statistics that run at 12.12am calculates and posts the usage for the period 11pm-12am.
The data labelled 7am posted covers the period 7-8am, not the period.
I see what Ron is saying. The very first bar in the graph for each day is showing power from the previous day in the period 23:00-23:59:59 … So in other words, on a day’s graph, you see the first bar is the last hour from the day before, then 23 bars from the current day.
“The statistics that run at 12.12am calculates and posts the usage for the period 11pm-12am.”
Ok I can see that and agree but it posts it in the graph as 12am on the next day when really it’s the previous days data.
It’s not though… or at least, that’s certainly not what I’m seeing with mine. My bars are posted as expected. The one processed at 12:12am is posted as 11pm the previous day as expected.
Same as during the day, the data for the period 8am to 9am will not be posted until the run at 9.12am
Well I am really confused.
The labeling is confusing at the least.
If I am wrong then the issue I created on github will be closed and hopefully explained by the people who maintain the code.
I just saw what I thought was an error and wanted to report it
I see the point being made.
The 11pm figures are from 11pm-12am and are displayed on the day before.
The 12am figures are from 12am-1am and are displayed on the next day.
They’re not displayed though. Is is because people think that the statistics cover the period 11.12 to 12.12pm (as an example of the hourly period)?
Although the run is done at that time, it only takes into account statistics recorded during the the hour (i.e. 11.00:00 to 11:59:59)
Ah yes you are right.
I am sitting here and it’s 9am and I’m still looking at a graph for 7am. Surely it can’t be 2 hours late.
Looking at sql database which shows times in utc. My Timezone is 10 hours ahead
So the line that says created at 22:12, if I add 10 hours that makes it 8:12 am created. And it’s for the period starting at 7am and finishing at 8 am. The label for this data is 7am
The 9.12 run processes the data from 8am to 9am. So at 9.12 you will see the 8am data appear because it covers the period 8am to 9am.
The 7am data shows the period 7am to 8am.
It should be better labelled to be clear the period it covers rather than just the start time of the period.
I Agree this is confusing - I retract my statement above though cause after further checks I just did I believe it is displaying correctly.
To provide it - I have a separate log that graphs my power usage - overnight my Hot water is heated by offpeak electricity. Last night the hot water started to be heated between these times 22:00 -23:35 and 01:55 - 02:11.
This matches exactly the Energy graphs for today - note there is no large spike in the first bar, so that data is showing midnight to 1:00am, the second bar is slightly increased due to the 3kw heater cutting in for a few minutes at the end of the hour, then a large spike from 2:00am
The “issue” is the graph labelling is causing the confusion.
Ok, it’s now 9:17 and the data for 8am -9am just got created at 9:12am
The graph now shows this as 8am
Here is the sql backend data in utc. Add 10 hours and that is what the time is locally
So when you see 11pm on the graph, that should represent the data that occurred between 11pm and 12am for that day. I think that the only issue is the labelling isn’t clear.
In essence, it takes 1.2 hours (1h 12m) to display the last hour of data which will be labelled as the hour the sample started recording at.
OK I think I can now understand it. I was mislead by the labeling.
The penny dropped when you said it was the start time not the finish time as I was assuming.
Thank you for having the patience and perseverance to explain it to this 70 yr old fella.
Would you care to update the “issue”?
I have posted a comment in the issue about the labeling.
Your explanation will be far better than mine
Glad that confusion is sorted.