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

**URL:** <https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535>\
**Category:** Apps\
**Tags:** app, tools\
**Created:** [November 10, 2019, 10:06pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535 "2019-11-10T22:06:03Z")\
**Posts on this page:** 20\
**Page:** 93

<div class="post-metadata">

**Author:** ![Danke](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/danke/32/56496_2.png) [@Danke](https://community.homey.app/u/Danke)\
**Post date:** [November 18, 2023, 5:19pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1881 "2023-11-18T17:19:42Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [November 18, 2023, 5:43pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1882 "2023-11-18T17:43:59Z")

</div>

> [@Johan\_Olsson](#):
>
> Smart gateways,

@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](https://tools.developer.homey.app/tools/devices)

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

---

<div class="post-metadata">

**Author:** ![Johan\_Olsson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_olsson/32/79353_2.png) [@Johan\_Olsson](https://community.homey.app/u/Johan_Olsson)\
**Post date:** [November 18, 2023, 6:02pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1883 "2023-11-18T18:02:35Z")

</div>

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

Attached capabilities for smart meter.

 ![Skärmbild 2023-11-18 185814](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/e/2e32f3c70b3a99a9a5404bc34c45a336a21eb3a0.png)  
 ![Skärmbild 2023-11-18 185826](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/d/bd2762fd3b9df1d05cbf20d1bbe96f133c16b4ad.png)  
 ![Skärmbild 2023-11-18 185845](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/7/c76fd0e57e954228953ab6e99eac45a35c94ea95.png)

---

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [November 18, 2023, 7:17pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1884 "2023-11-18T19:17:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [November 18, 2023, 8:37pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1885 "2023-11-18T20:37:38Z")

</div>

New version 5.9.0 is ready for testing: [Power by the Hour App for Homey | Homey](https://homey.app/a/com.gruijter.powerhour/test/)

- 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.

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [November 18, 2023, 8:47pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1886 "2023-11-18T20:47:19Z")

</div>

> [@MarcelT](#):
>
> What is the problem and i will adjust it.

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

---

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [November 19, 2023, 3:23pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1887 "2023-11-19T15:23:32Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/3/43b51184adbf10a813e8105419fb148e0a9d48da.png)  
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?

---

<div class="post-metadata">

**Author:** ![Johan\_Olsson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_olsson/32/79353_2.png) [@Johan\_Olsson](https://community.homey.app/u/Johan_Olsson)\
**Post date:** [November 19, 2023, 5:11pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1888 "2023-11-19T17:11:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![EdNL](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ednl/32/90603_2.png) [@EdNL](https://community.homey.app/u/EdNL)\
**Post date:** [November 20, 2023, 7:50am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1889 "2023-11-20T07:50:01Z")

</div>

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

 ![Scherm­afbeelding 2023-11-20 om 08.47.53](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/c/3cb3c9e6d081233fbe1e51724ffec1e2c8d16080.png)

 ![Scherm­afbeelding 2023-11-20 om 08.48.03](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/f/bf14bc52e736a4708e415a02b29f73a77f5f33da.png)  
 ![Scherm­afbeelding 2023-11-20 om 08.48.16](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/a/ead7cc70d02e930039354f02dc1a2de83d239584.png)

What do I do wrong?

---

<div class="post-metadata">

**Author:** ![Hans-Christian](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hans-christian/32/68056_2.png) [@Hans-Christian](https://community.homey.app/u/Hans-Christian)\
**Post date:** [November 20, 2023, 2:22pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1890 "2023-11-20T14:22:51Z")

</div>

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.

 ![IMG_2401](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/f/bfe0a775b37ad75f99e2fb536b379acace39dda5.jpeg)  
 ![Skjermbilde 2023-11-20 kl. 15.22.01](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/a/2a989e6d33ecbb5c4719ab6b55fed28c8a11fa09.png)

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [November 20, 2023, 2:58pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1891 "2023-11-20T14:58:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [November 20, 2023, 3:08pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1892 "2023-11-20T15:08:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Hans-Christian](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hans-christian/32/68056_2.png) [@Hans-Christian](https://community.homey.app/u/Hans-Christian)\
**Post date:** [November 20, 2023, 5:13pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1893 "2023-11-20T17:13:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [November 20, 2023, 5:34pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1894 "2023-11-20T17:34:05Z")

</div>

> [@Hans-Christian](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Johan\_Olsson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johan_olsson/32/79353_2.png) [@Johan\_Olsson](https://community.homey.app/u/Johan_Olsson)\
**Post date:** [November 20, 2023, 5:35pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1895 "2023-11-20T17:35:48Z")

</div>

Still showing null in test version.

 ![Skärmbild 2023-11-20 183418](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/d/fda10824e7f4fef5427099f106a9b5d4b46281f6.png)

---

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [November 20, 2023, 6:15pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1896 "2023-11-20T18:15:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [November 20, 2023, 6:18pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1897 "2023-11-20T18:18:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MarcelT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcelt/32/10042_2.png) [@MarcelT](https://community.homey.app/u/MarcelT)\
**Post date:** [November 20, 2023, 6:36pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1898 "2023-11-20T18:36:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Hans-Christian](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hans-christian/32/68056_2.png) [@Hans-Christian](https://community.homey.app/u/Hans-Christian)\
**Post date:** [November 23, 2023, 8:17am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1899 "2023-11-23T08:17:09Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [November 23, 2023, 8:58am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1900 "2023-11-23T08:58:49Z")

</div>

> [@Hans-Christian](#):
>
> 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?

[Previous page](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535.md?page=92)

[Next page](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535.md?page=94)
