# \[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:** 48

<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 5, 2022, 11:47am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/964 "2022-11-05T11:47:05Z")

</div>

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

- Added Homey Energy as source device.

So now you can add Homey Energy as a source device as found under the Energy Tab in the Mobile App).

@JeeHaa this is especially for you 😘 Can you please test it and let me know?

---

<div class="post-metadata">

**Author:** ![JeeHaa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeehaa/32/29849_2.png) [@JeeHaa](https://community.homey.app/u/JeeHaa)\
**Post date:** [November 5, 2022, 1:58pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/965 "2022-11-05T13:58:33Z")

</div>

Great, thanks for the update!

I just added a PBTH Homey Energy device that uses devices (these are all devices under “Zones” in HE, correct)?  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/3/d337f02626c3584e59ffbbd766258dab4998a1b5.png)

However it became unavailable (I did toggle the “status indicator”). An app restart solves it.  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/c/ac315434b1d465eef72292bced21fb5809b35957.png)

Diags:  
745130e8-b4b8-4ff2-8cf0-61dac6ece367

Request: can the value for kWh be rounded to 2 decimals?  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/e/0e150d021a6fa45cc6c167e7b06a549d6ab24885.png)

BTW: Does Homey Energy keep track of total consumption (kWh) itself? Because if I look at “Power” on the PBTH Homey Energy device, it only updates every 2m or so, and the values are sometimes very different from the P1 “real” fluctuating load. This frequency would not be suitable for “Power” calculation, or does PBTH sample all devices itself as they update?

---

<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 5, 2022, 2:25pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/966 "2022-11-05T14:25:53Z")

</div>

> [@JeeHaa](#):
>
> these are all devices under “Zones” in HE, correct)?

Correct

