{"id":4964,"date":"2024-02-06T22:13:44","date_gmt":"2024-02-06T22:13:44","guid":{"rendered":"https:\/\/www.n0zb.com\/?p=4964"},"modified":"2024-02-07T15:14:22","modified_gmt":"2024-02-07T15:14:22","slug":"crisis-in-the-land-of-the-weather-station","status":"publish","type":"post","link":"https:\/\/www.n0zb.com\/index.php\/2024\/02\/06\/crisis-in-the-land-of-the-weather-station\/","title":{"rendered":"Crisis in the land of the weather station!"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I started to prepare for the 0700 <a href=\"https:\/\/ksarrl.org\/traffic.php\">Kansas 80m weather net<\/a> (3920 KHz, 1300-1330Z) this morning and discovered that <strong>weewx<\/strong> had stopped pulling in weather data after an update the previous evening.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When <strong>weewx<\/strong> upgraded to v5.0.1 and the bottom fell out. Checking <a href=\"https:\/\/groups.google.com\/g\/weewx-user\/c\/5BuR3BSQfeY\">the weewx users group<\/a>, many were having the same problem.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"876\" src=\"https:\/\/www.n0zb.com\/wp-content\/uploads\/2024\/02\/Screenshot-at-2024-02-06-14-41-05-1024x876.png\" alt=\"\" class=\"wp-image-4967\" srcset=\"https:\/\/www.n0zb.com\/wp-content\/uploads\/2024\/02\/Screenshot-at-2024-02-06-14-41-05-1024x876.png 1024w, https:\/\/www.n0zb.com\/wp-content\/uploads\/2024\/02\/Screenshot-at-2024-02-06-14-41-05-300x257.png 300w, https:\/\/www.n0zb.com\/wp-content\/uploads\/2024\/02\/Screenshot-at-2024-02-06-14-41-05-768x657.png 768w, https:\/\/www.n0zb.com\/wp-content\/uploads\/2024\/02\/Screenshot-at-2024-02-06-14-41-05.png 1072w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The consensus was to go back to v4.10.2 &#8211; if that was reinstalled, everything would work as normal. Not the case for me.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Throughout the process I kept thinking that <strong>mysql<\/strong> had been corrupted or I otherwise had to reconfigure <strong>mysql<\/strong>. That does not appear to be the case. Although I have not yet tried to get a status. I would assume <strong>weewx<\/strong> would not be working if <strong>mysql<\/strong> was not, but I took poor notes setting up <strong>mysql<\/strong> and am not sure of where to start. But I do need to find the notes that I did take.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I also tried to used <strong>Minicom<\/strong> to verify I was getting data through the serial port. Unsuccessful in getting <strong>Minicom<\/strong> working to show a stream of incoming data. I need to be able to figure that out. (<strong>sudo minicom -D \/dev\/ttyS7<\/strong>)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what did work:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the whole time I am using the following command to monitor what is happening:<br><strong>sudo tail -f \/var\/log\/syslog<\/strong><\/li>\n\n\n\n<li>Backed up my <strong>weewx.conf<\/strong> files. This was super helpful to use as a reference to see what everything looked like when fully operational.<\/li>\n\n\n\n<li>Followed the <a href=\"https:\/\/weewx.com\/docs\/5.0\/quickstarts\/debian\/#uninstall\">directions for uninstalling weewx<\/a> but retaining configuration and data. <\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">sudo apt remove weewx<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I then created a folder under \/home called weewx. I then moved <strong>weewx-4.10.0.tar.gz<\/strong> into the weewx folder. And installed it, knowing I had already met the <a href=\"http:\/\/weewx.com\/docs\/4.2\/setup.htm\">prerequisites<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sudo <strong>python3 .\/setup.py build<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>sudo python3 .\/setup.py install<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>to run the weewx<br><strong>cd \/home\/weewx<\/strong><br><strong>sudo .\/bin\/weewxd<\/strong><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>to get weewx to start on boot:<br>cd \/home\/weewx<br><strong>sudo cp util\/systemd\/weewx.service \/etc\/systemd\/system<\/strong> (I did this and it is working)<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>watching the syslog I could see there were problems. Assumption is that the weewx.conf file was not correct.<\/li>\n\n\n\n<li>Used old weewx.conf file to make appropriate changes to the new one. In addition to telling <strong>weewx<\/strong> what kind of weather station I have, I also had to make sure it was set to ID 2 (somewhat out of the ordinary).<\/li>\n\n\n\n<li>After that I was able to setup Wunderground quickly with the correct information.<\/li>\n\n\n\n<li>Using <strong>sudo systemctl restart weewx<\/strong>, I could see from the syslog that data was flowing to Wunderground.<\/li>\n\n\n\n<li>I started the script that has Xastir look at <strong>wxnow.txt<\/strong> 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.<\/li>\n\n\n\n<li>Checking <strong>\/var\/tmp\/wxnow.txt<\/strong> I could tell the file had not been updated since the upgrade to v5.0.1.<\/li>\n\n\n\n<li>A <a href=\"https:\/\/www.n0zb.com\/index.php\/2023\/07\/17\/linux-in-the-hamshack\/\">blog entry<\/a>  I wrote had a link to the extension I needed to reinstall that would regularly update the <strong>wxnow.txt<\/strong> file but also lacked detail.<\/li>\n\n\n\n<li>Following the <a href=\"https:\/\/github.com\/weewx\/weewx\/wiki\/cwxn\">instructions on github<\/a> also were not sufficient.  [I believe the extension is called <strong>CumulusWXNow<\/strong>]<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This worked:<br>From \/home\/weewx<br><strong>wget -O weewx-cwxn.zip https:\/\/github.com\/matthewwall\/weewx-cwxn\/archive\/master.zip<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The next direction given is: <strong>wee_extension &#8211;install weewx-cwxn.zip<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2026 the problem is that linux does not know where to look for <strong>wee_extension<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What worked\u2026 I found advice that said: try specifying the full path to <strong>wee_extension<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>sudo \/home\/weewx\/bin\/wee_extension &#8211;install weewx.cwxn.zip<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>This install process also made the necessary changes to <strong>weewx.conf<\/strong> and after <strong>sudo systemctl restart weewx<\/strong> I checked <strong>wxnow.txt<\/strong> &#8211; it was now getting the latest data. The change includes an entry at the bottom of weewx.conf:<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">[CumulusWXNow]<br>   filename = \/var\/tmp\/wxnow.txt<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2026 there is also an addition made in the section above that I could identify by comparing old and new weewx.conf files.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I started the Xastir script to grab the wxnow.txt data\u2026<br><strong>cd \/usr\/local\/share\/xastir\/scripts<\/strong> then <strong>sudo .\/wxnowsrv.pl \/var\/tmp\/wxnow.txt 60 5500<\/strong><\/li>\n\n\n\n<li>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.<\/li>\n\n\n\n<li>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 &#8220;rebooting&#8221; 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: &#8220;In case anyone else runs into this &#8211; 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.&#8221; The command I used was <strong>sudo adduser weewx dialout<\/strong>. I believe this fixed the permissions issue. Requires a full reboot.<\/li>\n\n\n\n<li>I am going to store copies of <strong>weewx-4.10.0.tar.gz<\/strong> and <strong>weewx-cwxn.tgz<\/strong> locally. Would also make sense to do the same for Xastir.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Just in case, the commands for completely removing weewx:<br><strong>sudo apt purge weewx<br>sudo rm -r \/var\/www\/html\/weewx<br>sudo rm -r \/var\/lib\/weewx<br>sudo rm -r \/etc\/weewx<br>sudo rm \/etc\/default\/weewx<br>sudo userdel weewx<br>sudo gpasswd -d $USER weewx<br>sudo groupdel weewx<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This <a href=\"http:\/\/weewx.com\/docs\/4.10\/utilities.htm#Actions_and_options\">link<\/a> includes an example of installing an extension. This may be useful and worth a look.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rebooting and seeing if everything will work:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>sudo tail -f \/var\/log\/syslog<\/strong><br>&#8211; this should show weewx sending wx data to Wunderground<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>cd \/usr\/local\/share\/xastir\/scripts<\/strong> then <strong>sudo .\/wxnowsrv.pl \/var\/tmp\/wxnow.txt 60 5500<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">checked <strong>wxnow.txt<\/strong> and it is being updated<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">xastir &amp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From Xastir&#8217;s menu: View\/Incoming Data<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Interface\/Interface Control<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Device 0 Network WX: Start<\/li>\n\n\n\n<li>Device 2 Serial TNC: Start<br>(note: Serial TNC say ttyS6 when weewx is set to ttyS7\u2026 investigate!)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">With both started, incoming data should be coming across the Display Packet Data window.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From Xastir&#8217;s menu: Interface\/Transmit Now! : check aprs.fi if a valid and accurate packet has been sent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check back with aprs.fi in 15 minutes to see if another packet has been sent.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check Weather Underground to see if data is up to date.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/www.n0zb.com\/index.php\/2024\/02\/06\/crisis-in-the-land-of-the-weather-station\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Crisis in the land of the weather station!&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[384,377,269],"class_list":["post-4964","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-ham-notebook","tag-weewx","tag-xastir"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9vUOZ-1i4","_links":{"self":[{"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/posts\/4964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/comments?post=4964"}],"version-history":[{"count":9,"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/posts\/4964\/revisions"}],"predecessor-version":[{"id":4984,"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/posts\/4964\/revisions\/4984"}],"wp:attachment":[{"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/media?parent=4964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/categories?post=4964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.n0zb.com\/index.php\/wp-json\/wp\/v2\/tags?post=4964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}