Skip to content

Legacy instructions

gjr80 edited this page Jul 31, 2024 · 1 revision

Legacy Installation Instructions

Introduction

The Ecowitt Gateway driver can be operated as a traditional WeeWX driver where it is the source of loop data, or it can be operated as a WeeWX service where it is used to augment loop data produced by another driver.

Pre-Requisites

The Ecowitt Gateway driver requires WeeWX v3.7.0 or greater and will operate under Python2 or Python 3.

Installation Instructions

Installation as a WeeWX driver

  1. If the Ecowitt Gateway driver is to be installed on a fresh WeeWX installation first install WeeWX and configure WeeWX to use the simulator driver.

  2. Install the Ecowitt Gateway driver using the wee_extension utility:

    • download the Ecowitt Gateway driver extension package:

      wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/latest/download/gw1000.zip
      
    • install the Ecowitt Gateway driver extension:

      wee_extension --install=/var/tmp/gw1000.zip
      

      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. Test the Ecowitt Gateway driver by running the driver file directly using the --test-driver command line option:

    PYTHONPATH=/home/weewx/bin python -m user.gw1000 --test-driver --ip-address=device_ip_address
    

    where device_ip_address is the IP address of the gateway device being used.

    For WeeWX setup.py installs or for WeeWX package installs use:

    PYTHONPATH=/usr/share/weewx python -m user.gw1000 --test-driver --ip-address=device_ip_address
    

    where device_ip_address is the IP address of the gateway device being used.

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

    Note: Whilst the Ecowitt Gateway driver may be run independently of WeeWX the driver still requires WeeWX and it's dependencies be installed. Consequently, if WeeWX 4.x 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 not from WeeWX but rather directly from the driver.

  4. Select and configure the driver:

    wee_config --reconfigure --driver=user.gw1000
    

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

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

  5. You may choose to run WeeWX directly to observe the loop packets and archive records being generated by WeeWX.

  6. Once satisfied that the Ecowitt Gateway driver is operating correctly you can restart the WeeWX daemon:

    sudo /etc/init.d/weewx restart
    

    or

    sudo service weewx restart
    

    or

    sudo systemctl restart weewx
    
  7. You may wish to refer to the Ecowitt Gateway driver wiki for further guidance on customising the operation of the Ecowitt Gateway driver and integrating gateway device data into WeeWX generated reports.

Installation as a WeeWX service

  1. Install WeeWX and configure it to use either the simulator or another driver of your choice.

  2. Install the Ecowitt Gateway driver extension using the wee_extension utility as per Installation as a WeeWX driver at step 2 above.

  3. Edit weewx.conf and under the [Engine] Services stanza add an entry user.gw1000.GatewayService to the data_services option. It should look something like:

    [Engine]
    
        [[Services]]
            ....
            data_services = user.gw1000.GatewayService
    
  4. Test the Ecowitt Gateway service by running the driver file directly using the --test-service command line option:

     PYTHONPATH=/home/weewx/bin python -m user.gw1000 --test-service --ip-address=device_ip_address
    

    where device_ip_address is the IP address of the gateway device being used.

    For WeeWX setup.py installs or for WeeWX package installs use:

     PYTHONPATH=/usr/share/weewx python -m user.gw1000 --test-service --ip-address=device_ip_address
    

    where device_ip_address is the IP address of the gateway device being used.

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

    Note: Whilst the Ecowitt Gateway driver may be run as a service independent of WeeWX, the service still requires WeeWX and it's dependencies be installed. Consequently, if WeeWX 4.0.0 or later is installed the service 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. Some, but not necessarily all, loop packets should include gateway device data. Once finished press ctrl-c to exit.

    Note: When the Ecowitt Gateway driver is run directly with the --test-service command line option a series of simulated loop packets are emitted every 10 seconds to simulate a running WeeWX instance. The gateway device is polled and the gateway device data added to the loop packets when available. As the default gateway device poll interval is 60 seconds not all loop packets will be augmented with gateway device data.

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

  5. You may choose to run WeeWX directly to observe the loop packets and archive records being generated by WeeWX. Note that depending on the frequency of the loop packets emitted by the in-use driver and the polling interval of the Ecowitt Gateway service not all loop packets may include gateway device data; however, provided the gateway device polling interval is less than the frequency of the loop packets emitted by the in-use driver each archive record should contain gateway device data.

  6. Once satisfied that the Ecowitt Gateway service is operating correctly you can restart the WeeWX daemon:

    sudo /etc/init.d/weewx restart
    

    or

    sudo service weewx restart
    

    or

    sudo systemctl restart weewx
    
  7. You may wish to refer to the GW1000 driver wiki for further guidance on customising the operation of the Ecowitt Gateway driver and integrating gateway device data into WeeWX generated reports.