16 Performing Updates
Mark Jessop edytuje tę stronę 2021-05-01 13:47:35 +09:30

This repository is under constant development, and as such there will be regular feature additions and bug-fixes. Also make sure to read the release notes for each update, as they may include special commands you need to run.

Docker Install

To update a docker-based auto_rx installation, refer to the docker guide here: https://github.com/projecthorus/radiosonde_auto_rx/wiki/Docker#pulling-the-latest-version-of-the-container

Native Install

For a 'native' install, use the following instructions.

Before updating, stop the auto_rx service by running:

$ sudo systemctl stop auto_rx

In many cases, you will be able to update by simply performing (in the radiosonde_auto_rx directory):

$ git pull

If you are given a warning along the lines of your local changes to the following files would be overwritten, then you've made some kind of change to the version-controlled parts of auto_rx. If you wish to keep the changes, then copy out the listed files somewhere else. Then, to revert the auto_rx files back to their version-controlled versions, run git stash, and then re-run git pull.

Then you should re-build the decoder binaries by running:

$ cd auto_rx
$ ./build.sh

New features will likely involve changes or additions to the configuration file. The Configuration File Change-log also provides information on what settings have been added/changed for each release.

Once all the updates have been performed, restart the auto_rx service using:

$ sudo systemctl restart auto_rx

Upgrading a station from Python 2 to Python 3

If your station has been operating using Python 2 for years, and has now broken with recent updates (e.g. ImportError: cannot import name JSONDecodeError), then it's time to update your station to run using Python 3.

You can either start from scratch with a fresh Raspbian install (and if you are running an old version of Raspbian e.g. stretch, this is a very good idea...), or you should be able to get the required Python 3 dependencies by running:

$ sudo apt-get install python3 python3-numpy python3-setuptools python3-crcmod python3-requests python3-dateutil python3-pip python3-flask
$ cd ~/radiosonde_auto_rx/auto_rx/
$ git pull
$ sudo pip3 install -r requirements.txt

You will then need to update the auto_rx systemd service file to reflect the switch from python to python3, which you can do using:

$ sudo cp auto_rx.service /etc/systemd/system/

You may now need to edit the systemd file to include your username, if it is not pi, by running sudo nano /etc/systemd/system/auto_rx.service.

Now, reload the service file by running:

$ sudo systemctl daemon-reload

Now you should be good to restart auto_rx!