Skip to content

Manual installation

gjr80 edited this page Jul 31, 2024 · 3 revisions

Manual Installation

Introduction

The recommended method for installation of the Ecowitt gateway driver is to use the WeeWX wee_extension utility as detailed in the Quick Start Guide; however, the Ecowitt gateway driver may also be installed manually.

Note: Once installed manually future upgrades of the Ecowitt gateway driver may be installed using wee_extension; however, any uninstallation of the driver will need to be performed manually.

Pre-Requisites

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

Manual Installation

To manually install the Ecowitt gateway driver:

  1. Download the Ecowitt gateway driver extension package:

    wget -P /var/tmp https://github.com/gjr80/weewx-gw1000/releases/download/v0.6.0b2/gw1000-0.6.0b2.tar.gz
    
  2. Unpack the extension package as follows:

    tar xvfz /var/tmp/gw1000-0.6.0b2.tar.gz
    
  3. Copy files from within the resulting directory as follows:

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

    The symbolic name BIN_ROOT should be replaced with either /home/weewx/bin for setup.py installs or /usr/share/weewx for package installs.

  4. Open weewx.conf with a text editor and make the following changes/additions:

    • insert a [GW1000] stanza as follows:

      [GW1000]
          # This section is for the Ecowitt Gateway driver.
      
          # How often to poll the API, default is every 20 seconds:
          poll_interval = 20
      
          # The driver to use:
          driver = user.gw1000
      
    • if an [Accumulator] stanza does not exist insert an [Accumulator] stanza as follows:

      [Accumulator]
      
          # Start Ecowitt Gateway driverextractors
          [[daymaxwind]]
              extractor = last
          [[lightning_distance]]
              extractor = last
          [[lightning_strike_count]]
              extractor = sum
          [[lightningcount]]
              extractor = last
          [[lightning_last_det_time]]
              extractor = last
          [[stormRain]]
              extractor = last
          [[hourRain]]
              extractor = last
          [[dayRain]]
              extractor = last
          [[weekRain]]
              extractor = last
          [[monthRain]]
              extractor = last
          [[yearRain]]
              extractor = last
          [[totalRain]]
              extractor = last
          [[p_rain]]
              extractor = sum
          [[p_stormRain]]
              extractor = last
          [[p_dayRain]]
              extractor = last
          [[p_weekRain]]
              extractor = last
          [[p_monthRain]]
              extractor = last
          [[p_yearRain]]
              extractor = last
          [[t_rain]]
              extractor = sum
          [[t_stormRain]]
              extractor = last
          [[t_dayRain]]
              extractor = last
          [[t_weekRain]]
              extractor = last
          [[_monthRain]]
              extractor = last
          [[t_yearRain]]
              extractor = last
          [[pm2_51_24h_avg]]
              extractor = last
          [[pm2_52_24h_avg]]
              extractor = last
          [[pm2_53_24h_avg]]
              extractor = last
          [[pm2_54_24h_avg]]
              extractor = last
          [[pm2_55_24h_avg]]
              extractor = last
          [[pm10_24h_avg]]
              extractor = last
          [[co2_24h_avg]]
              extractor = last
          [[wh40_batt]]
              extractor = last
          [[wh26_batt]]
              extractor = last
          [[wh25_batt]]
              extractor = last
          [[wh24_batt]]
              extractor = last
          [[wh65_batt]]
              extractor = last
          [[wh31_ch1_batt]]
              extractor = last
          [[wh31_ch2_batt]]
              extractor = last
          [[wh31_ch3_batt]]
              extractor = last
          [[wh31_ch4_batt]]
              extractor = last
          [[wh31_ch5_batt]]
              extractor = last
          [[wh31_ch6_batt]]
              extractor = last
          [[wh31_ch7_batt]]
              extractor = last
          [[wh31_ch8_batt]]
              extractor = last
          [[wn34_ch1_batt]]
              extractor = last
          [[wn34_ch2_batt]]
              extractor = last
          [[wn34_ch3_batt]]
              extractor = last
          [[wn34_ch4_batt]]
              extractor = last
          [[wn34_ch5_batt]]
              extractor = last
          [[wn34_ch6_batt]]
              extractor = last
          [[wn34_ch7_batt]]
              extractor = last
          [[wn34_ch8_batt]]
              extractor = last
          [[wn35_ch1_batt]]
              extractor = last
          [[wn35_ch2_batt]]
              extractor = last
          [[wn35_ch3_batt]]
              extractor = last
          [[wn35_ch4_batt]]
              extractor = last
          [[wn35_ch5_batt]]
              extractor = last
          [[wn35_ch6_batt]]
              extractor = last
          [[wn35_ch7_batt]]
              extractor = last
          [[wn35_ch8_batt]]
              extractor = last
          [[wh41_ch1_batt]]
              extractor = last
          [[wh41_ch2_batt]]
              extractor = last
          [[wh41_ch3_batt]]
              extractor = last
          [[wh41_ch4_batt]]
              extractor = last
          [[wh45_batt]]
              extractor = last
          [[wh51_ch1_batt]]
              extractor = last
          [[wh51_ch2_batt]]
              extractor = last
          [[wh51_ch3_batt]]
              extractor = last
          [[wh51_ch4_batt]]
              extractor = last
          [[wh51_ch5_batt]]
              extractor = last
          [[wh51_ch6_batt]]
              extractor = last
          [[wh51_ch7_batt]]
              extractor = last
          [[wh51_ch8_batt]]
              extractor = last
          [[wh51_ch9_batt]]
              extractor = last
          [[wh51_ch10_batt]]
              extractor = last
          [[wh51_ch11_batt]]
              extractor = last
          [[wh51_ch12_batt]]
              extractor = last
          [[wh51_ch13_batt]]
              extractor = last
          [[wh51_ch14_batt]]
              extractor = last
          [[wh51_ch15_batt]]
              extractor = last
          [[wh51_ch16_batt]]
              extractor = last
          [[wh55_ch1_batt]]
              extractor = last
          [[wh55_ch2_batt]]
              extractor = last
          [[wh55_ch3_batt]]
              extractor = last
          [[wh55_ch4_batt]]
              extractor = last
          [[wh57_batt]]
              extractor = last
          [[wh68_batt]]
              extractor = last
          [[ws80_batt]]
              extractor = last
          [[ws90_batt]]
              extractor = last
          [[wh40_sig]]
              extractor = last
          [[wh26_sig]]
              extractor = last
          [[wh25_sig]]
              extractor = last
          [[wh24_sig]]
              extractor = last
          [[wh65_sig]]
              extractor = last
          [[wh31_ch1_sig]]
              extractor = last
          [[wh31_ch2_sig]]
              extractor = last
          [[wh31_ch3_sig]]
              extractor = last
          [[wh31_ch4_sig]]
              extractor = last
          [[wh31_ch5_sig]]
              extractor = last
          [[wh31_ch6_sig]]
              extractor = last
          [[wh31_ch7_sig]]
              extractor = last
          [[wh31_ch8_sig]]
              extractor = last
          [[wn34_ch1_sig]]
              extractor = last
          [[wn34_ch2_sig]]
              extractor = last
          [[wn34_ch3_sig]]
              extractor = last
          [[wn34_ch4_sig]]
              extractor = last
          [[wn34_ch5_sig]]
              extractor = last
          [[wn34_ch6_sig]]
              extractor = last
          [[wn34_ch7_sig]]
              extractor = last
          [[wn34_ch8_sig]]
              extractor = last
          [[wn35_ch1_sig]]
              extractor = last
          [[wn35_ch2_sig]]
              extractor = last
          [[wn35_ch3_sig]]
              extractor = last
          [[wn35_ch4_sig]]
              extractor = last
          [[wn35_ch5_sig]]
              extractor = last
          [[wn35_ch6_sig]]
              extractor = last
          [[wn35_ch7_sig]]
              extractor = last
          [[wn35_ch8_sig]]
              extractor = last
          [[wh41_ch1_sig]]
              extractor = last
          [[wh41_ch2_sig]]
              extractor = last
          [[wh41_ch3_sig]]
              extractor = last
          [[wh41_ch4_sig]]
              extractor = last
          [[wh45_sig]]
              extractor = last
          [[wh51_ch1_sig]]
              extractor = last
          [[wh51_ch2_sig]]
              extractor = last
          [[wh51_ch3_sig]]
              extractor = last
          [[wh51_ch4_sig]]
              extractor = last
          [[wh51_ch5_sig]]
              extractor = last
          [[wh51_ch6_sig]]
              extractor = last
          [[wh51_ch7_sig]]
              extractor = last
          [[wh51_ch8_sig]]
              extractor = last
          [[wh51_ch9_sig]]
              extractor = last
          [[wh51_ch10_sig]]
              extractor = last
          [[wh51_ch11_sig]]
              extractor = last
          [[wh51_ch12_sig]]
              extractor = last
          [[wh51_ch13_sig]]
              extractor = last
          [[wh51_ch14_sig]]
              extractor = last
          [[wh51_ch15_sig]]
              extractor = last
          [[wh51_ch16_sig]]
              extractor = last
          [[wh55_ch1_sig]]
              extractor = last
          [[wh55_ch2_sig]]
              extractor = last
          [[wh55_ch3_sig]]
              extractor = last
          [[wh55_ch4_sig]]
              extractor = last
          [[wh57_sig]]
              extractor = last
          [[wh68_sig]]
              extractor = last
          [[ws80_sig]]
              extractor = last
          [[ws90_sig]]
              extractor = last
          # End Ecowitt Gateway driverextractors 
      

      If an [Accumulator] stanza does exist add the above [Accumulator] entries to the existing [Accumulator] stanza.

    • locate the [StdArchive] stanza and ensure the record_generation config option is set to software:

      [StdArchive]
          ....
          record_generation = software
      

      If record_generation is set to hardware change it to software.

    • save weewx.conf

  5. Test the Ecowitt gateway driver by running the driver file directly using the --test-driver, ip-address and, if necessary, the --port command line options:

     PYTHONPATH=/home/weewx/bin python -m user.gw1000 --test-driver --ip-addresse=<IP_ADDRESS> --port=45000
    

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

     PYTHONPATH=/usr/share/weewx python -m user.gw1000 --test-driver --ip-addresse=<IP_ADDRESS> --port=45000
    

    Note: The gateway device IP address and port are specified during testing using the --ip-address and --port command line options. <IP_ADDRESS> must be replaced with the gateway device IP address in the above commands. Refer to the Ecowitt gateway driver help by using the --help command line option for further information.

    Note: Whilst the driver may be run independently of WeeWX, the driver still requires WeeWX and it's dependencies be installed. 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.

  6. Reconfigure WeeWX to use the Ecowitt gateway driver:

    wee_config --reconfigure --driver=user.gw1000
    

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

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

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

  8. Restart WeeWX:

    $ sudo /etc/init.d/weewx restart
    

    or

    $ sudo service weewx restart
    

    or

    $ sudo systemctl restart weewx