Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Question

This QuickApp calculates the cheapest prices for using appliances based on the hourly Tibber energy prices. 
This QuickApp is especially useful for appliances (like charging your car and washing the dishes) that need to run once a day, within a timeframe and during some hours. 
You can use more than one instance of this QuickApp if you need more than one appliance to start in the cheapest hour but not within the same timeslot. 

 

Tibber today and tomorrow prices
The tomorrow prices are available from 13:00 hour. 
If the tomorrow prices aren't available yet and the timeslot is (partially) tomorrow, a temporary calculation and start-stop plan is made with the today prices, until the tomorrow prices are available. 
If the start time plus duration is (partially) tomorrow, for example start time 18:00 and duration 7 hours, the calculation can be made from 13:00 hour when the tomorrow prices are available. 

 

Please login or register to see this image.

/monthly_2024_02/image.png.06942227bb550def87de0f27cd4b86c6.png" />

 

At 04:00 the binary switch will turn ON and at 07:00 the binary switch will turn OFF. 

You would still have to create a script, triggers by this binary switch, to actually turn on the charging of your car, or turn on the dishwasher. 

 

 

IMPORTANT
This QuickApp needs the Tibber Monitor QuickApp to run on your HC3. 
It is important to synchonise this QuickApp with the timing of your Tibber Monitor QuickApp. 
This QuickApp works at its best, if you setup the interval with the intervalOffset just after the Tibber Monitor runs. 
If you Tibber Monitor runs at 5 minutes (300 seconds) after the whole hour, run this QuickApp 5 minutes and 10 seconds (310 seconds) after the whole hour to be sure to get the prices from Tibber Monitor. 
This QuickApp runs every whole hour to turn the switch on and off. If it is time to get the prices from the Tibber Monitor QuickApp, this QuickApp runs every whole hour plus the seconds set in the intervalOffset. 

 

QuickApp logics

  • onInit()
  • getQuickAppVariables() 
  • createVariables()
  • checkPrice()
  • missionControl() 
    • If tibberChild0000 (Tibber Monitor Child devicenumber for "Today 00:00") doesn't exists --> disable QuickApp
    • If current hour is hour to start --> turn the switch ON 
    • If current hour is hour to stop --> turn the switch OFF
    • If current hour is 13:00 (tomorrowPrices) --> checkPrice() to check the prices again to calculate with the tomorrow prices and to plan a new start and stop hour
    • If current hour is the end of the timeslot --> checkPrice() to check the prices again to plan a new start and stop hour
    • updateLabels() every whole hour
  • missionControl() (see above)
  • etc

 

DISCLAIMERS
Use this QuickApp at your own risk. You are responsible for ensuring that the information provided via this QuickApp do not contain errors. 

Tibber is a registered trademark being the property of TIBBER. TIBBER reserves all rights to the registered trademarks.
Information which is published on TIBBER’s websites belongs to TIBBER or is used with the permission of the rights holder. 
Making of copies, presentations, distribution, display or any other transfer of the information on the website to the public is, except for strictly private use, prohibited unless done with the consent of TIBBER. 
Published material on dedicated TIBBER press websites, intended for public use, is exempt from the consent requirement.
Also see:

Please login or register to see this link.

 

Tibber API documentation:

Please login or register to see this link.


Tibber API explorer:

Please login or register to see this link.


Tibber status:

Please login or register to see this link.

 

