-
Notifications
You must be signed in to change notification settings - Fork 13
Parser mode
Note, this function was intoduced in MQTTSubscribe version 3.0.
This reads data from a file and attempts to parse it into WeeWX format.
This functionality is useful for people that do not have acces to the live MQTT feed, such as MQTTSubscribe developers.
If running as a driver,
RUN_MODE=driver
If running as a service,
RUN_MODE=service
source ~/weewx-venv/bin/activate
WEEWX_ROOT=~/weewx-data
export USER_ROOT=$WEEWX_ROOT/bin/user
CONFIG_FILE=$WEEWX_ROOT/weewx.conf
WEECTL=weectl
WEEWX_ROOT=/etc/weewx/
export BIN_ROOT=/usr/share/weewx/
export USER_ROOT=$WEEWX_ROOT/bin/user
CONFIG_FILE=$WEEWX_ROOT/weewx.conf
WEECTL=weectl
WEEWX_REPO=~/weewx
WEEWX_ROOT=~/weewx-data
export BIN_ROOT=$WEEWX_REPO/src
export USER_ROOT=$WEEWX_ROOT/bin/user
CONFIG_FILE=$WEEWX_ROOT/weewx.conf
WEECTL=$WEEWX_REPO/bin/weectl
python3 $USER_ROOT/MQTTSubscribe.py parse $RUN_MODE --help
The WeeWX configuration file. Typically weewx.conf.
Log to console in addition to syslog.
Log to specified file.
Specify the level of logging. Valid values are, DEBUG, INFO, TRACE.
The file containing the MQTT message.
Use the complete input configuration as the MQTTSubscribeDriver/MQTTSubscribeService configuration section.
The topic to 'publish' the '--message-file' message.
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