Skip to content

Upgrade Guide

gjr80 edited this page Oct 2, 2021 · 28 revisions

Upgrade Guide

Introduction

This is the upgrade guide to installing the GW1000 driver extension. It should be used when upgrading an existing GW1000 driver irrespective of whether the GW1000 driver extension was installed manually or by using the WeeWX utility wee_extension or whether the GW1000 driver extension is used as a WeeWX driver or service.

The section Instructions for specific versions describes changes required from one version to the next.

Upgrading using wee_extension

wee_extension may be used to upgrade an existing GW1000 driver extension installation irrespective of whether the GW1000 driver extension was installed manually or using wee_extension. To use wee_extension to upgrade an existing GW1000 driver extension installation:

  1. Download the latest GW1000 driver extension package:

    $ wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.4.0/gw1000-0.4.0.tar.gz
    
  2. Install the downloaded GW1000 driver extension:

    $ wee_extension --install=/var/tmp/gw1000-0.4.0.tar.gz
    

    Note: Depending on your system/installation the above command may need to be prefixed with sudo.

    Note: Depending on your WeeWX installation wee_extension may need to be prefixed with the path to wee_extension.

  3. You may test the upgraded GW1000 driver by running the driver file directly using the --test-driver command line option:

    $ PYTHONPATH=/home/weewx/bin python -m user.gw1000 --test-driver
    

    for setup.py installs or for package installs use:

    $ PYTHONPATH=/usr/share/weewx python -m user.gw1000 --test-driver
    

    Note: Whilst the driver may be run independently of WeeWX, the driver still requires access to WeeWX and it's dependencies. Consequently, if WeeWX 4.0.0 or later is installed the driver must be run under the same Python version as WeeWX uses. This may be different to the Python version invoked by the command 'python'. This means that on some systems 'python' in the above commands may need to be changed to 'python2' or 'python3'.

    You should observe loop packets being emitted on a regular basis. Once finished press ctrl-c to exit.

    Note: You will only see loop packets and not archive records when running the driver directly. This is because you are seeing output directly from the driver and not WeeWX.

  4. Restart the WeeWX daemon:

    $ sudo /etc/init.d/weewx restart
    

    or

    $ sudo service weewx restart
    

    or

    $ sudo systemctl start reweewx
    

Upgrading manually

An existing GW1000 driver extension installation may be upgraded manually, irrespective of whether the GW1000 driver extension was previously installed/upgraded manually or using wee_extension. However, to maintain the integrity of the GW1000 driver extension configuration data it is recommended that previous wee_extension installations/upgrades continue to be upgraded using wee_extension. You can check if the GW1000 driver was previously installed/upgraded using the wee_extension utility by using the following command:

$ wee_extension --list

If the GW1000 driver was installed using the wee_extension utility 'GW1000' will be listed as an installed extension.

To manually upgrade and existing GW1000 driver extension installation:

  1. Download the GW1000 driver extension package:

     $ wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.4.0/gw1000-0.4.0.tar.gz
    
  2. Extract the contents of the GW1000 driver extension package:

    $ tar -xzf /var/tmp/gw1000-0.4.0.tar.gz -C /var/tmp
    
  3. Copy the file gw1000.py to the BIN_ROOT/user directory:

    $ cp /var/tmp/gw1000/bin/user/gw1000.py BIN_ROOT/user
    

    Note: Depending on your system/installation the above command may need to be prefixed with sudo.

  4. You may test the upgraded GW1000 driver by running the driver file directly using the --test-driver command line option:

     $ PYTHONPATH=/home/weewx/bin python -m user.gw1000 --test-driver
    

    for setup.py installs or for package installs use:

     $ PYTHONPATH=/usr/share/weewx python -m user.gw1000 --test-driver
    

    Note: Whilst the driver may be run independently of WeeWX, the driver still requires access to WeeWX and it's dependencies. Consequently, if WeeWX 4.0.0 or later is installed the driver must be run under the same Python version as WeeWX uses. This may be different to the Python version invoked by the command 'python'. This means that on some systems 'python' in the above commands may need to be changed to 'python2' or 'python3'.

    You should observe loop packets being emitted on a regular basis. Once finished press ctrl-c to exit.

    Note: You will only see loop packets and not archive records when running the driver directly. This is because you are seeing output directly from the driver and not WeeWX.

  5. Restart the WeeWX daemon:

     $ sudo /etc/init.d/weewx restart
    

    or

     $ sudo service weewx restart
    

    or

     $ sudo systemctl start reweewx
    

Instructions for specific versions

Upgrading to v0.4.0