WXforum.net

Weather Software => WeeWX Software => Topic started by: JoePfeiffer on September 28, 2020, 12:17:51 PM

Title: How do I set max age for $current?
Post by: JoePfeiffer on September 28, 2020, 12:17:51 PM
I'm experimenting with using an adaptive sampling rate for my interior temperatures -- the idea is that as that conditions change slowly in the house I'll only send samples occasionally, as they change more rapidly I'll be sampling more often as well.

Anyway, this means that my samples can be quite a while apart -- at present I'm limiting the max to ten minutes; it may well get greater than that.  This means that my displayed values like $current.inTemp spend most of their time as N/A which is annoying.

So, how does weewx determine how stale a reading can be and still be "current"? And is there a way I can configure that for the readings I'm experimenting with?

I'm aware that I could just use $latest, but (1) in the context of my station these readings are current, and (2) if one of my sensors really does go off-line it'll continue to display it on into the future.

Thanks,
Title: Re: How do I set max age for $current?
Post by: JoePfeiffer on October 04, 2020, 01:27:01 PM
Well, no, $latest didn't work.  It doesn't seem like this should be hard, but I'm not finding an easy way to do it...
Title: Re: How do I set max age for $current?
Post by: JoePfeiffer on October 08, 2020, 12:03:44 PM
The only way I was able to find to accomplish my actual goal of not having weewx think my interior sensors had gone offline was to write a small module to cache LOOP data.  As this is quite possibly the most trivial weewx module ever written, hopefully others will find it helpful either for its function or as a small example.  It's attached.
 [ You are not allowed to view attachments ]