Page 1 of 1

Rainrate Webtags

Posted: Sun 20 Feb 2022 3:37 pm
by whitling2k
I'm trying to use the web tags to log the highest rainfall rate over the last 15 minutes to a CSV file (I would take peak rainfall rate over the last hour instead if possible)?

<#rrate> seems to give an instantaneous readout, and the various other tags seem to give daily/monthly max: <#rrateTM> <#rrateYM> etc

The recent history, as far as I can tell, doesn't cover rainfall rates. And I don't think I can massage it to give me rainfall accumulation from the last hour either?

Have I missed anything?

Re: Rainrate Webtags

Posted: Sun 20 Feb 2022 3:48 pm
by sfws
Is the rain rate recorded every minute here any use to you?

Re: Rainrate Webtags

Posted: Sun 20 Feb 2022 7:03 pm
by whitling2k
I'll give it a try - my understanding is that this is just the max rainrate over the previous minute - I don't think I can manipulate it to give me the max rain rate over the last 15 can I?

I wonder if I could write it out every minute then take the max from the file?

Re: Rainrate Webtags

Posted: Mon 21 Feb 2022 7:07 am
by sfws
You might want to try what I have done on my Raspberry Pi, I did a sudo apt install sqlitebrowser. That gives me an easy way to browse data in, or execute SQL against, rows of database tables in either the "data/diary.db" or "data/cumulusmx.db" files using a command like sqlitebrowser cumulusmx.db.sqbpro. The last extension is left off, if you have not defined a project within sqlitebrowser. This is not the place to go into any more technical, or usage, detail.

I respond below to your latest post. However, I can't offer you any more help as I use Cumulus software simply as a convenient unattended way to store weather data over the lifetime of the weather station sensors. To briefly expand on "unattended", I don't normally look at anything related to MX. I am rarely interested in real-time data, instead focussed on long-term summaries over a day or over a month, and I have automated every aspect of storing such data that interests me.
whitling2k wrote: Sun 20 Feb 2022 7:03 pmI don't think I can manipulate it to give me the max rain rate over the last 15 can I?

I wonder if I could write it out every minute then take the max from the file?
RecentData is a database table. That means it would actually be read by running SQL, a single SQL enquiry can directly report maximum as it reads the last 15 (or for an hour, last 60) rows. As explained earlier, I have not actually tried such an enquiry, I only do one-off checks, or edits, of data.

whitling2k wrote: Sun 20 Feb 2022 7:03 pm my understanding is that this is just the max rain rate over the previous minute
That is a question for Mark as developer to answer, I don't know how MX does its calculations.

Re: Rainrate Webtags

Posted: Mon 21 Feb 2022 1:57 pm
by mcrossley
sfws wrote: Mon 21 Feb 2022 7:07 am
whitling2k wrote: Sun 20 Feb 2022 7:03 pm my understanding is that this is just the max rain rate over the previous minute
That is a question for Mark as developer to answer, I don't know how MX does its calculations.
It is the rain rate at that minute, not the max over the minute.

Re: Rainrate Webtags

Posted: Tue 22 Feb 2022 11:04 pm
by sfws
mcrossley wrote: Mon 21 Feb 2022 1:57 pm It is the rain rate at that minute,
Thanks, Mark.
Using more words to express that more precisely: Rain rate at a particular time is calculated from rain counter now, minus rain counter a minute ago, scaled up to report as rain unit per hour.

Re: Rainrate Webtags

Posted: Thu 24 Feb 2022 10:59 am
by whitling2k
Thanks all. Really useful.

I think for now, I need to figure out how to get highcharts to graph the rainfall json data out from the API in a custom graph and then revisit this in the future. SQL looks a promising option.

Whitling2k