Error in Humidity in Wundergound Post

110 views
Skip to first unread message

William Webb

unread,
Sep 2, 2019, 10:00:33 AM9/2/19
to weewx-user
This is a perplexing problem.  I don't know enough about the structure of weewx code or the Davis Monitor II driver to hazard a guess.  My station, a Davis Monitor II, running on a Raspberry PI B+ appears to be working fine without drama.  The PI has an IP assigned outside of DHCP on a Spectrum Gateway router. I have always had stability issues between PIs and Spectrum.  I have avoided the random disconnects by running this on the hour as a chron task.

#!/bin/bash

sudo ifconfig wlan0 down

sudo ifconfig wlan0 up

sudo service networking restart

 
 I let the setup run several days before enabling posting to Wundergound.  My data when views on the web site locally looked fine.  When I looked at my data on WundergroundI discovered an anomaly with humidity.  After the chron task ran the humidity read low for one reading.

Wu_report.jpg


This is beyond weird. Only humidity is off and it is only the first reading after the network reconnect.  What could be wrong?  Have I discovered some really subtle bug?  If you folks think so, I can repost on the development forum.


Bill - AB6OR




Thomas Keffer

unread,
Sep 2, 2019, 10:27:05 AM9/2/19
to weewx-user
I'm not sure what we're looking at here. It looks more a plot of barometric pressure, rather than humidity.

Or, is the issue the plot on the top (which is always zero)?

Your WU station ID would be helpful. And, of course, the log. See the wiki article Help! Posting to weewx-user.

In short, you're not giving us much information.




--
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/1b8556bc-ea98-4b1c-b97d-06a95d075631%40googlegroups.com.
Message has been deleted

William Webb

unread,
Sep 2, 2019, 11:14:43 AM9/2/19
to weewx-user
You are correct I somehow got fixated on Humidity.  The issue is pressure.  My station is KCAORANG21.  My log is attached.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.
syslog_recent.txt

William Webb

unread,
Sep 2, 2019, 11:44:49 AM9/2/19
to weewx-user
P.S for now I shut down the Chron task.

Bill

Thomas Keffer

unread,
Sep 2, 2019, 11:58:02 AM9/2/19
to weewx-user
Looking at KCAORANG21, the WU is receiving low values for pressure on the hour, although with the WU, you never really know. But, given that you are cycling the wifi adapter at exactly the same time, odds are that the problem is on your end, rather than on the WU end.

I am not familiar with the wmii driver but, looking through its code, it ignores the checksum, so it's entirely possible it is receiving a bad packet on the hour, which gets decoded into nonsense values. The many bad values logged give evidence to this theory. For example,

Sep  1 08:29:17 raspberrypi weewx[425]: engine: 2019-09-01 08:29:17 PDT (1567351757) LOOP value 'pressure' -29.33 outside limits (24.0, 34.5)
Sep  1 08:29:17 raspberrypi weewx[425]: engine: 2019-09-01 08:29:17 PDT (1567351757) LOOP value 'outHumidity' 128 outside limits (0.0, 100.0)
Sep  1 08:29:17 raspberrypi weewx[425]: engine: 2019-09-01 08:29:17 PDT (1567351757) LOOP value 'outTemp' 3276.7 outside limits (-40.0, 120.0)
Sep  1 08:29:18 raspberrypi weewx[425]: engine: 2019-09-01 08:29:18 PDT (1567351758) LOOP value 'pressure' -29.33 outside limits (24.0, 34.5)
Sep  1 08:29:18 raspberrypi weewx[425]: engine: 2019-09-01 08:29:18 PDT (1567351758) LOOP value 'outHumidity' 128 outside limits (0.0, 100.0)

So, when weewx calculates the average pressure for the interval, it gets an off value. Incidentally, you're getting low values for other types, such as outside temperature. They are probably suffering from the same problem.

You should contact the author of the driver. It really should use the checksum. Garbage in, garbage out! :-)

-tk

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/7a219d4b-07d1-4757-8511-e1314619be57%40googlegroups.com.

William Webb

unread,
Sep 3, 2019, 12:16:18 PM9/3/19
to weewx-user
I see in the Davis Monitor II driver how to get the two byte checksum from the weather station. Can you point me to an example of how to calculate the checksum from the data bytes for comparison? A Python example would probably give me enough information to modify the driver.

Thomas Keffer

unread,
Sep 3, 2019, 6:26:53 PM9/3/19
to weewx-user
No idea what the WMII does for a checksum. Possibilities
  1. A simple XOR'ing of the bytes. But, this would leave you with a 1 byte checksum, and it seems the WMII uses 2 bytes. I don't think they would XOR 2 bytes at a time, because then you would have to worry about the "endianness" of the machine you're running on.
  2. Much more likely, it's the same algorithm used by the Davis Vantage series. See the implementation in the file weewx/crc16.py.
-tk

On Tue, Sep 3, 2019 at 9:16 AM William Webb <billw...@gmail.com> wrote:
I see in the Davis Monitor II driver how to get the two byte checksum from the weather station. Can you point me to an example of how to calculate the checksum from the data bytes for comparison? A Python example would probably give me enough information to modify the driver.

--
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.

jard...@gmail.com

unread,
Sep 4, 2019, 9:24:45 PM9/4/19
to weewx...@googlegroups.com
Hi Bill,

The implementation for the CRC checksum calculation is here:
https://github.com/weewx/weewx/blob/master/bin/weewx/crc16.py

I'll send you a private email with a gzipped tarball of the technical
reference files that I used when writing the driver. This mailing list
is not letting me add the attachment to this message.

Let me know if you find any bugs in the driver.

Jardi.

Brian LeDuc

unread,
Feb 26, 2025, 9:25:26 AM2/26/25
to weewx-user
Hi William-

I"m trying to get a WMII up and and running with a PI b+ and just cant get it to work...I've got the data logger plugged into the davis serial adapter, then a serial to usb adapter into the PI.  Errors seem to be driver related( I have a whole thread on that as well)  I'm running the latest version of Weewx and Buster 10.  What versions of each are you running that worked?  Thanks!

-Brian
Reply all
Reply to author
Forward
0 new messages