
Update on the v5.0.1 update kerfuffle

Amateur Radio – a hobby where people talk about their hobby using their hobby.
Once again I am plagued by a failure to document problems I encountered and figured out.
Devoted a good portion of yesterday to getting weewx back into operation after a version upgrade took it down.
Part of that involved me figuring out (again) how to get the weewx extension working that creates the wxnow.txt file that Xastir uses to create and send APRS weather data.
Here’s an example of what Xastir was sending out:
APX219,TNGNXI,WIDE2*,qAR,BASHOR:@071408z3913.63N/09454.49W_166/006g012t051r000P000p000h05b10180
The error is “h05” as humidity is not 5%. The problem is that Xastir wants a two digit humidity data value and wxcn is sending a three digit value.
In examining the old copy of wxcn.py I see the comments I placed in the file:
# fields.append(“h%03d” % int(data[‘outHumidity’]))
# changing value “h%03d” to “h%02d”
… and the line now appears as:
fields.append(“h%02d” % int(data[‘outHumidity’]))
I updated these comments in the new version of this file as it appears in /home/weewx/bin/user/cwxn.py
With the correction, here is what Xastir is now beaconing:
APX219,WIDE2-1,qAR,BASHOR:@071426z3913.63N/09454.49W_166/007g011t051r000P000p000h59b10172
Now the humidity is given as “h59” instead of “h05”.
I am pretty sure that this concludes all the tweaks and fixes I had to make to get weewx working with Xastir to work properly. Time will tell.
A break down of the Xastir/APRS weather data string:
@071426z3913.63N/09454.49W_166/007g011t051r000P000p000h59b10172
@071426z – “07” is the calendar day, “1426z” is the time
3913.63N/09454.49W – location
166 – wind direction
007 – wind speed
g011 – gust, peak winds in last five minutes
t051 – temperature
r000 – rain within last 60 minutes
P000 – rain within last 24 hours since midnight
p000 – rain per last 24 hours (sliding 24 hour window)
h59 – humidity
b10172 – barometric pressure
I started to prepare for the 0700 Kansas 80m weather net (3920 KHz, 1300-1330Z) this morning and discovered that weewx had stopped pulling in weather data after an update the previous evening.
When weewx upgraded to v5.0.1 and the bottom fell out. Checking the weewx users group, many were having the same problem.
The consensus was to go back to v4.10.2 – if that was reinstalled, everything would work as normal. Not the case for me.
Here is what did work:
sudo apt remove weewx
I then created a folder under /home called weewx. I then moved weewx-4.10.0.tar.gz into the weewx folder. And installed it, knowing I had already met the prerequisites.
sudo python3 ./setup.py build
sudo python3 ./setup.py install
The next direction given is: wee_extension –install weewx-cwxn.zip
… the problem is that linux does not know where to look for wee_extension
What worked… I found advice that said: try specifying the full path to wee_extension
sudo /home/weewx/bin/wee_extension –install weewx.cwxn.zip
[CumulusWXNow]
filename = /var/tmp/wxnow.txt
… there is also an addition made in the section above that I could identify by comparing old and new weewx.conf files.
Just in case, the commands for completely removing weewx:
sudo apt purge weewx
sudo rm -r /var/www/html/weewx
sudo rm -r /var/lib/weewx
sudo rm -r /etc/weewx
sudo rm /etc/default/weewx
sudo userdel weewx
sudo gpasswd -d $USER weewx
sudo groupdel weewx
This link includes an example of installing an extension. This may be useful and worth a look.
Rebooting and seeing if everything will work:
sudo tail -f /var/log/syslog
– this should show weewx sending wx data to Wunderground
cd /usr/local/share/xastir/scripts then sudo ./wxnowsrv.pl /var/tmp/wxnow.txt 60 5500
checked wxnow.txt and it is being updated
xastir &
From Xastir’s menu: View/Incoming Data
Interface/Interface Control
With both started, incoming data should be coming across the Display Packet Data window.
From Xastir’s menu: Interface/Transmit Now! : check aprs.fi if a valid and accurate packet has been sent.
Check back with aprs.fi in 15 minutes to see if another packet has been sent.
Check Weather Underground to see if data is up to date.
I have endeavored to have my hamshack be 100% linux for a number of years. Licensed in 2001, my ham career really got going when I returned to the States in 2005. Upgrading to General and getting on HF, I integrated a computer into my operations. Ham Radio Deluxe was one of the most popular at the time and I used it – great for logging, digital modes, and rig control. When I had fun with APRS, I used UI-View, which was Windows based.
My first experience with linux was in the late 1990s. I had limited success. Not much later, Ubuntu gave me more of an opportunity to use linux for meeting my requirements for computing. I began to dip my toe in, using linux for rig control and logging. I switched to Mint around 2010-11. I found that Mint was easy to use and allowed me to use fldigi for digital modes, rig control, and logging. ARRL’s LOTW could also be used with linux and was integrated into fldigi. It was hard to find any aspect of the amateur radio hobby that required a computer and could not be done with linux.
Except, in my case, for one area of pursuit. APRS and my weather station. I had become a Davis Instruments fan since I got my first weather station in 2005. As mentioned before, UI-View handled the APRS portion and Davis had its own Windows-based software for handling the weather data the console produced. Back in 2011, the standard for linux-based APRS was Xastir. Xastir is a solid application and I had success using it to handle both internet and RF APRS traffic. But Xastir would not play well with the Davis Vantage Pro2. There was internet talk of a work around using a MySQL database. I had no luck. I kept my system on Windows, using UI-View for weather and APRS.
About two years ago, my Vantage Pro2, which I had since I was over in Iraq in 2007, finally died. The sensor package was mounted off my chimney when we first moved in to our current house over a decade ago. A great location for the weather station as it it high and clear of obstructions. Our roof, however, is steeply pitched and not something easy for me to traverse. I had gotten a TV antenna installation guy to install it – he did a great job. I think I had him back a few years later to swap out the battery. At one point, the board on the unit when bad and I replaced it. Then two years ago, one of our dogs shows up with an anemometer cup in her mouth. Perhaps a good sized chunk of hail had it the cup? Outside temperature data stopped working.
Rather than attempt to fix/repair the existing unit, it was time to replace. Over a decade is a long time to be exposed to the elements. I purchased a new Vantage Pro2 but then had a hard time finding someone to install. The local tv antenna guy took one look at my roof and said nope. A month ago we were getting our chimney inspected and cleaned and the gentleman was showing me pictures of the crown of the chimney. He’d just climbed up there. I asked if, for a reasonable fee, he’d be willing to swap out the weather station (and the VHF/UHF antenna). We struck a deal and now the weather station was operational again.
But could I still achieve my goal of a linux-based APRS/weather station? Enter weewx. This is an application that is like the Swiss army knife of weather station apps. I am not sure of what it does not do. The key aspect is that weewx produces a file (wxnow.txt) every minute using the same format used by APRS for weather data. Even better, the good folks at xastir created a script (wxnowsrv.pl) that copies the wxnow.txt information and pulls it into xastir. This was the solution!
And it works! Both weewx and xastir are happily working together on their own minimalist linux box, pulling in weather data from the Vantage Pro2 console via a serial connection while xastir is using a serial connection to transmit the weather data via my TM-D710A TNC functionality into the APRS system via RF. Weewx also creates a simple weather webpage which you can see here.
I kept a careful list of all the steps I completed in installing both weewx, MySQL, and xastir that I will post here soon – in case I need to reinstall. As of now the system seems to be stable and working nicely.