[APP][Pro] Power by the Hour: Insights per hour, day, month and year

HI All,

I have tried to search but can not find what i am looking for…
i hope i can explain correctly what i mean.
The tools maybe are right infront of me but i cant seem to figure it out…

Here it goes:
I want to Check my consumption (kwh) every hour, take the price for that hour and calculate and put somehere!?

Then the next hour, do the same again.
then the next and the next and the next hour… yeah you get it.

In the end of the month i want to be able to see my avarage $ per kwh.

There is more to this than i explained because my electrical company were i buy my electricity from also has something calls “smart charging”

What this means is that i get all power consumed from my Easee wallbox to a 50% discount of my total avarage on the house.

the thing here is that if i use smart charge it would NOT drive my avarage up on the house, it exludeded from the house avarage.

lets say that my house consumed 900kwh to an avarge of 0,90 SEK
and all energy consumed on top of that 900 kwh is my wall box, let say i charge my car with 300kwh

on those 300kwh i will get a 50% discount on what my house consumed which was 0,90.
This will result in that i will pay 0,45 for those 300kwh.

The point of this question is basically that i want to se if the current price is cheaper then 50% of my avarage this month to automatically switch the wallbox from smart chargin to regular charging.
in this way i can “work” my house avarage down by setting the wallbox to NOT smart charge.

so as i explained in the begining i want to store my hour consumtion followed by the current price for that hour if my car i charging on this hour i will also store energy consumed by the wall box to calculate away the consumtion from this sp it does not affetct my house avarage, depending on if the wall box is set to smart charg or to regular.

So my idea is:

Time Used (House) Wall box(smart chaged) Price Result
13:00-14:00 5kwh 10kwh 0,2 1SEK
Time Used (House) Wall box(regular) Price Result
14:00-15:00 5kwh 10kwh 0,1 1,5SEK

In this way i would be able to trigger events depending if the current price is under my avarage of the month so far.

Consumption*Price (include/exlude wall box KWH depending on state of smart or not) every hour

i am thinking to write to some spreadsheet but i dont know how to collect value from that either…

maybe this beacame a messy thread but maybe someone know what i mean who lives in Sweden an has Tibber as electricity provider,

@MarcelT where can I find the source code? I think we discussed the kWh capabilities that you use before. But something went wrong somewhere I guess.

@Johan_Olsson If you know how to grab a screenshot of the devices capabilities, please post them here. You can find it here https://tools.developer.homey.app/tools/devices

In the mean time you can try switching on ‘use watts’ in the advanced settings.

1 Like

Switched to “use watts” and it started to update directly.

Attached capabilities for smart meter.



@Gruijter yes, i did. Works fine over here. Source codes are not public. What is the problem and i will adjust it.

New version 5.9.0 is ready for testing: Power by the Hour | Homey

  • Added repairing to a new source device.
  • homey-api@3.1.0

This adds a feature that was requested by a number of people. You can now repair a summarizer to a new source device, e.g. because you deleted the source device in Homey. Repairing will keep all the Insights and Flows. But if you repair to a physically different source device the kWh meter will most likely jump. In that case you need to manually adjust the meter and money values in the advanced settings.

2 Likes

When you look at the meter_power capability that @Johan_Olsson posted, you see it is set to NULL. That is why his meter isn’t updating


I do not have this issue. @Johan_Olsson could you update the app with the test version to see if this will be removed? Ps, are you from Sweden? If so did you install the Swedish firmware?

1 Like

You mean 4.0.0 test version of smart gateways?
I’ll try that tomorrow.

I’m from Sweden yes, I changed to the correct firmware when I took it in use 5-6 months ago, I can see that it’s running a firmware from November 1 right now, but I don’t know when it was updated to this version.

I don’t know what is the problem. I see now this in my information:


What do I do wrong?

I am using the Power By The Hour app to run a water heater for 4 hours each night where the prices is lowest. I have made an Advanced flow that “kind of” work, except it can start a 2-3 hours late compared to the lowest electricity prices. Am I using the cards wrong? Or can there be a issue with time offset? Living in Norway so we are at CET.
Below is a screenshot flow, and of today’s Prices showing the lowest prices from 1am to 5 am. However my water heater started at 3 am and shut down at 7.


You trigger with a time card ‘every new hour’. However it could be that that starts a few seconds before PBTH has been able to update the prices. So try delaying the trigger with e.g. 10 seconds.

In winter, CET = UTC is + 1. So that can explain 1 hour difference.

I would just include a message in the timeline what time is passed for the lowest energy price.

Gruijter, What would be the best trigger to use? Would it be better to use “when price changed”?

That is what I use myself. That way you can be sure that the new prices have been processed.

1 Like

Still showing null in test version.

Could you go to your device and sent me a picture of the result or save the output and sent it to me. I remember that the Swedish output is different.

{your ip adres}:82/smartmeter/api/read

Hi @MarcelT and @Johan_Olsson maybe you could continue debugging the smart gateways app in another topic :kissing_heart:

1 Like

You right, I have overlooked this. :blush: @Johan_Olsson please sent me a pm.

1 Like

@Gruijter I have changed the trigger to “when price changed”, and still it seems to be delayed. Last 3 days water heater has been active from 3 am to 7 am. Prices in table shows lowest prices from 2 am. I can’t see why this is not working as it should. Can there be any issue with time zone / daylight saving?

PBTH uses the timezone that your Homey is set to. When you look at the prices in the app, are they correct for this hour and the coming hours?