Weewx upgrade questions

333 views
Skip to first unread message

kutz...@gmail.com

unread,
Feb 12, 2024, 2:54:50 PM2/12/24
to weewx-user
I have been remiss in upgrading my Weewx implementation and have decided it's time to do that. I'm running version 3.9.1 (!) and plan to move to the latest version 5.x. My install was setup.py. My station is a Davis Vantage Vue.

I'm running on a Pi Zero W with Buster OS and an added RTC. I've looked at the upgrade guide, at least briefly, so far. I have a couple of questions:

1: I also want to upgrade the OS. I have a spare Pi 3B+ (also running on Buster) and think I'll move Weewx to that device. Should I move my implementation to the 3B+ before moving forward?

2: Should I upgrade the OS first, or do the Weewx upgrade first?

3: Am I best doing the Weewx upgrade in stages; moving to a version 4.x of Weewx first before going to 5.x or go directly to 5.x? If so, which 4.x version? The Upgrade guide talks about moving 4.x setup.pi to 5.x, but not moving from 3.x to 5.x.

4: I know I need to install Python 3.6 or higher. I'll check the Upgrade guide on that.

5: I've seen a number of posts regarding expanding the database. Should I do that before upgrading Weewx? Or is that ifo in the Uprade guide?

Thanks in advance.
Phil

michael.k...@gmx.at

unread,
Feb 12, 2024, 3:08:41 PM2/12/24
to weewx-user
Do you need to connect the station physically to the PI to get the data from the station(usb, serial, ...) or can you obtain data over the network? Or can you connect the station simultaneously to both PIs? If so, start from scratch with an OS update and a 5.x installation, and keep the old setup running, until you're satisfied.

If not, copy the database, do a 5.x install, configure simulator as the driver and when you're satisfied, copy the database again, configure the "real" driver and connect the station to the new hardware. 
When you do the database expansion is up to you. I'd do it on the new station.
(Also, I very much like the pip way to install everything)

vince

unread,
Feb 12, 2024, 3:26:40 PM2/12/24
to weewx-user
I would personally recommend using the pi3b+ to set up a clean new v5 setup rather than worrying upgrade scenarios....
  • install the latest raspios 32bit on the 3b+
  • install the latest weewx v5
  • configure it to run the Simulator (initially) to get it running and stable running a simulated station
  • install any extensions and skins you've added.  Probably set enable=false for anything that uploads to other systems (initially)
  • maybe set up the RTC and get that working on the 3b+ if you have one to install there too
  • in short - get a full setup working vs. the Simulator  and vs. a webserver (I use nginx) of your choosing
If you're running the Vantage driver getting the 3b+ to work with v5 is straightforward and you can keep using the zeroW attached to the Vue until you get the new pi set up to your liking using the Simulator.

Re: the db schema, you'll need to check your db for whether you're using the old smaller wview schema or the newer wview_extended schema.  If you need to convert it to the new schema do that offline on the 3b+.  Not too hard to do but it might take a while depending on how many years of data you have in your current db.  Instructions are at https://www.weewx.com/docs/5.0/utilities/weectl-database/#reconfigure-a-database

Once you're running the bigger schema in your zeroW actual db, you would stop weewx on the 3b+, move the archive/weewx.sdb file and public_html tree aside,  copy your actual db into the archive directory, switch to the vantage driver, and start weewx up.   Assuming you have a Davis logger weewx will backfill any needed records the logger captured from the Vue. You can't really hurt anything if you mess the procedure up a time or two, but it's pretty straightforward.  You'll have the zeroW db there just in case.

You can check to see if you're already running the extended schema in your db already by just counting the number of fields:
         echo "SELECT count() FROM PRAGMA_TABLE_INFO('archive');" | sqlite3 weewx.sdb

The extended schema will return a count of 114.   The original schema had around 53 or so if I recall correctly.  If you're weewx 3.x you are probably going to see 53 as your answer.

vince

unread,
Feb 12, 2024, 3:29:52 PM2/12/24
to weewx-user
oh - just to add.  I found that pre-seeding your NOAA files helps speed up a new installation first boot.  Just copy things over from your zeroW to the new box and weewx will update the current month+year files as needed.  The other thing is if you run Belchertown (unlikely on a slow zeroW) it 'also' has NOAA files in its output, so copy those into place too.  You can do this anytime really.  Stop weewx.  Copy the NOAA files into your web output directory.  Start weewx up.  Helps a lot.  Lots of years of NOAA files to generate takes quite a while on a pi3 or slower box.

kutz...@gmail.com

unread,
Feb 12, 2024, 5:02:28 PM2/12/24
to weewx-user
Thanks Michael and Vince. My Vantage Vue is connected to the Pi ZeroW with a serial to usb cable. Both of your recommendatons are directionally similar. I'll go with Vince's step by step to reduce my chances of making an error.

Vince, thanks for the suggestion of pre-seeding NOAA data. I've got about 7 years of data. I am running Belchertown on the PiZero. It runs pretty well (maybe because of the older version of Weewx), Weewx rsyncs the data to a Digital Ocean droplet running NGINX there to serve the pages (and also host mosquito). The website is https://wx.kutzenco.com. Thanks for the comprehensive sequence of steps to follow, I am aware that Belchertown keeps its own copy of NOAA data,

Will give it a shot!

Best,
Phil

Tom Keffer

unread,
Feb 13, 2024, 8:18:28 AM2/13/24
to weewx...@googlegroups.com
The only thing I would add is that if you're using the original "wview" schema, there is no reason to switch to the "wview-extended" schema unless you need the extra types. For a VantagePro, the original schema works fine. 

Conversion is a lot of work.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/04fdf7c2-1958-4862-9e8d-85f4219e821cn%40googlegroups.com.

kufuu

unread,
Feb 14, 2024, 6:22:31 PM2/14/24
to weewx-user
If you have any problems like I did with Bullseye and Bookworm they have a 64bit version of Buster at


I had way to many problems with the weewx 4.10.2 and 5 with mqtt running them  on Bullseye and Bookworm so I went to Buster64 and weewx 4.10.2 on a new pi zero 2 w, runs really good just cant get my weewx.sdb moved over from the pi zero w,  Permission denied when I tried to copy it over.
Reply all
Reply to author
Forward
0 new messages