Tell weewx to use SUM of Loop packets rather than AVERAGE

60 views
Skip to first unread message

bdf0506

unread,
Jul 6, 2021, 11:38:28 AM7/6/21
to weewx-user
I have created a second rain field in weewx. I see that when the rain packets come in, they properly post the amounts to MQTT as they happen, so I know that the fields are being extracted properly.

However, when the archive interval runs, rather than taking the sum of the fields over the archive period like I would like, it is instead taking the average (which I know is by design), which is skewing my data. How can I tell weewx to use the sum for this custom field rather than the average?

I see on the customization guide that it says the following, but no mention of how to customize this:

LOOP packets may contain arbitrary data from the station/driver in the form of a Python dictionary. Each LOOP packet must contain a time stamp, and a unit system, in addition to any number of observations, such as temperature or humidity. For extensive types, such as rain, the packet contains the total amount of rain that fell during the observation period.

bdf0506

unread,
Jul 6, 2021, 11:50:56 AM7/6/21
to weewx-user
Copied the wrong text. Same question still applies.

WeeWX then compiles these LOOP packets into regularly spaced "archive records." For most types, the archive record contains the average value seen in all of the LOOP packets over the archive interval (typically 5 minutes). For extensive types, such as rain, it is the sum of all values over the archive interval.


bdf0506

unread,
Jul 6, 2021, 2:39:52 PM7/6/21
to weewx-user
Figured it out, for any others that may come across this. This one is nestled in a wiki page and not on the main help pages.

Reply all
Reply to author
Forward
0 new messages