This has been bugging me for a few years, but I just haven't been able to 
figure out where/how to fix it best. In the Acurite driver, there are 3 
different data packets (and two variants of one of those), each updated at 
different intervals (18, 60, and 12*60 seconds)  Indoor air pressure is 
reported in R2, while outside temperature is reported in alternating R1 
variants. This means that we *often* don't have a current reading for 
outside temperature at the same time we get a pressure reading, especially 
if the USB connection is being finicky, which is common with Acurite 
hardware.

As a result, there can be long intervals (I've seen 10+ minutes) between 
successful barometer calculations. When generating static webpages or 
otherwise working from archive data, this isn't a huge issue. When trying 
to do something near-real-time with loop data (for example MQTT to Home 
Assistant), though, this can be really annoying.

I'm not sure the best way to fix it, but one idea I've been tossing around 
is caching *all* the readings for a period of time (say 1-2 minutes) to 
ensure we have all the R1 data (including outTemp and *both* R1 variants) 
every time we get R2 data (pressure and inTemp). This is nice because it 
only affects the Acurite driver, and as a side effect, the loop data could 
include *everything* that was received in the last minute, not just what 
was in the last packet decoded, yielding a complete snapshot of reasonably 
current data.

Alternately, we could modify lower level weewx behavior, to include caching 
the temperature data used by the barometer calculation 
(weewx.wxformulas.sealevel_pressure_metric and 
weewx.wxformulas.sealevel_pressure_US). This would of course affect other 
drivers, but maybe some of them have the same issue.

Anyway, just looking for thoughts about this, or better ways to solve it.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" 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-user/269e07e0-41dd-48e8-a2d2-c0064abd25b1n%40googlegroups.com.

Reply via email to