Crazy energy values?

Hi All,

I invested in the Aquara Zigbee double UK plugs when they came up on offer earlier in the year, but am having trouble getting sensible values for energy out of them.

They have power monitoring built in and all of it reads absolutely fine via zigbee 2 mqtt. I have made an integral sensor helper to track this as energy using the left Reimann sum (recommended on another post) but this is creating absolutely crazy energy values.

For example today, the kettle was boiled twice at a mean power of 1.1kW. Assuming it boiled for a minute, this would be 0.018kWh. However, my integral believes this to be 88.66kWh.

Now I suspect this is to do with the way in which the integral is calculating the area under the graph, but I’ve also tried the trapezoidal rule to no avail.

What am I doing wrong? Any help would be greatly appreciated.
Photos below show what I’m seeing.


The default integration method is trapezoidal which will cause major approximation errors for that sort of spiky on-off power use.

Use method : left to minimise these approximation errors in the integral helper.

Thanks for the reply but assuming you mean left riemann sum then I am but are still getting these values :disappointed:

Share your Riemann Sum config.

I’m using the UI, sorry if it’s something obvious I’m missing…


What happens if you change the unit to Wh?

Which model is this? Can’t seem to find them on the Z2M device dB. Only Aqara plugs listed are the H1 & T1 models with Chinese sockets, and they natively report both power and energy

I get values of the order of 1000 x the original :frowning:

These are them:

Aurora Lighting AU-A1ZBDSS control via MQTT | Zigbee2MQTT

I feel it’s somewhere along the lines of how frequently the power figure is sampled. Maybe it’s a z2mqtt setting?

and

Are totally different manufacturers.

Unfortunately, it seems like you stumbled on one of the very few zigbee devices which measure power but not energy. Sorry - was hoping to help you avoid having to mess around with creating a helper but it seems like you have no other option.

Dam my dyslexia haha, yeh I meant aurora. I’ve made a helper, quite a few on here use them, but I just need help with the helper.

Reasonably confident it’s to do with how often it polls the power figure, so if the kettles pulling 1200W for example, and it doesn’t poll the plug for another 30 minutes. That’d be 600kwH.

Where are you getting this claim from? The integral state is the total lifetime consumption since the integral was created.

The graph you showed of the integral shows it only increasing by .1kWh when the power updates. It looks reasonable to me.

Sounds like I’m misunderstanding how it works. I assumed it’d be on a per day basis, but clearly not. Should I be doing something to reset this helper each day?

Either way, 88.76kWh for a 2kW kettle seems pretty unreasonable. My maths, which could be wrong, says that’s been running a total of 44.4 hours… Which it definitely hasn’t.

Yes, the riemann sum helper never resets. If you want a daily measurement, you need a second utility_meter helper based on the riemann sum sensor.

Without seeing the history where this happened, can’t really speculate any further about it. Maybe the unit was changed or something in the past.

Appreciate it, thanks for the help.

Ok, I’ve done a few little tweaks and a load of reading. For some reason though I just can’t get my head around this energy monitoring stuff - which is the fun part for me.

Am I right, for my power monitoring plugs, doing the following…

  1. For each plug, set up an integral helper so HA can record (cumulative) energy
  2. (Optional) set up a group, to monitor the (cumulative) energy for a set of plugs
  3. Set up a utility helper for said integral, so I can show this in the energy dashboard as a daily energy usage

Sorry for my ignorance, really want to get this sorted, but haven’t found an idiots guide!

For each plug, set up an integral helper so HA can record (cumulative) energy

Yeah this sounds good, if you don’t have that available.

  • (Optional) set up a group, to monitor the (cumulative) energy for a set of plugs

Generally would not recommend trying to do math or summations on energy values, there are a lot of pitfalls that trip people up. Just add all your individual integrals to the energy dashboard as devices.

Set up a utility helper for said integral, so I can show this in the energy dashboard as a daily energy usage

You don’t need to do this for the energy dashboard, it does not need you to reset the values, just give it the integral sensors. It will handle breaking this data down into daily, weekly, monthly values depending on the time range selected.

The only reason you might want a daily utility meter is if you want to use that entity’s value for something outside of the energy panel.

Thanks, that really clears things up. Appreciate the help.