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.
- Throughout the process I kept thinking that mysql had been corrupted or I otherwise had to reconfigure mysql. That does not appear to be the case. Although I have not yet tried to get a status. I would assume weewx would not be working if mysql was not, but I took poor notes setting up mysql and am not sure of where to start. But I do need to find the notes that I did take.
- I also tried to used Minicom to verify I was getting data through the serial port. Unsuccessful in getting Minicom working to show a stream of incoming data. I need to be able to figure that out. (sudo minicom -D /dev/ttyS7)
Here is what did work:
- the whole time I am using the following command to monitor what is happening:
sudo tail -f /var/log/syslog - Backed up my weewx.conf files. This was super helpful to use as a reference to see what everything looked like when fully operational.
- Followed the directions for uninstalling weewx but retaining configuration and data.
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
- to run the weewx
cd /home/weewx
sudo ./bin/weewxd
- to get weewx to start on boot:
cd /home/weewx
sudo cp util/systemd/weewx.service /etc/systemd/system (I did this and it is working)
- watching the syslog I could see there were problems. Assumption is that the weewx.conf file was not correct.
- Used old weewx.conf file to make appropriate changes to the new one. In addition to telling weewx what kind of weather station I have, I also had to make sure it was set to ID 2 (somewhat out of the ordinary).
- After that I was able to setup Wunderground quickly with the correct information.
- Using sudo systemctl restart weewx, I could see from the syslog that data was flowing to Wunderground.
- I started the script that has Xastir look at wxnow.txt and then started Xastir. Both the network and radio interfaces came up without issue. I made a test TRANSMIT NOW and saw it was using the old data.
- Checking /var/tmp/wxnow.txt I could tell the file had not been updated since the upgrade to v5.0.1.
- A blog entry I wrote had a link to the extension I needed to reinstall that would regularly update the wxnow.txt file but also lacked detail.
- Following the instructions on github also were not sufficient. [I believe the extension is called CumulusWXNow]
- This worked:
From /home/weewx
wget -O weewx-cwxn.zip https://github.com/matthewwall/weewx-cwxn/archive/master.zip
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
- This install process also made the necessary changes to weewx.conf and after sudo systemctl restart weewx I checked wxnow.txt – it was now getting the latest data. The change includes an entry at the bottom of weewx.conf:
[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.
- I started the Xastir script to grab the wxnow.txt data…
cd /usr/local/share/xastir/scripts then sudo ./wxnowsrv.pl /var/tmp/wxnow.txt 60 5500 - Bringing both the network and radio interfaces UP I did another TRANSMIT NOW from Xastir. Checking on aprs.fi I could see that the most current data was beaconing out.
- At some point syslog was showing the weewx did not have permission to use the serial port to get the data from the Davis console. I tried “rebooting” the console; the only way to do that is to remove the power and batteries, which I did. This did not fix the issue. Then I saw this recommendation: “In case anyone else runs into this – my Ubuntu server/Davis VP2 and serial datalogger had ownership set to root:dialout, so I had to add the weewx user to the dialout group for things to work.” The command I used was sudo adduser weewx dialout. I believe this fixed the permissions issue. Requires a full reboot.
- I am going to store copies of weewx-4.10.0.tar.gz and weewx-cwxn.tgz locally. Would also make sense to do the same for Xastir.
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
- Device 0 Network WX: Start
- Device 2 Serial TNC: Start
(note: Serial TNC say ttyS6 when weewx is set to ttyS7… investigate!)
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.