[ALPHA] - Track Power On Time by PowerMeter

Here is a handy utility app that is written very very basically: "Track Power On Time".

This application uses a device with the PowerMeter capability (smart plugs, HEM's etc) and a threshold (for devices that have a low power sleep mode) to track "on" time, really on/off cycles.

Example usage: My gas water heater is power vented, when "power" usage goes above 2 watts it's running, always. I set this up to track when it's on heating, and specifically how long each run is.

Output currently is limited to some very basic stats:

You can create new events for each power on/ power off cycle if you want to use it as a crude virtual switch or grab those events into another platform (graphana, nodered etc) but even with that off you get a running total runtime, total number of on/off cycles, and average length of cycle.

My intent is to set up 24/36/48 hour & 7 day timechecks where it uses the hutbitat scheduler to populate averages for those time periods vs just lifetime.

This is my initial sit down and write it upload, thus the [ALPHA] tag but it's so simplistic not having a parent/child app setup or anything complicated that it is pretty solid. I've got it tracking my gas fired boiler and my gas fired water heater, both reliably for the past few days.

Hope it helps someone, if you see any way to improve the code let me know, I appreciate all suggestions.


Updated to include time off, and average time between cycles. Also optimized for less CPU usage.

1 Like

Here is a screen shot with the new pieces on it, if anyone is wondering what an example use case is, I'm monitoring how often my boiler is heating water for our house's heating system. I'm going to eventually contrast that with how often the circulation pump is running etc to make adjustments to things. Next up is running 24/48/7 day averages.


This is fantastic.
I haven't used it yet, but plan to.
I'd love to know how often the following is running;

  1. My insinkerator water heater
  2. My home electric water heater
  3. How often my fridge pulls a lot of energy

Next step for me is to make sure I have the right smart plugs that can handle the volts, watts, amps for those devices.

Glad it looks useful! Let me know how you use it, PR's are welcome as well :slight_smile:

Any suggested HE friendly smart-outlets you like for these types of Appliances?

Anything that reports power, so for me that is some old centralite plugs that came with my original SmartThings hub, a Zen15 heavy duty power plug, and even a AEON Gen5 Home Energy Monitor with amp clamps. I believe nearly all my plug in controllers do this to some degree. Depending on what you're tyring to monitor you may want more or less sensitive power reporting (many are configurable) so you reduce chatter... Sorry that sounds complicated but it's not too bad, basically any smart plug with power reporting will get you there :smiley:

1 Like

If you can find them on eBay, these are good Zigbee repeaters, and report power:

  • CentraLite Appliance Module - 4257050-RZHAC

Thanks Dan, any idea if that includes the Mini?

Mini no longer does power reporting - did at one time, but got removed at some point... :frowning:

Other than that, it's a great plug/Zigbee repeater.

I found and installed this app a few days ago, but for some unknown reason I can’t make it to work properly, at least with some devices.

I have three different devices configured but it only works with one of them.

Anyway I can help to make it work?