Variables (mandatory and created automatically)

  • tibberChild0000 = The Tibber Monitor Child devicenumber for "Today 00:00"
  • durationHours = How many hours should the switch be ON (not more than 23 hours)
  • timeSlotStart = At which hour should the timeslot start
  • timeSlotEnd = At what hour should the timeslot end
  • tomorrowPrices = At what hour are the Tibber tomorrow prices available (default = 13)
  • intervalOffset = The offset time in seconds to the interval of every whole hour (default 310 seconds) 
  • debugLevel = Number (1=some, 2=few, 3=all (default = 1)
  • language = Preferred language (default = English (en)) (supported languages are English (en), Dutch (nl), German (de), Swedish (se) and Norwegian (no))

 

Changes version 0.3 (19th March 2024)

  • Solved a small bug when timeslot end was greater than 23 hours


Changes version 0.2 (15th February 2024)

  • Optimized calculations and turnOn/TurnOff
  • Added translations for Dutch (nl), German (de), Swedish (se) and Norwegian (no)

 

Initial (beta) version 0.1 (11th February 2024)

  • Initial beta version

 

How to install

  1. Open the Configuration Interface
  2. Go to Settings > Devices
  3. Click  +
  4. Choose Other Device
  5. Choose Upload File
  6. Choose file from your computer with .fqax

 

Please login or register to see this attachment.

 

 

Edited by SmartHomeEddy
  • Like 3
Link to comment
Share on other sites

Recommended Posts

  • 0

I like the idea Eddy for various purposes. With Tibber and Solar panels this can also be user to turn airco on when prices go negative. so the need to cool down the house after there production hours of the solar installation is reduced. Turning on dish wassers and wasching machines is only possible with modern/smart devices. Most of my equipment is to young to replace and to old to be/turned to smart.

  • Thanks 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Indeed @Langedijk for a lot of users the dishwashers and that kind of appliances aren't smart yet (because too young to replace). I have a dishwasher that connects to WiFi, but only when you turn it on. If still turned off, nothing will happen. 

     

    You could give the airco a boost, but this quickapp only calculates the cheapest time within that timespan in comparison to the other prices. That doesn't have to be  a cheap price, it could also be less expensive. 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Posted (edited)

    I have uploaded a new version (in the first post) with a bug solved (timeslot end was greater than 23 hours, it was one hour too many)

     

     

     

     

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    @SmartHomeEddy
    Well done!

    Finally got to play around with this Trigger, and it is real helpful getting the most out of the cheapest hours.
    Installed two QA triggers for now, to run the water boiler at nighttime and daytime.

    Noticed some issues with Tibber Monitor that gives "Operation canceled" error now and then, that again gives the Trigger problems reading prices, and trigger on/off using wrong prices.
    Need to look some more into that. Last night it got the error 4 times (time: 01.05, 03.05, 04.05 and 08.05)

    Have not noticed if it correct it self on the next hour.
     

    Tibber has also lately really stepped up their game in their app and giving more info.
    And one really cool feature is "Grid Rewards", that for now works against car charging.

    In short - the prices per hour is set at 13.00 each day as you know, but the "real" prices in the market change real time as well if let's say there is overproduction from solar panels.
    So now if the "real time" prices drop (from only seconds or maybe an hour now and then), and my car is connected to my smart charger, Tibber start charging my car with that new price that often are on the minus cost side.
    We then get some "Grid Rewards" in form of money deducted from our bill for helping the grid to use the power that otherwise would go to waste at these times.

    If these real time prices could be picked up in any way and used to trigger let's say the Water boiler, that would be a nice feature. Guess thats where Tibber would try to go in the future...
    For now we only see these low price drops in the app at the time it happens and historically, so dont know if it could be monitored in any way. 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 5 hours ago, dorten75 said:

    Noticed some issues with Tibber Monitor that gives "Operation canceled" error now and then, that again gives the Trigger problems reading prices, and trigger on/off using wrong prices.
    Need to look some more into that. Last night it got the error 4 times (time: 01.05, 03.05, 04.05 and 08.05)

    Have not noticed if it correct it self on the next hour.

     

    That is a timeout from the Tibber server. The interval starts at 5 minutes after the whole hour. That should give Tibber enough time to sort new prices out and so on. Maybe try to give it a minute more, like 6 minutes past the whole hour. (And change the time for this trigger app also)

     

    5 hours ago, dorten75 said:

    If these real time prices could be picked up in any way and used to trigger let's say the Water boiler, that would be a nice feature. Guess thats where Tibber would try to go in the future...
    For now we only see these low price drops in the app at the time it happens and historically, so don't know if it could be monitored in any way. 

     

    Haven't seen these prices in the Tibber Api. I don't know if they are available from the ENTSO-E site. Would be nice to have that as a trigger also. 

     

    Link to comment
    Share on other sites

    • 0

    Hi @SmartHomeEddy

    Found one small issue with the reading and determination of cheapest hours.

    Noticed this when I sat up several Triggers, but struggling a bit to explain it :)
    But it looks like when using "tibberChild0000" the prices get "stuck" on the wrong day until the new prices comes at 13.00, and it loads again.

    So if I am looking for the cheapest 3 hours for today date 04.06, it will use yesterdays prices until 13.00 I guess.

    Here are the two triggers, both using "tibberChild0000", but the first one is the old and was running yesterday, and the last one was created today and getting in theory "Tomorrow 00:00" prices comparing to the first trigger, since it was created now.
    So the first Trigger will start at the wrong time, as long as the cheapest hours are before 13.00 o'clock and the prices are updated.

    Did this explanation make sense? :) 

    [04.06.2024] [10:00:00] [DEBUG] [TIB TRIG VVB DAG ID:1388]: Label: Tibber Trigger - Versjon 0.3 Skru på: 15:00 Slå av: 18:00 Totalpris: 2.2105 NOK Tidsrom: 9:00-23:00 Varighet: 3 timer Priser i morgen: 13:00 (+340 sekunder) 🔴 Today 09:00: 0.8924 NOK 🔴 Today 10:00: 0.8789 NOK 🔴 Today 11:00: 0.8918 NOK 🔴 Today 12:00: 0.8914 NOK 🔴 Today 13:00: 0.8730 NOK 🔴 Today 14:00: 0.7894 NOK 🟢 Today 15:00: 0.7272 NOK 🟢 Today 16:00: 0.8149 NOK 🟢 Today 17:00: 0.6684 NOK 🔴 Today 18:00: 0.8157 NOK 🔴 Today 19:00: 0.9153 NOK 🔴 Today 20:00: 1.0430 NOK 🔴 Today 21:00: 0.9029 NOK 🔴 Today 22:00: 0.8827 NOK Siste oppdatering: 04-06 10:00

    [04.06.2024] [10:00:00] [DEBUG] [TRIG VVB LEIEBOER DAG ID:1396]: Label: Tibber Trigger - Versjon 0.3 Skru på: 14:00 Slå av: 17:00 Totalpris: 1.727 NOK Tidsrom: 6:00-20:00 Varighet: 3 timer Priser i morgen: 13:00 (+310 sekunder) 🔴 Today 06:00: 0.9162 NOK 🔴 Today 07:00: 1.0668 NOK 🔴 Today 08:00: 1.0540 NOK 🔴 Today 09:00: 0.8900 NOK 🔴 Today 10:00: 0.8100 NOK 🔴 Today 11:00: 0.8644 NOK 🔴 Today 12:00: 0.8725 NOK 🔴 Today 13:00: 0.6635 NOK 🟢 Today 14:00: 0.5422 NOK 🟢 Today 15:00: 0.5573 NOK 🟢 Today 16:00: 0.6275 NOK 🔴 Today 17:00: 0.8161 NOK 🔴 Today 18:00: 0.8837 NOK 🔴 Today 19:00: 0.8938 NOK Siste oppdatering: 04-06 10:00

    Link to comment
    Share on other sites

    • 0
    Posted (edited)

    See that the new price table variable is set shortly after the set time interval is finished.
    So when I set the Time interval to 09.00-23.00, it runs before midnight... and then fetch today price again.

    So guess it has to be set to 24.00, to make it look for correct prices through the night and until Tibber publish the next days prices.

    For the up and coming night prices I have used  variable "Tomorrow 00:00", with the timeslot 00.00-07.00
    Then it wrights a new table at 07.00, that show prices 0.0000 until 13.00 and the new prices is launched.

    Edited by dorten75
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 😄 It already is some time ago when I created the quickapp, but it surely was brain training 🧠 for me, with today en tomorrow prices, halve way the day new prices, midnight --> next day and time frames that could be today but also tomorrow. 

     

    I am having a hard time to understand your first post, but your second post seems more easy. Or do you have two questions?

     

     

     

     

     

    Link to comment
    Share on other sites

    • 0
    Posted (edited)

    I totally understand it was a brain training... and the same with me trying to explain the issue :)

    Not two questions, but my latest post is maybe kind of a solution for now, that the time period has to end at midnight. timeSlotEnd
    Then the price variables table updates with today price... and not hold on to "yesterdays" prices, as shown in the debug :

    The debug report above here:
    - it is two different triggers, but they have different prices for the same hours. This debug ran at 10.00 (and every hour) and not correcting the wrong prices.

    The first variable table was generated at 23.00, and the other on at 06.00, pulling from variable "Today 00:00"
     
    Did this make more sence? :)

    Edited by dorten75
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Posted (edited)

    I think I start to understand. I will try to set up the same settings (although I only have Tibber test values)

     

    Please login or register to see this image.

    /monthly_2024_06/PastedGraphic.png.28eb0be54500e3730ab827d456306b05.png" />     Today12000.4802SEX.png.84abb2b23339c196f4da785f09fb2a51.png

     

    Is this the right setup?

    (timeslot 9-23 and 6-20 with duration 3 hours)

     

    Edited by SmartHomeEddy
    • Like 1
    Link to comment
    Share on other sites

    • 0

    I had on for 09.00-23.00 and one for 00.00-07.00, and 3 hours yes. 
     

    The first one getting today00.00 price and the last on getting tomorrow00.00 prices after the latest prices is published.

     

    Link to comment
    Share on other sites

    • 0

    Looks like setting it to 24.00 made it get the correct today price at least, so a fix for now. 
     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Posted (edited)

    I will try to reproduce the situation, to get a grip on the logics. 

     

    So this are your settings for the timeslot and duration?

    Please login or register to see this image.

    /monthly_2024_06/PastedGraphic6.png.9ec21e23d0df21df747168e296a03c27.png" />  PastedGraphic7.png.aba5c674e67a027215d1902e521c8dec.png

     

    I started this settings at 8:26 and there are no prices for tomorrow available. So the cheapest timeslot is already gone. But when the new prices come available, there will be a new calculation for the cheapest timeslot. At least, that is how it should work, lets see. 

     

    (and added the source Tibber Monitor prices)

    image.png.b53695dcdaef0bfe72221b517339ba66.png

     

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    Yes

     

    You allready see it here in your printscreen.
    the setup 09.00-23.00 has the same prices in both pictures, because it pulled prices again at 23.00… and will keep it until new prices comes at 13.00 today.
    The last pic say it updated 08.00 today, but have yesterdays prices. 

    So the prices for the times 09.00-13.00 will be wrong until then.

     

    The issue is timeslot and pulling again before midnight using variable today00.00. 
     

    For now I cant see any other solution then default have time slot at 24.00.

     

    For the night hour prices I use tomorrow00.00, so it does not reset.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • These are the logics of the QuickApp:

    - onInit()
    - getQuickAppVariables() --> Get all Quickapp Variables or create them
    - createVariables() --> Create all Variables 
    - checkPrice() --> Determine the cheapest cycle of hours
    - missionControl() --> The central loop
      - If tibberChild0000 (Tibber Monitor Child devicenumber for "Today 00:00") doesn't exists --> disable QuickApp
      - If current hour is hour to start --> turn the switch ON 
      - If current hour is hour to stop --> turn the switch OFF
      - If current hour is 13:00 (tomorrowPrices) --> checkPrice() to check the prices again to calculate with the tomorrow prices and to plan a new start and stop hour
      - If current hour is the end of the timeslot --> checkPrice() to check the prices again to plan a new start and stop hour
      - updateLabels() every whole hour
    - missionControl() (see above)
    - etc

     

    If these actions take place, searching, where can it go wrong (maybe depending on the timeslot chosen) ?

     

     

    Link to comment
    Share on other sites

    • 0
    4 hours ago, SmartHomeEddy said:

      - If current hour is the end of the timeslot --> checkPrice() to check the prices again to plan a new start and stop hour

    If this happens before midnight, it will have the prices through the night and until 13.00 that are old prices. 
     

    So maybe it needs to check prices only at midnight to get the correct “today 00.00”

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I think it needs to check for new prices at midnight, unless the timeslot runs through midnight (in that case at the end of the timeslot there will be a new price check). 

     

    • Like 1
    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...