> [@JeeHaa](#):
>
> can the value for kWh be rounded to 2 decimals?

Already implemented. Go to advanced device settings.

> [@JeeHaa](#):
>
> does PBTH sample all devices itself as they update?

No, PBTH samples the Homey Energy value every 1 minutes. So it will only be an averaged estimation.

---

<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 5, 2022, 2:44pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/968 "2022-11-05T14:44:05Z")

</div>

> [@JeeHaa](#):
>
> However it became unavailable

That was no crash. You changed the device settings so the device needs some time to restart with the new 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 5, 2022, 2:47pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/969 "2022-11-05T14:47:49Z")

</div>

> [@Kai\_Engvik](#):
>
> the time between then and 06 is calculated by a script. In this case it was 15 hours.

You are using this out of the PBTH specs. So please dont complaint something isnt working then. I really dont want to spend time investigating issues that are not real issues.

---

<div class="post-metadata">

**Author:** ![JeeHaa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeehaa/32/29849_2.png) [@JeeHaa](https://community.homey.app/u/JeeHaa)\
**Post date:** [November 5, 2022, 2:58pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/972 "2022-11-05T14:58:41Z")

</div>

> [@Gruijter](#):
>
> No, PBTH samples the Homey Energy value every 1 minutes. So it will only be an averaged estimation.

Mmmm… In that case I’m not entirely sure the Homey Energy option is of much practical use. I’m afraid sampling every 1m is too coarse to get a reliable result for total consumption. I was hoping/expecting that Homey Energy would provide the total consumption by just adding up all device updates, but because I did not see that total I already suspected as much…

Anyway, I will see how the calculated consumption compares with the real meter! 🙂

BTW: I see Power (W) only updating every 2m, not 1m?

---

<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 5, 2022, 3:23pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/973 "2022-11-05T15:23:17Z")

</div>

> [@JeeHaa](#):
>
> not entirely sure the Homey Energy option is of much practical use.

I have been testing myself with my main meter for the last 5 days. The total direct measured value is 43,2 kWh, and the value via Homey Energy is 43,5. So the error is 0.7% over a 5 day period. I think that is very usable.

PBTH samples Homey Energy every minute. I don’t know how often Homey Energy is updated itself, but it could very well be immediately. The 2 minutes you are referring to I believe to be the sampling of the Android/IOS app to Homey Energy.

---

<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 5, 2022, 3:26pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/974 "2022-11-05T15:26:44Z")

</div>

> [@Kai\_Engvik](#):
>
> why the card did trigger false at 22:01,

Because you are using the card in an unspecified way. I will not help you with that. Please re-read the explaination why it is a problem for PBTH to know the energy prices more then 8 hours in the future.

You keep asking for the same thing… [[APP][Pro] Power by the Hour: Insights per hour, day, month and year - #821 by Gruijter](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/821)

---

<div class="post-metadata">

**Author:** ![JeeHaa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeehaa/32/29849_2.png) [@JeeHaa](https://community.homey.app/u/JeeHaa)\
**Post date:** [November 5, 2022, 3:34pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/975 "2022-11-05T15:34:19Z")

</div>

> [@Gruijter](#):
>
> The 2 minutes you are referring to I believe to be the sampling of the Android/IOS app to Homey Energy.

Total power: so it averages out ptretty well then! I am going to see what happens over the next few days.

About the 2m, I was talking about the PBTH Homey Energy device (expected to refresh every 60s):  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/0/8077491abf1a90ae47bd608ab578b68b3e520302.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 5, 2022, 3:38pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/976 "2022-11-05T15:38:24Z")

</div>

> [@JeeHaa](#):
>
> PBTH Homey Energy device (expected to refresh every 60s):

Ah, that is the Watts in PBTH. That is indeed updated every 2 minutes. But under the hood the kWh is updated every minute (or slower when changed in the advanced settings)

---

<div class="post-metadata">

**Author:** ![JeeHaa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeehaa/32/29849_2.png) [@JeeHaa](https://community.homey.app/u/JeeHaa)\
**Post date:** [November 5, 2022, 3:41pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/977 "2022-11-05T15:41:40Z")

</div>

Any chance on refreshing this on the device every 1m as well? 🙂

---

<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 5, 2022, 3:55pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/978 "2022-11-05T15:55:06Z")

</div>

Not really, since it is calculated as an average from the virtual kWh meter. This is because PBTH primarily works with kWh. The support for Watt was added later, but is less accurate. So the Watt displayed in PBTH is only indirectly related to the Watt in Homey Energy.

But Im curious why you would want a fast updated Watts in PBTH?

---

<div class="post-metadata">

**Author:** ![JeeHaa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeehaa/32/29849_2.png) [@JeeHaa](https://community.homey.app/u/JeeHaa)\
**Post date:** [November 5, 2022, 4:01pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/979 "2022-11-05T16:01:49Z")

</div>

Not for a special reason, but I was comparing this value with the actual P1 meter measured power. I assumed this would just be the power summation for all devices every 60s (since HE displays it every few seconds in the pie chart, but I’m not sure if this is exposed for 3rd party apps).

BTW: The PBTH device keeps becoming unavailable, and I have to restart the app.  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/6/56fa6a1ce5975089496f288c35e47f94032c96b8.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 5, 2022, 5:37pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/981 "2022-11-05T17:37:07Z")

</div>

> [@JeeHaa](#):
>
> The PBTH device keeps becoming unavailable, and I have to restart the app.

That is weird. My own devices have no problem, and in your previous diagnostics report I did not see any errors that might cause this behavior. Maybe you should try to reboot Homey and let it run for a few hours. If the problem persist send me another diagnostics report.

---

<div class="post-metadata">

**Author:** ![JaccoStraaijer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jaccostraaijer/32/11777_2.png) [@JaccoStraaijer](https://community.homey.app/u/JaccoStraaijer)\
**Post date:** [November 6, 2022, 3:03pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/982 "2022-11-06T15:03:55Z")

</div>

@Gruijter:

Could it be that, the gas TTF\_EOD prices are not updated? I do not receive any new info after the update to 4.7.6. Tested in 4.8.0. as well. Same result… Tried deleting and adding day ahead prijzen device. Same result… Seems I cannot price settings either for this device. Results in a time-out.

---

<div class="post-metadata">

**Author:** ![Michiel](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michiel/32/16416_2.png) [@Michiel](https://community.homey.app/u/Michiel)\
**Post date:** [November 7, 2022, 1:55pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/983 "2022-11-07T13:55:18Z")

</div>

Hi, I have the same issue. Last update of ‘Gas TTF (EEX EOD)’ was 5 days ago.

---

<div class="post-metadata">

**Author:** ![Martijn\_C](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_c/32/39993_2.png) [@Martijn\_C](https://community.homey.app/u/Martijn_C)\
**Post date:** [November 7, 2022, 3:50pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/984 "2022-11-07T15:50:03Z")

</div>

Hi there,

I have connected the PBTH device with the SMA Energy Manager. Just to make it clear for me; PBTH samples the consumption every x seconds and with that creates the daily and hourly consumption data, correct? So, there might be a difference between the daily number from SMA and the daily number from PBTH, correct? And the PBTH number updates with the actual real time data from the SMA Energy Manager or the average watt data that updates each 2 minutes? Thanks.

---

<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 7, 2022, 4:39pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/985 "2022-11-07T16:39:16Z")

</div>

> [@Martijn\_C](#):
>
> PBTH samples the consumption every x seconds

Not unless you changed the settings. By default PBTH takes every meter update. So that could be every few seconds or many hours, depending how often the source device updates its kWh meter.

> [@Martijn\_C](#):
>
> there might be a difference between the daily number from SMA and the daily number from PBTH, correct?

They should be exactly the same, provided you have an often updating kWh meter, and provided SMA also measures from midnight to midnight local Homey time.

---

<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 7, 2022, 4:49pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/986 "2022-11-07T16:49:33Z")

</div>

> [@JaccoStraaijer](#):
>
> Could it be that, the gas TTF\_EOD prices are not updated?

Maybe they changed their api, or they have server issues. Will have to investigate. Very very busy though, so pls be patient.

As alternative you could use leba for now. Prices are different but similar.

---

<div class="post-metadata">

**Author:** ![Martijn\_C](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/martijn_c/32/39993_2.png) [@Martijn\_C](https://community.homey.app/u/Martijn_C)\
**Post date:** [November 7, 2022, 6:00pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/987 "2022-11-07T18:00:37Z")

</div>

Thanks for the answer.  
Yes, SMA updates almost every second and so does the PBTH device. SMA uses watts instead of kW for consumption (only real time) so that’s what we have to work with unfortunately.

So these updates have nothing to do with the wattage number that updates every 2 minutes?

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

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