Energy meters resetting (powerplugs like zwave, shelly etc)

Hello, I’m wondering how you guys cope with there phenomenons below? Is there a fix for this? I have tried creating sensors that negate the effect but there is always something new that happens to make it weird, so tired of this… is it faulty sensors? I have zwave, shelly and all sorts of different sensors, they all do the same occasionally

wth??? Monthly graphs get totally useless, influx/grafana is a bit better but still…

You show a sensor that had a value until a certain time but then it shows Zero after a specific point in time… You give us absolutely no indication about what the sensor is, what hardware is behind it, how it’s setup or - anything other than. It’s broken.

We can’t even tell it’s not working from those pictures - other than you say it isn’t. It could be perfectly valid operation.

We need WAY more to help.

What did you configure?
What is your expectations on operation?
Why is it not doing that
(specifically, why is it not doing what you want)
When did it start (has it always been that way)

As the pictures are showing… the devices are measuring energy consumption. Most of these devices give an energy sensor that SHOULD be forever increasing and as I also said I have the same problems with different hardware making configuration errors in ha minimal. The devices are paired to zwave and added to ha in one basic step that can hardly be done wrong. Zwave, shelly and all sorts of devices have done this reset at some point. I’ve seen others have the same problem but no one has solved it as far as I’ve seen. I’ve tried to configure all my devices hardware but have found nothing to apply that would make an impact on this behaviour. The devices simply seem to do this, therefor I asked the question very simple. The reset obviously occurs on some devices regardless of config or hardware, but has anyone come up with something that works against this…? nothing has probably changed but who knows? Mabye someone has seen this behaviour and knows what I’m actually talking about.

This helps. So you’re talking about device reports themselves not a power meter helper (which was my first question. What is this - you troubleshoot them very differently)

As to device reports you MUST start with what the device is capable of - so for that we MUST know exactly what the device is. (I know I’m asking a lot but these questions matter to your setup)

Oh how I wish… In home automation, model number matters (and sometimes even firmware level) as to how a device behaves so for that device we see what EXACTLY (make, model) is it. My zooz heavy duty outlet behaves very different out of the box to my Inovelli wall switch. Both provide power reports and one of them will absolutely flood my ZWave network if I accept the defaults. You need to make sure you understand what its supposed to provide and how.

We can work around whatever it’s ‘doing’ but first we need to establish if it’s acting as desired (you answered no) and/or as configured (still unknown - need make model and how it’s configured in ZWave JS / JsUI) or is it flat out buggy. (all are. Possible)

(basically just taking the default yields all kinds of results because different manufacturers do things differently.)

I have mostly telldus plug slim (TZWP-102) and shelly 1pm, many of them never do this reset, however a few are doing it occasionally. I don’t know if it’s always are the same devices doing it though. But based on that I assume that it’s a bug, if it was by design all devices would behave the same. Don’t know how the forever increasing energy kwh sensors work. If they store data in the device or if its handled in ha somehow.

1 Like

It’s is basically just a counter. In this case HA is receiving the data and doing the math.

Let me take a look at those and see how they’re SUPPOSED to behave and we can go from there. (there’s plenty of ways to solve we just need to know what we’re solving)

I use template entities and the utility meter as it has a lot of options to get around problems like this. Most devices now have two entities if they track power. One current load and one increasing. If you add them to the HA energy panel i think it will track them there in the way you want.

1 Like

Sounds interesting, do you experience the exact same behavior as I do? If so då you have any examples of your templates?

What are your recorder settings? Looks like 45 days almost exactly that its keeping for you? Default recorder settings are short and home-assistant will purge your data every 10 to 45 days if you dont tell it not too. I will check my entities and grab some examples soon, but i have a bunch of them as well as solar panels and the only time they drop in my experience is with auto purge enabled and the default retention time.

    source: sensor.gas_meter
    name: Monthly Gas
    cycle: monthly
    source: sensor.dailytotalkwh
    name: Monthly Electric
    cycle: monthly
    source: sensor.dailytotalkwh
    name: Yearly Electric
    cycle: yearly

Some devices do reset to 0 if the device its self reboots. I have a ton of power stuff and I just plugged it all into home-assistants energy dashboard, moved to a postgres database and set my purge history to 4000 days. The energy dashboard tracks it outside of the entity itself and I use the utility meter to pick up slack and calculate rough cost.

1 Like

My settings are like below, but still… I have devices not behaving like this.

Your templates only count upwards? Or do they also count backwards when sensor for example goes from 57000 to 0 (making -57000 that day)

Best would be to only count positive changes and discard negative changes, that would solve all I think?

  purge_keep_days: 10
  commit_interval: 20
  auto_purge: true
1 Like