For those wanting to dig a little further into their Energy visualisation not working, you can use the “SQLite Web” addon to look under the covers at the statistics and how it works. It appears some entities from plugins will have all the appropriate attributes to appear in here, if yours aren’t, check the posts above that mention last_reset:
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
To get started, you will need to install the SQLite Web addon and open it, you should see something like the following after choosing statistics_meta, then content.
statistics_meta appears to be a master lookup table of all your entities that statistics are being collected on, in my case I am interested in #8:
If you then choose statistics - content you will probably see lots of entries however, I have used the query function command: SELECT * FROM "statistics" where metadata_id = 8
to pull up all entries associated with my solar feed in - there is only one because I have been trying to get my OpenEnergyMonitor configuration working despite the lack of documentation.
If you want to reset the statistics of an entity, you can do it here also, because I have been using a “smart plug” in a variety of places I wanted to reset it so it has clean data for the energy integration.
First: I manually locate it’s ID via statistics_meta and find out it is #2.
Then go to the “Query” tab and to make sure I have everything as correct as possible, I type in:
SELECT * FROM "statistics" where metadata_id = 2
and click execute.
DANGER
If that shows the results that I am expecting, to deleted it, I slightly change the command to:
DELETE FROM "statistics" where metadata_id = 2
and click execute.
It then appears that statistics are generated hourly so that is why you need to wait 2 hours for the visualisation to show any information, but if you go in via the SQLite Web addon you should be able to see some sort of value after 1 hours (on my system it shows as on the hour)
To make this slightly more discoverable, this post is about:
OpenEnergyMonitor (emoncms), EnergyManagement, Statistics, SQLite Web, database cleaning