Calculating my smart plugs consumptions :)

Hello all,

So, I’ve added my meross smart plugs using the gas section of the energy dashboard, and configured my per kwh price in there (0.26 eur).

I’m interfacing the meross plugs using the meross lan integration.

I created a very simple dashboard where I can see the plugs, but here is how it looks like :

if I go se the consumption in the meross app, we can see the, lets say, for the laundry dryer, that the consumption is reported with a comma, which I believe makes HA get a little nuts.
Also, I’d like to get rids of the millions digits below the decimal point :slight_smile:

Anyone has good advices to get this running and displaying / calculating the right way ?

also, can someone point me back to a tutorial on how to keep daily / weekly / monthly and yearly consumption per plug and how to calculate the sum of all the plugs ? and keep their data for the same periods ? So I can add a weekly, monthly, yearly total to my dashboard ?

thanks !!! :slight_smile:

You might have a look at Powercalc in HACS.

I have that thing but it detects my light bulbs, and not my meross wifi plugs, as far as I can say.

Is there something I missed ?

The thing that makes it go weird is most likely the fact that your wH meters are 0 when a switch is turned off. The energy dashboards expect the Wh or kWh sensors to be increasing, not resetting to 0. Are you sure the sensors aew Wh, not W (Watts)?

You’ll want to put the total consumption ones in the energy dashboard, not ones that reset. You’ll see dayly, monthly, yearly there. If you want sensors to keep track of them as well, look at utility meter in the helper section of the settings. For adding things, there’s a sum there as well.

Hi there,

not sure I’m getting you fully here.

The switches are basically turned on 24/7. As you can see only one of them is actually off (my arcade cabinet sucks 240W for some reason, so I better avoid letting it running all the time).

I don’t believe the plug shoots a 0, but more that the values, which are actually displayed as either WH, and then KWH in the meross app, like this

180WH will become 1,180KWH once the KWH state has been reached.

The costs are calculated by HA, that knows each KWH costs me 26 cents.

I think the goal here is to get rid of the comma, and let HA know that 1000WH = 26 cents.

Where I do follow you is here :slight_smile:

I indeed can see that the value gets back to 0 every night at midnight, is this not supposed to be “normal” ?

Another example with my laundry washing machine :

Here we can see it is generating Kwh each time it works, so the amount of Kwhs it generates should be added to the costs sensor, right ?
and each day, it starts from 0 again, which seems logic to me (nope?)

Normally, you’d have your energy meter reading for the energy dashboard. That normally isn’t reset until you replace the meter. The energy dashboard needs to decide if a decrease means delivering e.g. solar energy to the grid or a meter replacement.

As I understand it, it depends on the state_class: If it is measurement or total_increasing. That may be incorrect for the purpose. Maybe you need to see if it is correct, and if not check if you can use customize to fix it. See here for an explanation what happens for either one:

Hi there,

Sorry for the delay!

first thing first, I figured out that the price you configure in HA is a price per WH. and not per kWH.

So, I changed the unit proce from 0.26 to 0.00026, and now, the reflected amounts are allright.

Still, HA keeps only displaying the price of what is reported since midnight. (so for the current day).

I’ve know there is a way to create some kind of “historical math something” to keep trace of the daily, weekly, yearly… sums of data. But I can’t find it back. :confused:

I will also check this (thanks for the link!) :

" total_increasing, a monotonically increasing total, e.g. an amount of consumed gas, water or energy. When supported, the accumulated growth of the sensor’s value since it was first added is updated hourly."