MQTT and Energy dashboard data lagging

Hi all

I hope I’m in the right place.

I have setup Home Assistant with zigbee2mqtt. In zigbee2mqtt I’ve got an Schneider Electric PowerTag that measure the power usage for my electric car.

I can see in the log, and when connecting directly to the MQTT server, that the PowerTag report the values every 5 seconds to the mqtt server, but when I look up the data in the Energy dashboard, and History, the data reporting is not consistant. There can be seconds and even minutes between every log.

I have installed mariaDB and using commit_interval: 0 in the recorder settings to see if that helps, but that don’t do anything.

As you can see on the screenshot, it’s not close to an straight line. On the given time, I’m pulling 10kW, but as you can see, sometimes there goes a long time before the data changes.

If I then pull the data from my Home Assistant Glow that’s fitted on my meter, it looks more like what I’m after.

Is there anything I can do, to make it update more consistant?

My issue is that my electric price change every hour, but sometimes there are so much “lag” that the last update of an hour, skips to next hour, where the price are different, so the final calculation is wrong.

I’m running a Supevised installation on an Lenovo M73 with 8gb ram and 500gb ssd, so there should be plenty of power :smiley:

You could try creating your own mqtt sensor manually.

There does seem to be an issue with this device and zigbee2mqtt using some controllers:

Anything odd in your zigbee2mqtt logs?