Use previous value if current value is null?

83 views
Skip to first unread message

Kevin Key

unread,
Oct 22, 2022, 8:12:26 PM10/22/22
to weewx-user
Is there a way to get weewx to make use of the last sensor value if the current value is null? I have a barometer sensor that sometimes reports null values. When this happens, I'd like to weewx to make use of the previous value. Is this possible?

Tom Keffer

unread,
Oct 22, 2022, 8:32:03 PM10/22/22
to weewx...@googlegroups.com
I can think of three approaches.

1. You could write a WeeWX service that caches the barometer data.

2. Use the last non-null value in the database. Try $day.barometer.last and see if that works for you.

3. Fix or replace the sensor.

One hazard of approaches #1 and #2 is that the datum could be hopelessly out of date if the sensor goes down for a while.




On Sat, Oct 22, 2022 at 5:12 PM Kevin Key <kevi...@gmail.com> wrote:
Is there a way to get weewx to make use of the last sensor value if the current value is null? I have a barometer sensor that sometimes reports null values. When this happens, I'd like to weewx to make use of the previous value. Is this possible?

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8e56edc9-c2ae-426c-b387-33a29489f5a3n%40googlegroups.com.

Kevin Key

unread,
Oct 23, 2022, 2:58:58 PM10/23/22
to weewx-user
Thanks.
Reply all
Reply to author
Forward
0 new messages