Month: February 2024
A bit to dry for me
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
Crisis in the land of the weather station!
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.
The medium-sized printer that could
Was having difficulty printing to my stalwart HP LaserJet P2055dn on my Mac mini (macOS 14.1.1).
Printing from a PDF file using either Adobe Acrobat or the preview application would bring the first page but them spooling would stop at ~9%.
When I double checked the drivers selected for the printer, they seemed to be generic. Troubling, as this printer has always worked near flawlessly with my linux installations on other platforms. My old Mac Book also worked ok as long as I printed directly from the file.
I found that I needed to install HP 5.1.1 Printer Software Update. https://support.apple.com/kb/DL1888
With this update the Mac mini immediately identified the printer and installed the appropriate drivers. Printing works, but spooling seems a bit slower than normal.
I am a fan of the LaserJet P2055dn. I have been using the printer for about 15 years and it has served my as both an elementary classroom teacher as well as through three graduate degrees worth of readings. The printer does not chug toner and the duplex function helps me save paper. Accepting a network connection, I can print from anywhere in the house. Always impressed by the early HP LaserJet printers, this one does not disappoint.