Need help with ignore_zero_wind and interceptor

90 views
Skip to first unread message

Bill Arthur

unread,
Jul 21, 2020, 1:57:43 PM7/21/20
to weewx-user
I need assistance to figure out where to look for a problem with "ignore_zero_wind". (and interceptor)

I have five Raspberry Pi's at three physical locations: zero, 3B+ and 4. All are running 05/2020 OS
Four are running Weewx 4.1.1, one is 3.9.2  All have the same issue.
At my remote locations Weewx runs in parallel with Meteobridge, both receiving the same data through a GW1000, from  WS-2902 arrays.
Meteobridge never shows 0 for wind_dir. I would prefer consistancy between the two systems.
My bad windir data comes out in three ways:
 "0" from my output extensions, cwxn and weewx2aprx
 "NaN" from W34 charts
 "None" from a custom Seasons report file
Three different output methods allowed me to conclude it wasn't the output. I added "ignore_zero_wind" with no effect. Nothing unusual in the logs.
I studied previous posts with the same issue and saw suggestions to run weewxd. When I did, in the loop packets I saw "none" as wind_dir when wind speed was 0
My suspicion is that if the loop packet has "none" it isn't weewx, more likely the interceptor. Is that correct?

So I'm trying to run weewx-interceptor directly, which in my case was given as PYTHONPATH=bin python bin/user/interceptor.py --device=fineoffset-bridge --mode=listen --port=8007
I used /usr/share/weewx/user/interceptor.py and got an error in line 302, "Import Error: no module named weewx.drivers". So I tried interceptor.py --help, as suggested in github, and got the same error.

Since I'm so all over the place I haven't yet attached logs or configs yet. I need direction.
Message has been deleted

gjr80

unread,
Jul 22, 2020, 12:26:03 AM7/22/20
to weewx-user
Hi,

Your device will be sending the same wind obs to WeeWX and the Meteobridge. I can't speak for the Meteobridge but you are right in that you can control the wind direction within WeeWX when windSpeed is zero through use of the ignore_zero_wind config option. The ignore_zero_wind config option is nothing to do with the interceptor driver per se, rather once WeeWX has a packet from the interceptor driver WeeWX will check the ignore_zero_wind setting and if it is True (the default) windDir will be set to the python value None if windSpeed is zero. If ignore_zero_wind is False then windDir will be left unchanged (whatever value was reported by the station).

That being said you have a lot of moving parts there and I think the best approach is to work through from sensor to output. I would be running the interceptor driver directly and looking at what happens when windSpeed is zero, what is windDir? Then step forward a bit and run WeeWX directly, what do you see for windDir when windSpeed is zero? What about if you set ignore_zero_wind = False (remember True is the default).

Your error when running interceptor is due to a little WeeWX shorthand in the instructions. Try using full paths (you have a package install), something like:

$ PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/interceptor.py --device=fineoffset-bridge --mode=listen --port=8007

Gary

Bill Arthur

unread,
Jul 22, 2020, 12:37:47 AM7/22/20
to weewx-user
Thanks Gary!!
I was able to run interceptor directly and with a wind speed of 0.0 my direction reads 262.0. I immediately ran weewd and with a wind speed of 0.0 my wind direction is none.
I have ignore_zero_wind = False as the last line in StdWxCalculate

Bill

gjr80

unread,
Jul 22, 2020, 1:21:08 AM7/22/20
to weewx-user
Bill,

Just to confirm [StdWXCalculate] should look like this:

[StdWCalculate]
    ignore_zero_wind = False
    [[Calculations]]
        pressure = prefer_hardware
        ...

From memory putting ignore_zero_wind as the last line will put it under [[Calculations]] which would explain it's incorrect operation.

Gary

Bill Arthur

unread,
Jul 22, 2020, 1:24:27 AM7/22/20
to weewx-user
Gary,

No. I have it in the wrong place. Unless instructions say other wise I generally add to the bottom.
I'll change it and reply back tomorrow.

Thanks !!
Bill

gjr80

unread,
Jul 22, 2020, 1:31:29 AM7/22/20
to weewx-user
Yep Bill, in this case order is important not indenting.

Gary

Bill Arthur

unread,
Jul 22, 2020, 11:40:39 AM7/22/20
to weewx-user
Gary,
I'm happy to report that all stations are reporting correctly.
Thanks again for your quick response.
Bill
Reply all
Reply to author
Forward
0 new messages