Page 1 of 1

Monthly Rainfall Total **Solved**

Posted: Thu Aug 27, 2015 10:59 pm
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.

Re: Monthly Rainfall Total

Posted: Sat Aug 29, 2015 12:39 am
by admin
Statements like this are not working:
tenaceboy wrote: [M] = 4 | 6 | 9 | 11
must be something like "([M]=4) | ([M]=6) | ..."

Re: Monthly Rainfall Total

Posted: Wed Sep 16, 2015 12:03 am
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

Re: Monthly Rainfall Total **Solved**

Posted: Sun Nov 01, 2015 8:25 pm
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