Monthly Rainfall Total **Solved**

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

Moderator: Mattk

Post Reply
tenaceboy
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Thu Aug 27, 2015 10:29 pm

Monthly Rainfall Total **Solved**

Post by tenaceboy »

I'm trying to have an email sent to me via "one time alarm" of the total rainfall for the month at the last day, last hour, last minute of the month. Here is what I have:

Raise Cond: ((([M] = 2 & [D] = 28) | ( ([M] = 4 | 6 | 9 | 11 ) & [D] = 30 ) | ( ([M] = 1 | 3 | 5 | 7 | 8 | 10 | 12 ) & [D] = 31 ) ) & ([h] = 23 & [m] = 59 & [s] = 20 ))

Clear Cond: ([hh] = 1) && ([mm]=1)

Output: Weather Station# Day [D] of Month [M], Total Rain This Month = [rain0total-monthsum=in.2] inches

Can anybody let me know where I'm going wrong. I understand that I might miss a small bit of rainfall at the end of the day and also leap year is not addressed.
Last edited by tenaceboy on Mon Nov 02, 2015 3:20 am, edited 1 time in total.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7874
Joined: Mon Oct 01, 2007 10:51 pm

Re: Monthly Rainfall Total

Post by admin »

Statements like this are not working:
tenaceboy wrote: [M] = 4 | 6 | 9 | 11
must be something like "([M]=4) | ([M]=6) | ..."
glennpm
Senior Boarder
Senior Boarder
Posts: 54
Joined: Sun Aug 03, 2014 8:47 pm

Re: Monthly Rainfall Total

Post by glennpm »

Hi,


I've been interested in getting monthly reports like this to. Did you get it to work and can you please post the code for it?

Thanks
tenaceboy
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Thu Aug 27, 2015 10:29 pm

Re: Monthly Rainfall Total **Solved**

Post by tenaceboy »

This is what I got working. Admin – thanks for the assistance.

Again, you might miss a small bit of rainfall data in the last minute of the last day of month. Also, leap year is not addressed (you can change the “28” to “29” in the raise condition in early February on leap years).

Email: One-Time Alarm

Raise Cond: (((([M] = 2) & ([D] = 28)) | ((([M] = 4) |([M]= 6)| ([M]= 9)| ([M]= 11)) & ([D] = 30)) | ((([M] = 1) |([M]= 3) |([M]= 5)| ([M]= 7)| ([M]= 8)| ([M]= 10)| ([M]= 12)) & ([D] =31))) && (([h] = 23) & ([m] = 59)))

Clear Cond: ([hh] = 1) && ([mm]=1)

Output:Your Weather Station#Total Rain This Month ([M]) = [rain0total-monthsum=in.2] inches
Post Reply