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: 8072
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] + ... *}
tomas21
Junior Boarder
Junior Boarder
Posts: 20
Joined: Mon Jan 08, 2018 8:27 pm

Re: PRO2 rain0total-yearsum not respecting Annual Rain setting

Post by tomas21 »

Is there any solutions out there to leverage the virtual sensor in coming up with a calculation and making the current rain season value visible in any site template, dashboards, and or reporting? Would be nice to have that available.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 8072
Joined: Mon Oct 01, 2007 10:51 pm

Re: PRO2 rain0total-yearsum not respecting Annual Rain setting

Post by admin »

sorry, no solution so far. Did you try the mentioned work around?
tomas21
Junior Boarder
Junior Boarder
Posts: 20
Joined: Mon Jan 08, 2018 8:27 pm

Re: PRO2 rain0total-yearsum not respecting Annual Rain setting

Post by tomas21 »

Thanks.. I tried creating a virtual sensor but seems hitting char limit on the calc... so continuing to solution

{* [rain0total-sum@202601:0] + [rain0total-sum@202602:0] + [rain0total-sum@202603:0] + [rain0total-sum@202604:0] + [rain0total-sum@202605:0] + [rain0total-sum@202606:0] + [rain0total-sum@202607:0] + [rain0total-sum@202608:0] + [rain0total-sum@202609:0] + [rain0total-sum@202610:0] + [rain0total-sum@202611:0] + [rain0total-sum@202612:0] *}

only allows for

it only allows this much {* [rain0total-sum@202610:0] + [rain0total-sum@202611:0] + [rain0total-sum@202612:0] + [rain0total-sum@202701:0] + [rain0total-sum@202702:0] + [rain0total-sum@202703:0] + [rain0total-sum@202704:0] + [rain0total-sum@202705:0] + [rain0total-sum@202706:
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 8072
Joined: Mon Oct 01, 2007 10:51 pm

Re: PRO2 rain0total-yearsum not respecting Annual Rain setting

Post by admin »

When you are just interested in the number (not any charts on it) you can simply use the formula within whatever template you use to show it on your website or alike.
gpickering62
Fresh Boarder
Fresh Boarder
Posts: 12
Joined: Thu Nov 19, 2026 5:18 am

Re: PRO2 rain0total-yearsum not respecting Annual Rain setting

Post by gpickering62 »

admin wrote:When you are just interested in the number (not any charts on it) you can simply use the formula within whatever template you use to show it on your website or alike.
admin, fair enough if its just a number you need once in a blue moon, but seems a bit of a faff having to fiddle the template every time the months roll over... I'd rather have it sat as a proper sensor so it shows on the dashboard too and not just buried in some template code nobody else can see. Feels like the real fix is still that water-year option they never got round to adding, not working round it with sums.
Post Reply