Page 1 of 1

"[rain0total-sumday]" showing up instead of number *solved*

Posted: Thu Sep 18, 2014 4:36 pm
by Medor
I have my Meteobridge sending data every minute to my server through an HTTP push. The Meteobridge local time is on time zone Europe/Paris, currently UTC+2 (summer time).
The data is processed by a PHP script which feeds a plain texte file, 1 new line every hour, discarding the intermediate data.

As displayed in this text file, the rain total for the current day ("mm/jour") is reset to 0 and feeds the rain total for the previous day (mm/hier) at midnight local time, which is normal.
But somedays, at midnight local time, the current day rainfall column in the text file shows the raw descriptor "[rain0total-sumday]" instead of a proper number.
Is this a special code which is sent at this exact time by Meteobridge which the PHP script should understand as meaning "not available" or something like that ?

Extract from the text file:

Code: Select all

Date------UTC-----OutTemp--OutHum-InTemp-Vent-Rafale---mm/h---mm/jour--------mm/hier------solTemp--solHum1--solHum2
17/09/2014	21:00	22.1	76.0	23.9	3.2	7.6	  0.0	  0.2	          0.0	      20.6	200	     200	
17/09/2014	22:00	20.7	81.0	23.8	1.4	4.5	  0.0     [rain0total-sumday] 0.0     20.0   200	     200	
17/09/2014	23:00	20.1	82.0	23.9	1.7	5.8	  0.0	  0.0	          0.2	      20.0	200	     200

Re: "[rain0total-sumday]" showing up instead of a number

Posted: Thu Sep 18, 2014 4:55 pm
by admin
When rain sensor is offline for a too long time, the variable will not be replaced but appear literally.

There is a simple measure to set in a default values in case of this as explained in the wiki.

[rain0total-sumday:0] does the trick.

Re: "[rain0total-sumday]" showing up instead of number *solv

Posted: Sat Sep 27, 2014 3:10 am
by Mattk
This appears more like a midnight (00:00) rollover issue?

Re: "[rain0total-sumday]" showing up instead of number *solv

Posted: Sat Sep 27, 2014 11:54 pm
by admin
Mattk wrote:This appears more like a midnight (00:00) rollover issue?
yes, this can also be the reason for being no data there for the new day. However, the ":" default does the trick,

Re: "[rain0total-sumday]" showing up instead of number *solv

Posted: Sun Sep 28, 2014 12:04 am
by Mattk
Yes the default might do the trick on the output but doesn't really solve the input causing this default to trigger.