PRO2 rain0total-yearsum not respecting Annual Rain setting

This section covers the Meteobridge PRO, PRO2, NANO SD, Raspberry Pi and VM platforms exclusively

Moderator: Mattk

Post Reply
dwhitemv
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: Mon Jul 11, 2022 11:52 pm

PRO2 rain0total-yearsum not respecting Annual Rain setting

Post by dwhitemv »

On the current version of Meteobridge on PRO2, the rain0total-yearsum selector is not respecting the Annual Rain setting in Weather Station -> Settings. I'm getting rain since the beginning of the calendar year and not since the start of the selected month (October in my case). Meteobridge on MR-3020 works properly.

This is messing up my rain calculations as I use yearly accumulated rain to avoid data loss across day boundaries, and we run on water year, which is October 1-September 30 here in the Pacific Northwest US. I have tried running a database reconstruction and rebooting with no change.

In my template [rain0total-yearsum=.2:--] is returning 462.00, it should return 917.20.

Querying the database directly, you can see the template is returning the calendar year sum and not the water year sum:

Code: Select all

sqlite> select sum(val) from rain0total_hour where ts > strftime('%s', '2026-01-01 00:00:00');
sum(val)
--------
462000  
sqlite> select sum(val) from rain0total_hour where ts > strftime('%s', '2025-10-01 00:00:00');
sum(val)
--------
917200  
Thanks for any assistance you can provide.

Also as a note, I guess you can't directly edit the yearly rainfall like you can on the storage-less models. I had to export the rain amounts from my main observations database and upload them to the PRO2 to get any sum at all. Luckily this is the dry time of year so rain isn't changing a whole lot. :)
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7991
Joined: Mon Oct 01, 2007 10:51 pm

Re: PRO2 rain0total-yearsum not respecting Annual Rain setting

Post by admin »

Yearly rainfall on the PRO and PRO2 is taking the calendar year into account. There is no easy way to change this.

What I think about, is to provide an alternative variable or selector to take the rain saison setting into account. This will not be trivial to implement, if at all possible.

If you just need the value and do not plan to use it in charting you can define a template where you add up the rain totals of the months that are in your definition of a rain season:

Code: Select all

{* [rain0total-sum@202604:0] + [rain0total-sum@202605:0] + ... *}
Post Reply