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

I guess this could be done with two flows. One that runs each new day that calculate the diff between max price and min price and store the value in a variable. The other flow runs each new hour and calculates the gain value.

daypricediff = maxdayprice-mindayprice

gain= (maxdayprice-currentprice)/daypricediff

this will give a zero value when currentprice=maxdayprice and one when currentprice=mindayprice like you specified in the post.

1 Like

Sorry missed that completely. I can work with that. :+1:

1 Like

Just clarification. Is the rank so that lower value is higher price or other way around?

1 is lowest price

1 Like

Good idea, I already made that.

But there is a scaling problem. When there is days that have for example high price in every other hour but one. The scaling then makes that only on that one hour would have the gain value 1 and all others are close to 0. If one uses this for heating control the house would be cold :wink:

I have also missed that this app has the possibility to add a ā€œextra time of day markupā€. This is excelent feature. Thanks @Gruijter for developing this app constantly. :+1:

1 Like

Not true. The ranking has no weight. So 1 cheap hour and 23 expensive hours still has each hour ranking 1 through 24. So say you want 6 hours of heating per day, just select all ranks below 7 ( which is equal to selecting the 6 cheapest hours of the day) , and weigh the actual hour e.g. as 1/rank). Or whatever weighting scheme you can come up with, such as 3/(rank+2).

Or go for the scheme @Antohagg suggested

Many thanks for your kind donation @peltsi51 :heart::beers:

2 Likes

That means that you want the gain value to be centered around the average price? I.e. temperature to be set to 21 degrees when you have the average price.
Not sure if this is the simplest formula but it might work.

Flow1(run at midnight):
daypricediffaboveaverage = maxdayprice-averagedayprice

daypricediffbelowaverage = averagedayprice -mindayprice

Flow2(run every hour):
Use a condition to check if current price is equal or above average then use this formula to calculate gain

gain = ((maxdayprice-currentprice)/daypricediffaboveaverage)/2

else

gain =(((mindayprice-currentprice)/daypricediffbelowaverage)/2)+1

This will give a zero value when currentprice=maxdayprice and one when currentprice=mindayprice and 0.5 when you hit averagedayprice

btw, sorry for all the edits, on my mobile so cant test it out.

Tomorrow’s electricity price data has not been updated :face_with_diagonal_mouth:

Again problems with price updates. Prices update, but not every hour, they update between hours…

Another thing I’ve noticed is that when restarting Homey it takes a few hours for the prices to update regularly. Restarting the app won’t help.

Is the problem in the app or in price data?

Processing: 1000020502.jpg…

It seems the entsoe api is being migrated to a new version. Will need time to find out what they are doing.

1 Like

Hoi Robin,

I’ve got a reply from the developer of the Growatt (and Solar edge) modbus app:

Is this enough information to get the Growatt Battery system added to PBTH-battery?

mmh. not clear to me what they represent. When I dont forget I will contact him for clarification.

1 Like

ENTSOE is indeed migrating their API. I now implemented a change to support the new API, but there seems to be a bug on their end. Any day that has consecutive hourly prices that EXACTLY match are skipped in the response. This messes up the data and thus PBTH disregards it all.

I contacted ENTSOE support about this and am awaiting their response…

1 Like

new version 6.6.3 available for testing: Power by the Hour App for Homey | Homey

  • Added flow compare to monthly average (thx @Antohagg !)
  • New ENTSO-E API implemented.
  • Fix JSON example. (thx @ Anna Steinsaphir !)
  • homey-api@3.6.3
2 Likes

Thank you Gruijter for your work!
After update, no changes - today’s electricity market prices are not renewed.
Do they have to be restored instantly, or do they have to wait a while?

See this [APP][Pro] Power by the Hour: Insights per hour, day, month and year - #2590 by Gruijter

1 Like

I want to measure the total energy usage of my home, ignoring the solarpower output.

The energy card output is exactly what this does: total energy EM + solarpanel outpt.
But I can’t seem to use this value in Power by the hour?

HOMEY_ENERGY_SMARTMETER is returning negative values:

How can I use the total like in the card/widget above? Can I use a logic variable to send the current usage (so energy EM + solar output EM) to a PBTH device?

I am replacing my current P1 reader with another brand P1 reader.

It would be great if the historical data from the old P1 devices in PBTH (gas and electricity) can be ported to the new P1 meter.

Can I update the P1 source in the current PBTH devices? What would be the best approach?