Energy usage is delayed or shifted in time in the graphs

Got a meter, also Norway, and discovered this same issue after a day. So not only the few of you seeing this as a limitation in the current Energy feature implementation.

I can’t remember if I mentioned this, but I believe there is development in the works in relation to this. I have no time table on it unfortunately.

That’s good news, thanks :blush:.

Regarding the Tibber integration.
If you do not have Tibber Pulse there are new statistics available from 2022.2 providing cost and consumption. From 2022.3 this is also available if you have Tibber Pulse.
It updates the data back in time and is corrected if your grid company reports updated consumption data.

1 Like

Just want to chime in that I have the same issue. Data gets reported by grid-company owned energy-meter and I believe everyone in Norway has the same meter.

Is there any work around? Like is it possible to manipulate the report time anywhere before data gets written?

We have huge variance in power prices so my grid-cost was off by more than 10% for February and I believe others might get even worse results.

Great to hear that work is being done on this!

Same issue for me, great to hear that something is in the works :+1:

Same issue here. Looks like the data is one hour late.

Yep, same issue here, my gas meter gives it values at exactly 5 minutes past the hour. But it is calculated exactly at the hour, not 12 minutes past (i cant find an official source claiming this either, it seems it’s just persons repeating eachother). I don’t particularly care too much about gas except for the total daily usage which is usually just fine as i don’t normally use heat after 10-ish.

Hi. Did anyone solve this or make a workaround?

Yes, with this workaround my energy usage in HA comply with the graph from the electricity supplier in Norway, plus minus a few per cent. However, when I look at the state history for the current Nord Pool price, it is updated exactly at XX:00:00 for the NEXT hour. So I expect the costs to be miscalculated.

I have Tibber and use the Tibber intergration for electricity price.
From what I can see the daily cost calculation in HA match my Tibber reports within ± 50 øre.

The AMS HAN Home Assistant integrasjon is probably a better solution, but I have not yet tested it.

I have made a work-around for this.
Don’t know how that affects the price calculation.

Since the meters in Sweden (also Norway and Denmark?) use the HAN port, for eg. read consumed energy (accumulated kWh in the meter history), it is also possible to access the actual power (kW).

Then use “Integration - Riemann sum integral” to convert kW to kWh. Then you get the actual consumption in real time.

The disadvantage of this approach is that a possible downtime (in my case the Easee solution… cloud based) does not capture the consumption afterwards to correct it… that data is then lost.

But I will use the Riemann solution in the meantime…I am hoping HA will do some adjustment. The ackumulated kWh from the meter should be the best approach.

I have the same thing happen here on Danish Kamstrup meters. 1 hour off.
Any news on development?

My readings from Kaifa meter is almost always 10-11 seconds after whole hour. I changed the system time in Linux 20 seconds backwards. Now HA sees the received data 10 seconds before new hour kicks in.

This might be helpful, especially if you have some script anyway which fetches the consumption data from the utility company.

1 Like

Some you might already know but there is an EU directive about this Smart Metering and Home Area Network port (HAN port) access. I have updated a Wikipedia page about this:

EU directives are not - unlike regulation, instantly effective in member states. That means that this directive 2019/944 needs to be ratified in member states.

Relevant parts to this thread. Chapter 19 is about Smart metering and consumer:
https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A32019L0944#d1e2607-125-1

Chapter 20:
(a) the smart metering systems shall accurately measure actual electricity consumption and shall be capable of providing to final customers information on actual time of use. Validated historical consumption data shall be made easily and securely available and visualised to final customers on request and at no additional cost. Non-validated near real-time consumption data shall also be made easily and securely available to final customers at no additional cost, through a standardised interface or through remote access, in order to support automated energy efficiency programmes, demand response and other services;

https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A32019L0944#d1e915-125-1

(26) ‘near real-time’ means, in the context of smart metering, a short time period, usually down to seconds or up to the imbalance settlement period in the national market;

Finnish law says “10 seconds or faster”.

All this in practice means HAN-port in meters that has RJ12 modular connector and RS422 signaling, it squirts ASCII text periodically. HAN port has also RTS-input, which is said to allow trigger even faster updates.

Popular smart meters like Landis+Gyr e360 supports this, among some others. See the links at the end of Wikipedia page.

All this has been legislated for home automation systems like Home Assistant, so it would be nice if the actual target software would support it properly, in near real time.

I still have this issue with hours shifted :frowning:
I’m using the AmsToMQTTBridge and the local interface on my ESP8266 shows the usage for the correct hour, as with my power provider’s web interface. In home assistant it’s shifted one hour.

I really bugs me since the spot pricing used for that hour in home assistant i not the correct one and the total calculations on price is off :frowning:

The data from AmsToMQTTBridge is stamped with rtc time at 55 seconds past the hour. But something in HA must handle that the data is for the hour before, as it’s not possibe to get the data before the hour has past.

Provided your meter gives you energy readings every few seconds, you can create your own sensor that will calculate hourly consumption for you.
Just go to Settings->Helpers and create a new integration sensor. Use your energy sensor from AmsToMQTTBridge as input, and a “Metric prefix” of “k”. This will give you a new sensor for your hourly consumption.
Then you use that as input in your energy configuration. It should give you data that is extremely close to the hourly reports from your meter.

Just chiming in with the same issue. Using the integral-sensor is an okay workaround, but it is sensitive to downtime, so it would be better if the energy calculations were delayed by a few seconds/minutes to allow the new data to come in before populating the energy graph.

1 Like

Why not simply add a offset option to the graph to adjust input values corresponding to correct hour?

As long as you are not using realtime power to calculate present consumption, this will always be an issue the way HA calculates.

4 Likes