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

<div class="post-metadata">

**Author:** ![cstromme](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cstromme/32/60204_2.png) [@cstromme](https://community.homey.app/u/cstromme)\
**Post date:** [February 11, 2024, 10:29pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2208 "2024-02-11T22:29:56Z")

</div>

I do not understand what I’m doing wrong here. It’s currently 23 at night. It’s less than 8 hours till 7 in the morning. This hour is currently the cheapest hour before 7 tomorrow morning. And yet my card below goes to the false output every time.

 ![Card](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/0/30512db6a7ff084a77ef9f6afe1c680782b02809.png)  
 ![Prices](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/b/0b8117db0170f911547d5891ccdfdbaebcb63a6e.png)

---

<div class="post-metadata">

**Author:** ![ErikT](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erikt/32/48046_2.png) [@ErikT](https://community.homey.app/u/ErikT)\
**Post date:** [February 12, 2024, 10:57am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2209 "2024-02-12T10:57:07Z")

</div>

Hi Gruiter,

The ROI flow is working perfectly. I do come across a small issue, though. When the Sessy is completely discharged and should start discharging again based on the hourly rate, I receive the opposite notification. In that case, I see a charging notification instead. Are you experiencing the same issue, and do you have any suggestions on how to address this differently?

 ![IMG_6972](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/2/3247e718c0d07196aa66ce9bbaf5ef39b3567994.jpeg)

---

<div class="post-metadata">

**Author:** ![Casper\_Nielsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/casper_nielsen/32/79073_2.png) [@Casper\_Nielsen](https://community.homey.app/u/Casper_Nielsen)\
**Post date:** [February 12, 2024, 11:05am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2210 "2024-02-12T11:05:58Z")

</div>

Hi guys, I need some help - there is something basis I am missing here ☹

I’ve setup the Shelly 3em and I’ve added it to Homey.  
Then I’ve installed PBTH and added the 3EM to it - creating 3em\_ZPower (I know Z is a different Icon, but I can’t find that right now)

and I get the insights on the Homey - so data is flowing.

First step: What I want to do is to create a flow that will take create a report from a given month, where I for every hour of every day, get the total power consumption.

Then I would have a flow pull the tarifs for those hours to calculate the price for each hour.

But how to I create these reports?  
It seems that if i just export the insights - I have to do it manually for each day, if I try to export a month - I don’t get every hour og every day.

---

<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 12, 2024, 11:19am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2211 "2024-02-12T11:19:22Z")

</div>

> [@ErikT](#):
>
> see a charging notification instead

It is actually a discharging attempt. A positive power indicates discharge. But the SoC calculation is wrong. So it is just a cosmetic bug. You can check your insights to see it didnt charge.

---

<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 12, 2024, 11:25am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2212 "2024-02-12T11:25:44Z")

</div>

> [@Casper\_Nielsen](#):
>
> But how to I create these reports?

Exporting historic data via a flow is not something Homey supports out of the box. You can manually download Insight data from the web UI. But I created this tool to automate it via a flow:

> [@\[APP\]\[Pro\] Archive Insights - export all your Insights data to a NAS, FTP or web folder](https://community.homey.app/t/app-pro-archive-insights-export-all-your-insights-data-to-a-nas-ftp-or-web-folder/10976):
>
> Export Insights Make a backup of all your insights to your NAS, FTP or WebDAV compliant storage. The insights are zipped and stored in .csv format so you can open them in excel and create all kinds of statistics and charts. The export also includes a JSON version of the data. Backups can be easily scheduled by using the trigger card in a flow. You can schedule a full backup, or a backup per app. To setup enter the local share (NAS) information and/or the webDAV info…

It is a bit tricky to setup though. So if it doesnt work for you, ask Athom for native data export flows 😉

---

<div class="post-metadata">

**Author:** ![RogerSt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rogerst/32/12432_2.png) [@RogerSt](https://community.homey.app/u/RogerSt)\
**Post date:** [February 12, 2024, 8:04pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2213 "2024-02-12T20:04:26Z")

</div>

Whaaa… help please. I have tried so many combinations of fixed and % prices but I cannot seem to make it work. The PBTH prices are structurally too low.

For Tibber, I have the following info:  
**Het kostenplaatje**  
**Vast tarief:** €3,30 per maand  
**Variabel tarief:** de [dynamische uurprijs](https://tibber.intercom-mail.com/via/e?ob=L%2BDP%2BD5ZldhKihjmju7lG%2F1NCBFiHRbYateUd3q9nNU%3D&h=643c6276e6d1642743b782273f1b5b8375ece38e-b84ayfyf_51354732498355&l=68c1c1e9a761e41641537d6cffd5c144f0f1f53e-51455408) van stroom  
**Garanties van Oorsprong en onbalanskosten:** €0,018 per kWh  
**Belastingtarieven 2024:**  
Verbruik tot 10.000 kWh per jaar: €0,10880  
Verbruik van 10.000 tot 50.000 kWh per jaar: €0,09037  
Verbruik van 50.000 tot 10.000.000 kWh per jaar: €0,03943  
**Vermindering energiebelasting per jaar:** €521,78  
**Netbeheerderskosten:** afhankelijk van je aansluiting en [netbeheerder](https://tibber.intercom-mail.com/via/e?ob=ME5uhxUDAGle%2FoiuXJnQTW8sjLRFIO71mgVguaf8zYf%2Bh7LQQQjlgUN2zVZ0lrRFxH%2FLVSy4adFY6V4Csq9dCdb1yIsmb0YZMIoMclYBRbR8aShkQK1JiA%2FxkkepTL%2BI&h=3a0d6465e27c5e4fbf68748c7444741725c84f43-b84ayfyf_51354732498355&l=a7fee698e8b921fa99f664f48e71aa371411336c-51455409).

I have configured on the NL\_Netherlands rate device:

- 21% VAT/BTW variable markup
- 0.018 + 0.10880 = 0.1268 fixed markup

Still, the tibber app displays higher prices than PBTH.  
Example:

- Tibber: 0.24 euro
- PBTH: 0.2134 euro

Can someone please explain how I need to fix the PBTH electricity prices for them to match the tibber prices?

Thanks,  
Roger

---

<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 12, 2024, 8:42pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2214 "2024-02-12T20:42:55Z")

</div>

> [@RogerSt](#):
>
> 0.1268 fixed markup

You forget that over the tax we get taxed (really? Yes, really! It is a disgrace)

Fixed markup should be 0.15343

---

<div class="post-metadata">

**Author:** ![CaptainVoni](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/captainvoni/32/3549_2.png) [@CaptainVoni](https://community.homey.app/u/CaptainVoni)\
**Post date:** [February 13, 2024, 1:05pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2215 "2024-02-13T13:05:10Z")

</div>

In the settings I can currently specify a fixed and a variable markup. My electricity tariff (aWattar Hourly) includes another component: a variable markup based on the absolute value of the price, i.e. negative prices will be treated as positive for this markup.

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/8/d829d5a7e5e23788a0828500ecb240f2f3b01eae.png)

Would it be possible to include such markup in the 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:** [February 13, 2024, 1:49pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2216 "2024-02-13T13:49:28Z")

</div>

Should be possible. Porblem is that there are so many variants out there. Including tarriff depending on maximum load in the past 15 minutes, etc etc.

But please add your feature request here: [[APP][Pro] Power by the Hour [Feature Requests]](https://community.homey.app/t/app-pro-power-by-the-hour-feature-requests/69740)

---

<div class="post-metadata">

**Author:** ![CaptainVoni](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/captainvoni/32/3549_2.png) [@CaptainVoni](https://community.homey.app/u/CaptainVoni)\
**Post date:** [February 13, 2024, 2:35pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2217 "2024-02-13T14:35:35Z")

</div>

Thanks - added the request there.

---

<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 21, 2024, 2:50pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2218 "2024-02-21T14:50:01Z")

</div>

@Ake_Svensson many thx for your kind donation! 🍻❤

---

<div class="post-metadata">

**Author:** ![Ake\_Svensson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ake_svensson/32/58625_2.png) [@Ake\_Svensson](https://community.homey.app/u/Ake_Svensson)\
**Post date:** [February 21, 2024, 3:05pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2219 "2024-02-21T15:05:23Z")

</div>

Hi @Gruijter I have use your app for a while and it works really great.  
I use it for solar panels and others.  
Recently I just add a Battery Goodwe Inverter and a BYD battery.

I have an currency issue with the Home Battery monitor it shows € instead of SEK as I have in the other units.

 ![Skärmavbild 2024-02-21 kl. 15.56.21](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/5/650206a3e56290ac20e23749fb4db050c078beac.png)

I can’t find any place to change this, can you please advise?  
It believe the value is correct in SEK and just wrong character  
 ![Skärmavbild 2024-02-21 kl. 16.02.21](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/b/db88000487ded4c9d2e928ad6dc97306f0b7cab9.png)

Here I can find it on the other units  
 ![Skärmavbild 2024-02-21 kl. 16.01.05](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/d/fd7424e7d9c52c022f2fe369fb5cbaf9ae953cb1.png)

Best regards

---

<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 21, 2024, 3:34pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2220 "2024-02-21T15:34:39Z")

</div>

> [@Ake\_Svensson](#):
>
> believe the value is correct in SEK and just wrong character

That is right. I havent made the currency symbol settable for the battery summarizer. I might add that if I dont forget. But for now you can just ignore the Euro sign.

---

<div class="post-metadata">

**Author:** ![Ake\_Svensson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ake_svensson/32/58625_2.png) [@Ake\_Svensson](https://community.homey.app/u/Ake_Svensson)\
**Post date:** [February 21, 2024, 4:12pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2221 "2024-02-21T16:12:10Z")

</div>

Thanks for the quick reply

---

<div class="post-metadata">

**Author:** ![Sander\_Bakker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sander_bakker/32/80078_2.png) [@Sander\_Bakker](https://community.homey.app/u/Sander_Bakker)\
**Post date:** [February 23, 2024, 3:23pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2224 "2024-02-23T15:23:01Z")

</div>

I have an virtual PBTH device which i want to reflect a another realtime power sensor. So it has no kWh measuring is it something i can set?

---

<div class="post-metadata">

**Author:** ![Ben\_van\_der\_Beek](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ben_van_der_beek/32/146747_2.png) [@Ben\_van\_der\_Beek](https://community.homey.app/u/Ben_van_der_Beek)\
**Post date:** [February 24, 2024, 11:23am UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2225 "2024-02-24T11:23:26Z")

</div>

It’s more a general Homescript question, but I can’t find the answer in any documentation:  
If I use the Power by the Hour “Provide prices JSON for …” a tag named “Prices” is set containing the json string with the hourly prices.  
I want to read (and use) this tag in Homeyscript.  
Its clear how to set a tag in Homeyscript ( await tag(‘MyTag’, ‘123’); ), but I can’t find a function for Homeyscript to read the tag “Prices” set by “Provide prices JSON for …”.  
Can anyone help me with this?

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [February 24, 2024, 12:36pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2227 "2024-02-24T12:36:22Z")

</div>

@Ben_van_der_Beek  
When the prices become available I move the json’s to (string) logic variable’s and use those in homeyscript’s at the moment I need them.  
You also can pass them to homeyscript, in the same flow the tag is available, using an argument.

---

<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 24, 2024, 12:38pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2228 "2024-02-24T12:38:56Z")

</div>

new version 6.2.2 is available as test: [Power by the Hour App for Homey | Homey](https://homey.app/a/com.gruijter.powerhour/test/)

- BAT: Improved SoC reporting in flow.
- German translation updated (thx @DirkG )
- homey-api@3.4.25

---

<div class="post-metadata">

**Author:** ![Ben\_van\_der\_Beek](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ben_van_der_beek/32/146747_2.png) [@Ben\_van\_der\_Beek](https://community.homey.app/u/Ben_van_der_Beek)\
**Post date:** [February 24, 2024, 12:53pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2229 "2024-02-24T12:53:49Z")

</div>

Good to hear Torch1969, but how do I “pass them to homeyscript” and what do you mean by “using an argument” (wich one?). Could you give me the homescript code you use?  
Regards,  
Ben

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [February 24, 2024, 3:20pm UTC](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/2230 "2024-02-24T15:20:19Z")

</div>

> [@Ben\_van\_der\_Beek](#):
>
> but I can’t find a function for Homeyscript to read the tag “Prices” set by “Provide prices JSON for …”.  
> Can anyone help me with this?

something like

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/e/1e8858e75afdef398f6f1412065cc3c0b11e7202.png)

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

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