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

<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:** [February 25, 2023, 10:52am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1432 "2023-02-25T10:52:22Z")

</div>

> [@HanZ](#):
>
> clear manual to guide me step by step to setup “Power by the hour” in combination with Plugwise P1 (v3) and ANWB daily prices for gas and electric?

Have a look at this thread: [ANWB Dynamische Energietarieven (adv) Flow maken - #5 by Gruijter](https://community.homey.app/t/anwb-dynamische-energietarieven-adv-flow-maken/74097/5)

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [February 25, 2023, 11:18am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1433 "2023-02-25T11:18:50Z")

</div>

I use the Smart Gateway App with the P1 wifi gateway.

Might now know what the problem is (might be). I bet the PBTH app uses the (sum of) all L1 counters as source (huidig verbruik). This becomes zero when ‘huidige opbrengst’ becomes positive. I requested the developer (@MarcelT ) to add an extra icon to the App to show the sum of all generated and used power in one icon: netto vermogen.

Here the screens with the icons from the Gateway App:

Netto vermogen (recently added by the developer) is the sum of all consumption and deliveries :

 ![Screenshot_2023-02-25-12-16-07-132_app.homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/2/320dd939d89efa29eb28fd5e578091a3cdac1569.jpeg)

The power usage and consumption were seen as two seperate values. One was always zero… I bet PBTH uses ‘huidig verbruik’ value as source, thus never sees negative values.

 ![Screenshot_2023-02-25-12-15-56-165_app.homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/5/f545f138b9c2fd1121cbb77ac158d6a0ec30d3ba.jpeg)

---

<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:** [February 25, 2023, 11:59am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1434 "2023-02-25T11:59:06Z")

</div>

PBTH can use Watt as source (measure\_power) if you have that enabled in the PBTH advanced settings.

But looking at your screenshots I think using ‘energie totaal’ (kWh) would be the best choice. I assume that the kWh goes down when you deliver to the grid. Can you confirm that?

If ‘energie totaal’ is indeed doing that, It is not named meter\_power in Homey. If I know what it is named in the Smart Gateway app I might be able to add it for exception handling in PBTH. @MarcelT I cannot find your source code online. Can you help out here?

---

<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:** [February 25, 2023, 1:44pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1435 "2023-02-25T13:44:19Z")

</div>

v5.4.6 was just released as test: [Power by the Hour App for Homey | Homey](https://homey.app/a/com.gruijter.powerhour/test)

- Summarizer: Added kWh source support for Huawei solar and Iungo
- Fix currency unit change.
- homey-api@1.10.20

@Ludwig_Hallgren this version adds kWh support for your Huawei Solar device.  
@MarcoRuiter this adds kWh support for Iungo.  
If you add a new summarizer it will use kWh as source, in stead of Watts. You can also force to have your existing PBTH summarizer use kWh by disabling ‘use watt as source’ in the advanced settings. Be aware that the PBTH kWh counter will do a one-time jump, and you need to manually compensate the day/month/year start values.

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [February 25, 2023, 2:11pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1436 "2023-02-25T14:11:27Z")

</div>

> [@Gruijter](#):
>
> But looking at your screenshots I think using ‘energie totaal’ (kWh) would be the best choice. I assume that the kWh goes down when you deliver to the grid. Can you confirm that?

No, it does not go down. ‘Productie dal’ does increase due to delivery right now:

 ![IMG_20230225_150908](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/4/c4d0c6e7ddbf0dfe0f69a3a5543c352f4ab453b7.jpeg)

Would be great if @MarcelT and you could sync these great Apps!

PS  
Smart Gateways App is [here](https://homey.app/nl-nl/app/com.cyclone-software.smartgateways/Smart-Gateways/)

---

<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:** [February 25, 2023, 4:05pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1437 "2023-02-25T16:05:25Z")

</div>

> [@Eternity](#):
>
> Smart Gateways App is [here](https://homey.app/nl-nl/app/com.cyclone-software.smartgateways/Smart-Gateways/)

I know. But I need source code 😉

---

<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:** [February 26, 2023, 11:01am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1438 "2023-02-26T11:01:55Z")

</div>

v4.5.7 is released:

- Summarizer: Fix manual money settings

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [February 27, 2023, 3:34pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1439 "2023-02-27T15:34:50Z")

</div>

After consulting the developer of the [Smart Gateway App](https://homey.app/nl-nl/app/com.cyclone-software.smartgateways/Smart-Gateways/) I was advised to remove the original added P1 gateway devise and re-add it.

I don’t mind loosing the insights history, but would live to keep the history / stats of the PBTH devices (gas and electricity) linked to this devise.

What is the best way to approach this? Is it possible to remove a source and add it again \*and8 keeping the PBTH devise?

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:** [February 27, 2023, 5:03pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1440 "2023-02-27T17:03:24Z")

</div>

If you delete the device you will lose history. Nothing can be changed about that.

You could archive all Insights before deleting the device: [[APP][Pro] Archive Insights - export all your Insights data to a NAS, FTP or web folder](https://community.homey.app/t/10976)

Also I would advice to make a Homey backup first, so that you can revert to the situation before deleting the device.

> [@Eternity](#):
>
> history / stats of the PBTH devices (gas and electricity) linked to this devise

If you dont delete the existing PBTH device, and just create a new (second) PBTH device, you will keep the existing PBTH history. But since the source device will be missing, the PBTH device will say it is unavailable. Insights should be there though. (I think ,but cannot guarantee anything 😂)

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [February 27, 2023, 5:20pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1441 "2023-02-27T17:20:58Z")

</div>

Thank you @Gruijter!

---

<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:** [February 28, 2023, 9:40am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1442 "2023-02-28T09:40:45Z")

</div>

> [@Ria\_Banis](#):
>
> solar panels doesn’t reset at midnight to zero

@Ria_Banis  
can you post a screenshot of the PBTH device settings (top part),  
and insights graphs of past 24 hrs for:

- PBTH ‘this\_hour’
- the source device (solarEdge) energy (kWh)

Also on Github you mentioned a second device not working as it should. Can you post screenshots showing what the problem is?

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 1, 2023, 4:12pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1443 "2023-03-01T16:12:49Z")

</div>

Start of new month, error on values?

 ![IMG_20230301_170823](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/0/d0c720f77136e3a71f0e66de81ec473ed345c211.jpeg)

The first of March, so new month. The value for “start of day” and “start of month” are not the same. Why is that.

Also, I see that the actual gas consumption today is 11 m3, but the same measurement in Domoticz, shows 5,x m3. This might be related?

---

<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:** [March 1, 2023, 4:15pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1444 "2023-03-01T16:15:57Z")

</div>

> [@Eternity](#):
>
> The first of March, so new month. The value for “start of day” and “start of month” are not the same. Why is that.

What start date did you set? I bet you don’t start the month on the first day of the month.

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 1, 2023, 4:18pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1445 "2023-03-01T16:18:23Z")

</div>

I think I do!

 ![IMG_20230301_171721](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/d/4db6d4146ba52564ec55926e880b242551aa8e46.jpeg)

PS  
The meter total counter (huidige waarde) in Domoticz and PBTH are equal!

---

<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:** [March 1, 2023, 4:23pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1446 "2023-03-01T16:23:36Z")

</div>

@Eternity Wow. Your ‘this month start’ seems off. I don’t have the issue you have and I cannot reproduce that.

Is your Homey on the right date/time and time zone?  
Did your Homey maybe restart at midnight?

If you restart PBTH or restart Homey now, does anything change?

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 1, 2023, 4:36pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1447 "2023-03-01T16:36:35Z")

</div>

Homey had a firmware update yesterday or the day before yesterday, so it did reboot.

Date seems correct:

 ![IMG_20230301_173404](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/a/cabaf62385c0b280b838c7fce7efeb64066a0180.jpeg)

I will first restart PBTH and check the stats. If that is not the solution, I will PTP.

Will let you know the outcome!

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 1, 2023, 5:00pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1448 "2023-03-01T17:00:27Z")

</div>

Restarting the App didn’t do the trick.  
And, a PTP didn’t either.

I have sent a diagnostic report and here is the code: 03099dc1-03c8-4246-a68f-18091ae7914f

As said, the actual gas usage today seems incorrect too. Perhaps that is related?

PS  
As the counter seen in both Domoticz and PBTH show the same value, I am not worried about the year stats.

---

<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:** [March 2, 2023, 8:16am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1450 "2023-03-02T08:16:08Z")

</div>

Ok thx. Need to dig in my code then. Diagnostics report shows nothing weird. I cannot reproduce the issue myself 🤔 so makes it hard to find the problem.

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 2, 2023, 8:40am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1451 "2023-03-02T08:40:03Z")

</div>

For me only March did not start at zero gas consumption. The March gas consumption is the sum of February _and_ March. The year total is correct!

Perhaps that helps debug!

UPDATE  
I edited the GAS start of March 1st and that was the solution for me. Now let’s hope April 1st will be ‘normal’ again.

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [March 2, 2023, 9:33am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1452 "2023-03-02T09:33:20Z")

</div>

I have made a mistake, @Gruijter! Everything is fine with me.  
The problem why I thought that PBTH gave a wrong value was that the device, a Shelly Plus Plug S (it measures the power and energy of a small PV system), recorded incorrectly. Besides PBTH I have a control flow that calculates the daily energy, but at a different time (between 00:00 o’clock and 60 minutes after sunset). And this value was different from the one in the PBTH device.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/f/cfc1b530d9ce2c5761f2db362821a917d8057d92.png)

Sorry for the trouble!

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

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