Energy Tariff - similar to Modes

Some device driver authors are including energy consumption and cost calculations in their drivers. But currently you have to enter your charge per KWh in the configuration for each device. And even after doing this, it will still be wrong for part of the day if you are on a tariff that has peak and economy periods.

My proposition is that it would be lovely if there was a hub-wide setting that could be accessed by all apps and drivers, with a similar UI to modes so for those of us it applies to we could set the energy charge for different times of day.

1 Like

Interesting proposition, this can be easily accomplished with a custom app that would monitor power consumption. While some custom drivers do have the option to enter the energy cost, none of the built-in drivers that report power/energy have this option built-in, so an app would still be needed to calculate the cost.

Yes I think a custom app could do it, I was leaning towards something more built-in because I could imagine the confusion if people start messing with the hub variables directly rather than through the app. Unless the app keeps them local of course...

I think I'm willing to take this challenge on. Would you want cost per device or would aggregating energy usage and calculating the cost work?

5 Likes

HE application is undoubtedly the right way to do energy cost calculations!
Count on me as a beta tester :slight_smile:

@bobbyD if your team can find the time to create and publish on HubitatPublic/example-apps at master · hubitat/HubitatPublic · GitHub a very simple example code of the new HE tables UI, this will boost the creation of new community applications a lot!
Something simple, like a table displaying the names of the selected devices, one state, and one button for adding an action code.

1 Like

this is exactly what I'm trying to find.

Both would be nice, total and breakdown, though I am not sure of the best way to present it - whether in a daily report or some UI screen you can see on demand

1 Like

Let me start by getting the math part figured out along with differentiating time windows. I'm thinking I'll start with just dumping the data into a device, since I imagine a lot of folks would want to show this in a dashboard. Maybe the table option that Bruce just demo'd can be added later.

I can't commit to a timeline, but this should be fun!

1 Like

Bruce was already was asked about this and posted something...

Here:

To here:

The example app tracks light usage...we're almost there. :slight_smile:

1 Like

Maybe I'm overthinking this, but I'm finding this may be quite difficult to do. I have three different device types that have energy monitoring capabilities. One of them resets the energy readings each night at midnight. The other two appear to just keep a running total for energy; one has a command to reset the stats, the other does not. So, that really complicates things when trying to roll it all up and get an accurate picture. All this to say, I'm thinking the variation in the driver implementations for tracking energy in the first place is the first hurdle to get over. Maybe this could be as simple as resetting the energy reading from the app each night to establish common ground.

For the cost calculation, I pulled the schedule from the power company that I use (it's optional for us to enroll). They have different rates depending on time of year, day of week, and time of day. So each of these would need to be user inputs. Is this similar to what you folks on the other side of the pond use?


This sort of thing was at the back of my mind when I first suggested it become a hub feature. If there is an official API to do with energy use monitoring, driver authors are more likely to write to that spec. Energy use monitoring is a pretty fundamental need/want in these days of expensive energy and green consciousness and I can see a time coming when it might be expected by default in a smart home system.

Well...I think I kind of answered my own question as I was writing that reply yesterday. The common ground would be to hand resets of the energy reporting to an app. The app could then just reset the reading at midnight each night and maintain a backwards look. Essentially, exactly what @djgutheinz did with the Kasa driver set.

From there, I think the app would need the inputs for the time constraints and the litany of logic behind it to sub in the appropriate cost at the appropriate time.

1 Like

Have you managed to progress this?

No. I've had some personal things going on that have taken priority over my time.

Even when I do get time to work on it...it won't be quick for me. I'm learning as I go.

2 Likes

Doesn't help here, but tesla has a feature like this in their Powerwall app, so definitely doable. theirs even goes so far as to be able to update it with your specific rate plan. I haven't set it up yet as we pay the same price all the time. but i should just so I can better track how much we are paying vs how much credit we are building.

If you inject your power devices into influxdb, you can use grafana to calculate power costs based on kWh costs and perhaps even time of day. I do it now to see how much my appliances and my spa are costing us and how much our electric bill is each month.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.