Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Get rain per hour

Discussion and questions about Cumulus weather station software version 1. This section is the main place to get help with Cumulus 1 software developed by Steve Loft that ceased development in November 2014.
Post Reply
inaciovieira
Posts: 54
Joined: Sun 01 May 2011 7:13 pm
Weather Station: Watson
Operating System: Windows 7
Location: Funchal

Get rain per hour

Post by inaciovieira »

Hi i am traying to get the values of the hourly rain, to put them on a graph like you can see in the image


Image
I want to get the values from 00:00 to the current time.
I have search the cumuluswebtags.txt and didn´t find nothing that gives me the rain on one hour, only see the <#rhour>.
sorry for my bad english.
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Get rain per hour

Post by steve »

Cumulus doesn't store any data like that. You could do it with the <#RecentRainToday> web tag, using the 'h=' parameter, but you're going to have to do some calculating yourself (in Javascript or whatever).

For example, if it is currently 16:00, and you want the rain that fell between 14:00 and 15:00, then you would subtract <#RecentRainToday h=2> from <#RecentRainToday h=1> (i.e. subtract the total at 14:00 from the the total at 15:00 to give the amount between 14:00 and 15:00).
Steve
inaciovieira
Posts: 54
Joined: Sun 01 May 2011 7:13 pm
Weather Station: Watson
Operating System: Windows 7
Location: Funchal

Re: Get rain per hour

Post by inaciovieira »

Thanks steve, i'm goingo to tray
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Get rain per hour

Post by steve »

Brave man - good luck!
Steve
inaciovieira
Posts: 54
Joined: Sun 01 May 2011 7:13 pm
Weather Station: Watson
Operating System: Windows 7
Location: Funchal

Re: Get rain per hour

Post by inaciovieira »

hi,
I have ben trayng what steve tell and year are some values
$time = "21:05 on 05 Março 2013";
$rfall = "51,9"; // the total rainfall so far today

$rain1hour = '46,5'; //Chuva 1 hora atras
$rain2hour = '45,0'; //Chuva 2 hora atras
$rain3hour = '44,7'; //Chuva 3 hora atras
$rain4hour = '44,7'; //Chuva 4 hora atras
$rain5hour = '44,1'; //Chuva 5 hora atras

well a don´t understand how it works, I'm confiused,
the $rain1hour-$rain2hour=1,5mm this value shoulbe time 20:00 to 21:00 corret?
or that value is 19:00 to 20:00
wen the rain today is 51.9
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Get rain per hour

Post by steve »

If it's 21:05 now, then <#RecentRainToday h=1> is the total at 20:05, i.e. one hour ago. So $rain1hour-$rain2hour=1,5mm is the amount that fell between 19:05 and 20:05.
Steve
inaciovieira
Posts: 54
Joined: Sun 01 May 2011 7:13 pm
Weather Station: Watson
Operating System: Windows 7
Location: Funchal

Re: Get rain per hour

Post by inaciovieira »

Thanks steve.
Another question, if i import the the $rhour to a mysqli base ever hour the will give me the rain for one hour corret?
ex: import th $rhour at 00:00, 01:00, 02:00,03:00, 04:00........
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Get rain per hour

Post by steve »

Yes, that's correct.
Steve
inaciovieira
Posts: 54
Joined: Sun 01 May 2011 7:13 pm
Weather Station: Watson
Operating System: Windows 7
Location: Funchal

Re: Get rain per hour

Post by inaciovieira »

Hi,
here is the result of what i make with the $rhour
http://meteocasas.com/index.php/grafico ... -acumulada
User avatar
steve
Cumulus Author
Posts: 26701
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Get rain per hour

Post by steve »

Very good. But - the four totals for 15/16/17/18 add up to 5.1, and it says at the top that you've had only 3.9 today?
Steve
Post Reply