IoTaWatt - wh vs wh_accumulated?

Does anyone know what the difference is between the wh and wh_accumulated sensors?

In looking at the change over the past 24 hours…I know from the power company’s meter I seem to average around 60-80kWH in a day in “mild” weather.

According to the IoTaWatt “energy” output:total_power (L1+L2) sensor graph directly: 24894−24840 = 54 (this seems a tad low for my daily kWH usage, but its been mild/cloudy and today was my first day “back at the office” vs work from home so maybe correct without HVAC, lights, or cooking at home)

According to sensor.iw_total_power_wh graph: 10288519−10234315 = 54204 (this seems to match the IoTaWatt kWH usage graph for 24 hours)

According to sensor.iw_total_power_wh_accumulated graph: 5101237−4832827 = 268410 (this seems impossibly high for watts used today - even on the coldest single-digit-temperature sub-freezing days running tons of electric backup-heat, spaceheaters, and hot water we only use maybe 250kWH in a 24 hour period)

SO…I have zero clue where this comes from or what it represents. Anyone have a guess?

figured it out? I just upgraded HASS and got this new version of iotawatt integration and trying to make sense of what I see.

Nope.

And apparently I can’t post that since it isn’t at least 10 characters…lmao

I’m trying to figure out the same thing. The IotaWatt is a fantastic product. It’s sad that the HA integration for it is so poorly documented. I’m reading through lots of fragments of information in the forums, but much of it is outdated now because the integration has changed so much.

The history graphs show that both energy sensors have exactly the same curve. So I think the difference is the start of the time period. I’m still trying to figure out what time period is used for each.

Looking through the source code, the accumulated sensor is documented as “Defines a IoTaWatt Accumulative Energy (High Accuracy) Sensor” while the other one is “Defines a IoTaWatt Energy Sensor”. I guess I prefer higher accuracy…?

Yeah it’s really hard to tell. And at least on mine, the difference between the values makes me think that they are not measuring the same thing…but its hard to be sure.

I also hate that there’s no way to easily change the update interval. The built in web-display updates every 3-5 seconds, forcing a 60 second update interval means I miss important events on stuff. I really need like 10 second refresh rate or better for some of my sensors (like detecting clothes dryer door open).

Looking into the library code, I believe Wh is the number read directly from Iotawatt, and wH.Accumulated is calculated by Home Assistant, by adjusting the start of the time period. I’m still trying to figure out what time period it uses.

In my system, Home Assistant’s Wh graph matches IotaWatt’s Graph+ with the accrue box ticked. I used a space heater with constant load to visualize this more clearly. In a 30 minute period from 5 to 5:30pm, the wH increased from 173 to 435, so I consumed 262 Wh in that period, which is exactly the number shown by the orange (accumulated) line at that time.

@mmiller7 I don’t know what causes the weird numbers in your example. Do you have solar? If so, make sure you setup the integrator correctly in Iotawatt, or else you’ll get only the net values.

No solar or anything. In my case the one accumulates faster than the other for an unknown reason. This is just a basic electric water heater for example.


After a lot of reading, especially this thread, I came to the conclusion that the accumulated sensors should never be used in Home Assistant. I fixed the documentation to say that, and I will work on a PR to remove them from a future version of the integration.

1 Like

So they were removed, but the ability to have a replacement has been seriously reduced.

One issue with the Wh energy sensor is that they reset at midnight. That’s okay for the use in the energy screen, but completely useless if you want to see data over time.

The accumulated sensor never reset, it was increasing in value from the time the sensor was created.

@llamafilm maybe you should have done even more reading :slight_smile:

But it also didn’t accumulate at the same rate as the wh sensor? Its clearly much more than just a counter that never resets.

Like my diagram the water heater (according to the IoTaWatt directly) used 60kWh, the wh sensor reported a delta of (hard to read exactly) about/bit under 100kWh, and the accumulated sensor reported a delta of nearly 700kWh.

For plain outputs, it should have accumulated at the same rate.

Only if the output was calculated based on the difference of others should it have been different

Now I had seen cases where, following a reset of HA, the resume failed (HA was supposed to query the iotawatt from the last time it had been queried)

For detailed analysis, I think it’s better to use the IotaWatt’s built in graph pages. The HA integration will never fully replace that functionality because it has to work with more constraints.

You can see data over time by looking at power sensors (W) in the HA history graph. @jyavenard Can you describe your use case that requires accumulated sensors? You may be able to use a template sensor for some things.

1 Like

Yeah in my case that’s just a basic single input, resistive load (4800w water heater with mechanical thermostat) so perfect power factor.

That’s what makes it so bizarre that there was such a difference in the values to me.

Slightly left field, BUT

I would strongly recommend running emonCMS, integrating iotawatt to emonCMS, and then emonCMS into HA.
Updates every 5 or 10 seconds, without putting additional load onto the iotawatt.

It uses the same graphing engine that iotawatt does, and then you can push other stuff into it as well for long term statistics and graphing.

Prior to an integrating existing, i had my iotawatt integrated via REST, and updating more than every 10 seconds bought the poor iotawatt to its knees.

1 Like

No more “accumulated”: