Page 1 of 1

Rainfall forecast as a graphic?

Posted: Friday 26 February 2016 10:04
by Awst6000
Hi,
When we go outside we often check the Rainfall Forecast from:
http://www.weeronline.nl/Europa/Nederla ... er/4057340

We check the graphic (The one with the blue bars when it's going to rain) that is on this webpage.
It looks like this graphic uses data from:
http://gps.buienradar.nl/getrr.php?lat=52&lon=4

Is there a way to get this Rainfall forecast graphic (with blue bars) in Domoticz?

For clearance: No need for this to be able to switch things. Just the graphic itself.

Tom

Re: Rainfall forecast as a graphic?

Posted: Sunday 28 February 2016 10:51
by stlaha2007
Hi Tom,

Im nearby, but it depends on a few variables. Can you develop/code your own script(s)? Is the gps.buienrader.nl link giving you the 'right' forecast.

Have looked at both links. Thats why i say nearby (Apeldoorn). I use several sources, like my own Alecto Weatherstation, Adafruits BME280 and the build ins Forecast IO and WeatherUnderground.

As a look (right now) into the text-dump from gps.buienradar.nl it looks like: 000|10.30 000|10.35 000|10.40
Which in my opinion are expected milimeters rain and the there time.

A simple bash script with wget, grep and a curl to insert into Domoticz can give you a graph for rain. I dont know how to let domoticz handle previous and future time and values.

Is it an option to look into ForecastIO or WeatherUnderground first?

Grtz,
Stephan

Re: Rainfall forecast as a graphic?

Posted: Monday 29 February 2016 12:01
by Awst6000
Hi Stephan,
I already tried ForecastIO or and WeatherUnderground, but there is no weatherstation near, so no valid results.

I'm currently testing with this script:
http://www.domoticz.com/forum/viewtopic ... 258#p46258
This script comes near to what I'd like to see on my Dashboard.
Tom

Re: Rainfall forecast as a graphic?

Posted: Monday 29 February 2016 23:09
by stlaha2007
Hi Tom,

Great script, seen it pass by a few times last summer, hope it will work for you.


Grtz,
Stephan

Re: Rainfall forecast as a graphic?

Posted: Wednesday 02 March 2016 9:29
by Awst6000
Hi,
So I'm testing with:
http://www.domoticz.com/forum/viewtopic ... 258#p46258

But I only see results in the Domoticz log. Nothing happens with the virtual device.
(The virtual device first has a rain symbol but after a short while it looks like a small bar with the Domoticz icon. No further info)
Where did it go wrong?
Txs

Re: Rainfall forecast as a graphic?

Posted: Friday 04 March 2016 15:22
by Awst6000
Hi,
Can anybody help me out? I want to update 3 virtual devices. The first two work. The third does not.
commandArray[1] = {['UpdateDevice'] = RainTextIDX_1 .. '|0|' ..tostring(RainPredictionText)}
commandArray[2] = {['UpdateDevice'] = RainTextIDX_2 .. '|0|' ..round(RainPrediction/2.55,0)}
commandArray[3] = {['UpdateDevice'] = RainTextIDX_3 .. '|0|' ='On'}

What went wrong?
Txs

Re: Rainfall forecast as a graphic?

Posted: Friday 04 March 2016 15:28
by jackslayter
commandArray[3] = {['UpdateDevice'] = RainTextIDX_3 .. '|0|On'}

Re: Rainfall forecast as a graphic?

Posted: Friday 04 March 2016 15:39
by Awst6000
Txs, but the third switch only switches off (After clicking it to on manually too).
Here's part of the code I play with:

Code: Select all

commandArray = {}
--   minuten=15
   minuten=30
   RainPrediction = IsItGonnaRain(minuten)
--   RainmmHour=10^((RainPrediction-109)/32)


   if (RainPrediction > 0  ) then
      verw = 3
      commandArray[3] = {['UpdateDevice'] = RainTextIDX_3 .. '|0|On'}
      RainPredictionText=('Regen binnen '..minuten..' minuten. Op schaal van 0-100: '..round(RainPrediction/2.55,0))
   else 
      verw = 2
      commandArray[3] = {['UpdateDevice'] = RainTextIDX_3 .. '|0|Off'}
      RainPredictionText=('De komende '..minuten..' minuten geen regen.')
   end
   
   commandArray[1] = {['UpdateDevice'] = RainTextIDX_1 .. '|0|' ..tostring(RainPredictionText)}
   commandArray[2] = {['UpdateDevice'] = RainTextIDX_2 .. '|0|' ..round(RainPrediction/2.55,0)}



--    print('-- Regen verwacht(0-255 hoe hoger hoe meer regen): '..RainPrediction..' binnen '..minuten..' minuten.')
    print('-- Regen verwacht(0-255 hoe hoger hoe meer regen): '..round(RainPrediction/2.55,2)..' % binnen '..minuten..' minuten.')
    print('-- ' ..RainPredictionText )
    print('-- ' )
return commandArray