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


  • 0

QuickApp - Buienradar Rain ⛈


SmartHomeEddy
 Share

Question

This QuickApp predicts the rain in The Netherlands (and Belgium, a part of Germany and a small part of France and England) with data from the Buienradar, two hours in advance. The value of this QuickApp represents the minutes until rain. If there is no rain expected, the value is set to 0. If it rains, the value is set to 999 and the amount of rain (mm/h) is shown. 

 

Buienradar updates every 5 minutes with intervals of 5 minutes until 2 hours in advance. If rain is expected within the first predicted 5 minutes or less, the QuickApp assumes it is raining. 

If rain is expected or it rains, the interval for checking the Buienradar data (default without rain 300 seconds, equal to the Buienradar updates) is speed up (default 60 seconds) so the QuickApp value is updated more often.

 

Version 1.1 (19th March 2021)

  • Added Child Device for rainfall mm/h
  • Added Quickapp variable for debug level (1=some, 2=few, 3=all). Recommended default value is 1. debuglevel 4 = Rain expected simalation. debugLevel = 5 Raining simulation
  • Freed up some space (3 positions) in the presentation of the amount of rain 
  • Increased the default value of the maximum lines (maxLines) from 23 to 26
  • Changed the unit in case of rain to empty

 

Version 1.0 (25th October 2020)

  • Added the possibility to change the icon according to rain, rain expected or dry. Three not mandatory quickapp variables are added to fill in with the icon number for rain, rain expected and dry. 

 

Version 0.3 (26th September 2020)

  • Build an extra check for an incomplete Buienradar response (sometimes less than two hours)
  • Added global variable maxLines to arrange the maximum amount of lines to indicate the amount of rain (one line for every 0.10mm rain) to fit the screen of your mobile device
  • Decreased the default lines from 25 to 23 to show it right on an iPhone

 

Version 0.2 (4th September 2020)

  • Ready for the new Mobile App 1.9: Added visual level of rain (forecast) with thanks to @tinman from forum.fibaro.com
  • Added warning for latitude and logitude settings where Buienradar Rain has (no) coverage

 

Version 0.1 (15th August 2020)

  • Initial version

 

 

Please login or register to see this attachment.

 

The value of this QuickApp is the same as the value of any other device like a temperature, humidity, CO2 sensor. With the value updated in this QuickApp, you are able to build and use your own scenes to notify, to close or open sunscreens, to close or open windows, etcetera
 

Please login or register to see this attachment.


Or a Block Scene:

Please login or register to see this image.

/monthly_2020_08/A9331C68-066D-46DF-9E4D-CA53F490ECEE.jpeg.904f614b55dca5b1d898d768cd467a2c.jpeg" />


 

Where the value: 

0 = no rain expected

999  = it is raining

any other number = the minutes until rain expected

 

buienradar_rain-1.png.901679cb0641bbb7e2224917de91561e.png

 

In this example rain is expected at 20:55, within 93 minutes. 

Please login or register to see this code.

Where 321 should be your Buienradar Rain device ID


In this example it is raining. In the log you can see how much it is raining: 

E4DBF2B6-03E0-4372-A995-F87626FCFCE6.jpeg.44a19a99924dbf215db25cfac69c82c5.jpeg

Please login or register to see this code.

Where 321 should be your Buienradar Rain device ID

 

 

JSON data copyright: (C)opyright Buienradar / RTL. All rights reserved. 
JSON data terms: Deze feed mag vrij worden gebruikt onder voorwaarde van bronvermelding buienradar.nl inclusief een hyperlink naar

Please login or register to see this link.

Aan de feed kunnen door gebruikers of andere personen geen rechten worden ontleend.

 

 

QuickApp variables (mandatory, they will be automatically added with the default values):

  • intervalR = Number in seconds to update the data when rain expected or raining (default is 60 seconds, must be different to IntervalD)
  • intervalD = Number in seconds to update the data when no rain expected. Buienradar is updated every 300 seconds (default is 300 seconds). 
  • latitude = of your location (default is the latitude of your HC3)
  • longitude = of your location (default is the longitude of your HC3)
  • maxLines = maximum number of | to indicate the amount of rain (one line for every 0.10mm rain)
  • iconR = icon number for rain
  • iconE = icon for rain expected
  • iconD = icon number for dry

 

Coverage:

Latitude (50-54) / longitude (1-10)

 

image.png.68289843ffe67354546644034b26f48c.png
NO or YES coverage

 

Please login or register to see this attachment.


Please login or register to see this attachment.

 

 


 

Download the QuickApp here (download the file and un-zip):

Please login or register to see this link.

or Fibaro Marketplace: 

