If I recall it right, sometimes there were requests for the possibility to 
output aggregated values to MQTT. 

What I was thinking about, was the problem of the Belchertown skin showing 
wrong rain values due to the calculation of the observation type dayRain. 
See Belchertown issue #685 
<https://github.com/poblabs/weewx-belchertown/issues/685>

There is a comment in restx.py saying:

                # NB: The WU considers the archive with time stamp 00:00
                # (midnight) as (wrongly) belonging to the current day
                # (instead of the previous day). But, it's their site,
                # so we'll do it their way.  That means the SELECT statement
                # is inclusive on both time ends:

That is also used for MQTT, but it seems not appropriate in the context of 
MQTT. So I looked for a solution.

My result is a more general solution allowing the user to define arbitrary 
aggregated values for output with MQTT by using tags similar to them used 
for Cheetah generator. I sent a PR (#31) 
<https://github.com/matthewwall/weewx-mqtt/pull/31> for Matthew Wall's MQTT 
extension in the hope it will be useful und get merged.

With a simple dayRain = day.rain.sum the observation type dayRain will be 
re-calculated (for MQTT only) with the normal interval that is open at the 
left side.

Other aggregated values can be defined in the same simple way.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/9a4350a7-33da-4b15-9387-cfb1164812b5n%40googlegroups.com.

Reply via email to