Incorrect rain dates MBtags/Trends page **solved**

All about the standard Meteobridge devices based on mobile routers from TP-Link, D-Link, ASUS

Moderator: Mattk

Post Reply
hymrog
Expert Boarder
Expert Boarder
Posts: 83
Joined: Sat Feb 01, 2014 1:25 am
Contact:

Incorrect rain dates MBtags/Trends page **solved**

Post by hymrog »

Hello
I noticed some inconsistancies today regarding rain data on my web page and ran a dump on the data for the MBtags. from my Saratoga templates. I noticed that all rainfall data from today had a time stamp of 7.27.2013 which is the first day I started using meteobridge.

I also noticed that my Trends page is showing negative rain amounts for the 5, 10, 15, 30, 60 min increments.

Here are a few lines of the dump:

$WX['rain0total-dmin'] = '0.15'; // rain min of today
$WX['rain0total-dmintime'] = '20130727194201'; // rain timestamp min of today
$WX['rain0total-dmax'] = '0.14'; // rain max of today
$WX['rain0total-dmaxtime'] = '20130727194201'; // rain timestamp max of today

Thanks for your time...
g
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Incorrect rain dates MBtags/Trends page

Post by admin »

Although it does not throw a syntax error, dmin and dmax are NOT defined for cumulative sensors like rain0total.
Please have a closer look at the wiki on the page about templates.
wiki wrote:Sensors that deliver cumulated data like "rain0total" and "sol0evo" should be used with the following selectors only:
  • daysum or sumday, monthsum, yearsum, allsum, ydaysum: selects summerized delta values from today, this month, this year, all time or yesterday. Example: "rain0total-sumday" is todays rain fall.
When you are looking for the timestamp when rain falls most heavily, please make use of "rain0rate" which is not cumulative and supports dmax and dmaxtime.

Background: I decided not to support dmin as the start counter value for rain ticks and dmax being the end value of the day because wrap arounds of these counter can occur and a subtraction (as you did) would bring false results. Therefore, Meteobridge takes care of summing up the increments and also handles wrap arounds the right way and presents the sum for a given period to you.
hymrog
Expert Boarder
Expert Boarder
Posts: 83
Joined: Sat Feb 01, 2014 1:25 am
Contact:

Re: Incorrect rain dates MBtags/Trends page **solved**

Post by hymrog »

I appreaciate the explanation and makes sense..

Regards
g
Post Reply