-
Notifications
You must be signed in to change notification settings - Fork 8
Running the driver directly
The Ecowitt gateway driver may be run directly to assist with installation and testing. Furthermore, due to the nature of the network connection used to communicate with the gateway device, and unlike some other stations that use a dedicated communications link, the driver may be run directly simultaneously with a WeeWX instance which is communicating with the same device.
To run the Ecowitt gateway driver directly requires WeeWX v3.7.0 or greater be installed and an Ecowitt gateway device connected to the same network segment as the WeeWX machine.
The Ecowitt gateway driver is run directly using one or more command line options. The command used to run the driver directly depends on the WeeWX installation. For setup.py installs the following command should be used:
PYTHONPATH=/home/weewx/bin python -m user.gw1000
for package installs use:
PYTHONPATH=/usr/share/weewx python -m user.gw1000
Note: Whilst the driver may be run independently of WeeWX the driver still requires WeeWX and it's dependencies be installed. Consequently, 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
.
by using one of the following commands
-
Confirm the Ecowitt gateway driver can be run directly using the following commandDownload the GW1000 driver extension package:
-
Test the 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 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'.
Note: If necessary you can specify the GW1000 IP address and port using the
--ip-address
and--port
command line options. Refer to the GW1000 driver help by using the--help
command line option for further information.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.
-
You may choose to run WeeWX directly to observe the loop packets and archive records generated by WeeWX.