Please login or register to see this link.


 

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 .fqa
  7. Check the latitude and longitude settings in the QuickApp Variables and change them to your settings (or delete them and push the “save” button to force the right default settings)

 

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

Recommended Posts

  • 0

Hi @SmartHomeEddy,

Thanks for this Quickapp, i find it very useful!!

 

Can you give me a hint how to use the "rain value" in other scripts on my HC 3.

as it is my first QuickApp i dont know how get the value of the quick App to other scripts.
maybe there is a way to set a global variable in HC3 to use this value in a central way ?

  • Like 1
Link to comment
Share on other sites

  • 0
  • Inquirer
  • @pblacky You can use the QuickApp like any other device that has a value that is important to you, like for example a temperature, CO2, Lux, PM2.5 or humidity sensor. 
     

    With this Lua code you can get the actual value of the Quickapp:

    Please login or register to see this code.

    321 is an example, should be the device number of your QuickApp Buienradar Rain

     


    Where the value: 

    0 = no rain expected

    999  = it is raining

    any other number = the minutes until rain expected

     

    An example of a short Lua script (action part):

    Please login or register to see this code.

    Where 321 should be the ID of your QuickApp Buienradar Rain and 28 should be the ID where you want to send the notification to.

    In the declaration part you have to set the condition when you want to get the notification. But you could also leave that blank and set the script to manual and give it a push from your mobile app just to know if it is going to rain within the next two hours. 


    Please login or register to see this image.

    /monthly_2020_08/5A9E2B7E-1432-44FF-8A46-BD5C98BF40E0.jpeg.771002712496804ebefd785e778d2cae.jpeg" />
    To get the text under the value, use:

    Please login or register to see this code.

    Where 321 should be the ID of your QuickApp Buienradar Rain.


    Ofcourse you can also use the block scene. You can select the QuickApp as any other Device and set a condition (value) to let the block scene “do something”. For example if value = 999, then it wil be raining. Or that is maybe too late ?. Than for example > 0 and < 999 then rain is expected within 2 hours. Or set the <999 lower for finetuning within how many minutes rain is expected. I don’t recommend to set an exact value, because the prediction can go from 15 minutes to 5 minutes and if you set a condition on exact 10 minutes, you will get wet?. So alway give it some space with a value between. 

    604BD9F2-A99E-4DDC-BE7C-52215B3761F6.jpeg.3c85185a7fd93d4a285d9bfd8e210222.jpeg

     

     

    Remember the prediction can go from rain to no rain up and down. It is still a prediction. That can give several notification, or close and open sunscreens, etc. It still depends on how certain it is, that it is going to rain. 



    Here is an example Lua script intended to run manually, to get informed about the rain expectations: 

    Please login or register to see this code.

     

     

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    Many thanks @

    Please login or register to see this link.

    For your detailed explanation!
     

    I'm currently working on a code to integrate your Buienradar Rain into my CronJob script.

    If something useful comes out, I'll genetically share it here ;-)

    • Like 1
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Great weater conditions in Europe to work with Buienradar Rain ? ?️⛈

     

     

    Please login or register to see this attachment.

     

     

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0
    8 hours ago, SmartHomeEddy said:

    Great weater conditions in Europe to work with Buienradar Rain ? ?️⛈

     

    Yes indead it rains now ;-)
     

    Wrote a script that asks for variable each hour and makes a debug or mail.

    but in my test i did not get any other Value than "0" out of the Rainradar !?

    Maybe i did something wrong?

     

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Hi @pblacky I have tried your script and I do get a value from the Buienradar Rain QuickApp.

     

    Please login or register to see this code.

    But rain must be expected, I my case within 96 minutes. 
     

     

    Link to comment
    Share on other sites

    • 0

    I thought if it was raining right now, the value should be greater than "0".
    Is that wrong?
    I have set the geodata both in my HC3 and in the variables. Which dates are preferred here?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 26 minutes ago, pblacky said:

    I thought if it was raining right now, the value should be greater than "0".
    Is that wrong?
    I have set the geodata both in my HC3 and in the variables. Which dates are preferred here?


    if no rain is expected the next two hours, the value is 0 

    if rain is expected, the value is the amount of minutes before rain

    if it is raining, the value is 999

     

     

    for testing purpose, you can force the QuickApp to expected rain or raining: 

     

    Please login or register to see this code.

    Or 

    Please login or register to see this code.

    If you remove the - -  and save the QuickApp, you can simulate on of the two situation. 
     


     

    26 minutes ago, pblacky said:


    I have set the geodata both in my HC3 and in the variables. Which dates are preferred here?

     

    The QuickApp uses the lattitude and longitude settings in the two QuickApp variables. If you don’t set them yourself, the QuickApp will get them from your HC3 location. You can always overwrite them with the values you want. 
     

     

     

     

     

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    Test with the variable worked, so I can confirm that your QuickApp is running correctly ;-)

     

    it's a shame that it's raining heavily here in Vienna and the QuickApp shows "no rain".
    So obviously the weather service here in Vienna has no correct informative value ;-(

     

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 15 minutes ago, pblacky said:

    So obviously the weather service here in Vienna has no correct informative value ;-(

     

    If I look at: 

    Please login or register to see this link.

     

    The graphic doesn’t cover Vienna ???

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    i think there is some room for improvement, QA says "rain expected in 50min", however the expected amount of rain is 0,1mm/h (077), that not ever real drizzle, so bit misleading "rain expected" statement. 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Technicaly more than “000” is rain in Buienradar terms. I could add the amount of rain, like when it is raining, to make it more specific to know if you have to put bags with sand in front of your door or it is just a sneeze. ?

     

    The problem with rain is, most of the time it starts with a drizzle. But 5 minutes later, the Buienradar interval, all hell breaks loose (or not). 
     

     

     

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    i know, but that 077 seems to be (in my case) just a noise, watching the raw data since 2hrs or so, the 077 was multiple times for multiple periods of time, however no rain since hours, no clouds on the sky (i can see every single rock on mars), no clouds on Buienradar map for my city. 

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 59 minutes ago, tinman said:

    no clouds on Buienradar map for my city. 


    Buienradar Rain uses the same data as the Buienradar App (in two hour mode), so they should give the same prediction. 
     

    It is a prediction, not a garantee. Buienradar Rain has an algoritme wether the clouds will drop there content. Sometimes it is an easy prediction, otherwise it is difficult. For example pop-up clouds are difficult for rain prediction. Also Buienradar Rain is only a prediction. It doesn’t have actual rain. If you want a precise actual rain, you need a rain sensor, with a risk you are too late. 

     

    That is why in the QuickApp there are two intervals to check the Buienradar Rain data. If rain is expected, the QuickApp goes to an 1 minute interval, a sort of countdown, to get the next 5 minute prediction as soon as possible. If rain is expected within 5 minutes, the QuickApp assumes it is raining. Otherwise it will always report that rain is expected. 
     

     

     

    • Like 1
    Link to comment
    Share on other sites

    • 0
    10 hours ago, SmartHomeEddy said:

     

    If I look at: 

    Please login or register to see this link.

    The graphic doesn’t cover Vienna ???

     

    I am very confused right now!
    I see all of Austria on the map you posted, Vienna is where I made the red mark. So I thought it supported all areas that are visible on the map?
    That would also be Vienna!

     

    Maybe there is someone in my area who also uses your great tool, then we can clarify that ;-)
    I find it very useful for me!

     

    Please login or register to see this attachment.

    Edited by pblacky
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Yes, the red cirkel is on the map, but look at my video you see the measurements stop just before Vienna. ?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 10 hours ago, tinman said:

    i know, but that 077 seems to be (in my case) just a noise, watching the raw data since 2hrs or so, the 077 was multiple times for multiple periods of time, however no rain since hours, no clouds on the sky (i can see every single rock on mars), no clouds on Buienradar map for my city. 


    maybe a blunt question, but are the latitude and longitude settings in the QuickApp Variables the right ones? 
    (Just asking)

    Edited by SmartHomeEddy
    Link to comment
    Share on other sites

    • 0

    I installed the QA over 1 week ago and it has been raining heavily here for a few days.
    My location is south of Stuttgart and the geodata are entered correctly. That means at the

    first start the QA read out incorrect values from the HC3, which I then had to correct manually in the variables.
    So, despite the rain, nothing happens here. (
    [25.08.2020] [11:56:43] [DEBUG] [BUIENRADAR_RAIN_94]: OnInit)

    To me it looks like the QA only provides correct values for Netherlands but is useless for the rest.

    Maybe someone knows a weather service that can be used instead of buienrader.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Thanks @jwi I change the description to Netherlands (and Belgium, a part of Germany and a small part of France and England), apperently only there useful. 

     

    I have put out a question at Buienradar for the coverage and I wil make a test QuickApp to query all latitude and longitude combination. 

     

    Everyone can try with this link, if there is any data: 

    Please login or register to see this link.

     

    Fill in the right latitude and longitude. 

     

    It should return something like this if it rains, or with all 000 if it doesn’t rains:

    Please login or register to see this code.

     

     

     

     

     

     

    Edited by SmartHomeEddy
    (and Belgium, a part of Germany and a small part of France and England)
    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.

     Share

    ×
    ×
    • Create New...