-
Notifications
You must be signed in to change notification settings - Fork 13
Running as a driver in standalone mode
Removed in version 3
The driver can be run in "standalone" mode. In this mode, the MQTT data is processed but not written to the database. This enables one to debug without corrupting the data in the database. Depending on one's comfort level with python and weewx, MQTTSubscribe could be run in this mode prior to installation to determine the correct configuration options.
Assuming that MQTTSubscribe has been installed as a driver, the typical invocation would be something like
PYTHONPATH=$BIN_ROOT python $BIN_ROOT/user/MQTTSubscribe.py <options> $CONFIG_ROOT/weewx.conf
where:
$BIN_ROOT - The directory where WeeWX executables are located.
$CONFIG_ROOT - The directory where the configuration (typically, weewx.conf) is located.
Because there are multiple methods to install WeeWX,
location of files can vary. See where to find things
in the WeeWX User's Guide for the definitive information.
and <options> might be:
--type=driver --binding=loop --records=2
where:
--type=driver, says to run MQTTSubscribeDriver.
--binding=loop, says that MQTTSubscribeDriver is bound to loop and therefore loop packets will be generated.
--records=2, says to exit after 2 loop packets have been created.
Run MQTTSubscribe.py with --help to see all the command line options.
Getting Help
Feel free to open an issue, start a discussion in github, or post on WeeWX google group. When doing so, see Help! Posting to weewx user for information on capturing the log.
Getting Started
Prerequisites
Required MQTT information
Required WeeWX information
Installing MQTTSubscribe
Configuring MQTTSubscribe
Running MQTTSubscribe with WeeWX
Debugging
Common Options
Main section
The [[topics]]
section
The [[[message]]]
section
The [[[topic-name]]]
section
The [[[[field-name]]]]
section
Additional Options
Main section
The [[tls]]
section
The [[topics]]
section
The [[[topic-name]]]
section
The [[[[field-name]]]]
section
Example individual Configuration
Example Configuration with multiple types