#Energy meter reports one hour off

1 messages · Page 1 of 1 (latest)

slender ginkgo
#

Energy meters in Norway reports energy usage for the previous hour a few seconds (5-15s) into the next hour. Home assistant records the event for the current hour. In the energy dashboard this reported energy usage does not show up until the next hour passes and when it shows up in the dashboard the data is off by 1 hour.

Is it possible to configure an offset for the energy meter device (or any device reporting anything really) to have the energy usage reported on the correct hour?

rocky mauve
#

Does the integration you have for your energy meter have a scan_interval that would allow you to change how frequently it updates? Easy enough to reduce the polling to say 15 minutes which would reduce your offset but not eliminate it
You might also be able to force it to get queried early with the homeassistant.update_entity service at say, a minute past the hour
I've looked for a way to delay/control an integrations polling time offset before but haven't found anything neat, so those are the only two solutions I've used.

crystal aspen
#

Make sure that the system time of everything is correctly set

#

I don't think you can back date data this easily in homeassistant

silent bloom
#

If you only have hourly updates of your energy data, it will always show in the next hour.
HA sees a state change on eg 08:00:15. So it will show it in the energy Dashboard on the 8:00 - 9:00 bar.
You can't do anything about that.

silent bloom
crystal aspen
#

Wonder if he could trick it by setting the timezone an hour in advance

#

Would mess up other metrics

normal sail
#

With an integration I guess the data could be retroactively inserted into the past for statistics, but it's not something exposed to end users.

slender ginkgo
#

Hey. Thanks for all the suggestions. I believe the current known work arounds are to change the time on the server to be a bit off, so it registers on the correct hour or use a different way of collection all together. I have a energy meter connected to the HAN port on the fuse box and it is the energy distributor that controls the frequency and time of collection. The energy meter does send much more frequent requests via Zigbee (I'm using zigbee2mqtt to get the events into HA). There is no possibility to change when collection happens.

Timezone or other time trickery probably would make everything else in home assistant wrong :-/.

normal sail
#

If this really affects the whole country of Norway maybe someone can come up with an appropriate integration to insert statistics to the correct hour.