[No Longer Maintained] Energy Cost Calculator

Version 0.7.6 Release

  • Added logic to discard energy changes over 500 kWh as probably erroneous. If this is too low for anyone, let me know.
  • Updated UI color scheme to be uniform across the menus.
1 Like

I’ve “reset everything” and notice that there are still "total costs" present?
Also, all variables have been de-selected apart from the total costs.
Please advise.


I think I left those along with the reset feature because they are just historical values. They won't affect anything aside from showing on the dashboard. If it's a big deal, I can update the function to also nuke them.

1 Like

I meant to follow up and say, that what you're looking for could be added to the existing app. Maybe @kampto would be willing to do it with:

I think the stick in the mud here is do you really want to track averages based on time the device is in the "on" position? I think a more accurate way would be to maybe key in on power usage (e.g., power > 0 is "on" and power = 0 is "off").

very nice work, i love the energy cost calculator, i noticed you've a lot of devices already would you mind sharing what you do use? plugs/switchs what brand or models

I'm not set on particular brand. Honestly, I have a large, mixed bag of devices so I could try accounting for the nuances in how they handle energy reporting.

So, right now, I have one or more of all of these:

Kasa KP125
Kasa EP25
Shelly 1PM
Aeotec Heavy Duty Smart Switch
Zooz ZEN15
Athom Tasmota US Plug V2

I also have an IotaWatt setup in the mail to add in energy reporting for the whole house along with my two HVAC compressors.

1 Like

I can look into it, but that app is already pushing my limits of code. And those 'On' times are stored as strings.

I'm familiar. If I can some time, I'll send you a PR.

For the IotaWatt users:

I'll be figuring out what needs to change to get energy reporting into HE. I don't imagine it'll be much.

1 Like

Im messing around with it now. Will PM you if I get stuck.

Good luck!

Power monitoring added. Time is a string format so not sure how you gonna use it.

1 Like

I've released a new driver for the IoTaWatt integration: [RELEASE] IoTaWatt+ [BETA]


What is the best way to deal with billing at 1 rate up to 1000 kWh and a different rate above the 1000 usage?

1 Like

Ooo....that's a new one. Could you pull the rate scheduler for your power company, or just tell me who they are so I can? I'll need to code that and release an update.

I might be able to kill two birds with one stone. I was looking to add the ability to change the rate based on a virtual switch turning on. A simple rule of >1kwh, turn on switch would fit the bill.

1 Like

I sent a PM with a link to the document.


1 Like

I installed this app a few months ago, with 6 devices selected.

A few weeks ago one of them just quit reporting any energy, and since I haven’t been able to get any data from it.

It is a Tasmota flashed device, (Sonoff POW device) and if I select it from Devices, everything looks normal, with all information being reported correctly.

All other 5 devices are also Tasmota flashed plugs.

Where should I look to make it work again?

From the device page, go to Events and be sure that the entries are recent. If the plug stopped reporting, the attribute data will still be there but will be stale.

If everything is good there, turn on debug logging for the app and wait for the plug to refresh (or force a refresh). You should see log entries for it when the 'energy' value changes.

Last resort would be to unstick the plug for the device selection, click done, go back into the app, and re-select the plug.

I already did all three options and still no luck.

Please take a look at this log info and tell me if you see anything weird or wrong.


Edit: BTW, I’m using @garyjmilne Tasmota drive

Log looks good to me. I would say that the reporting interval is as low as 10 seconds and personally I would find that generates too much activity on the hub, but I doubt it is having any effect on your particular problem.

P.S. Just make sure that the device attributes are accurately getting updated by those incoming values.