Skip to content

Experimental Options

Rich Bell edited this page Feb 3, 2025 · 4 revisions

Configuring experimental options

These may change or go away.

The [MQTTSubscribeDriver]/[MQTTSubscribeSection] section

This configures the MQTT connection and any necessary WeeWX options.

archive_interval

The WeeWX archive interval. Only used when the archive_topic is set and MQTTSubscribe is running in ‘hardware generation’ mode. The default is ‘300’.

archive_topic

Payload in this topic is processed like an archive record. This means that MQTTSubscribe is running in ‘hardware generation’ mode. The default is None. This is only used by the driver.

console

In addition to any WeeWX logging setup, MQTTSubscribe will also log to the console. The default is None.

logging_filename

In addition to any WeeWX logging setup, MQTTSubscribe will also log to the specified filename. The default is None.

logging_level

Overrides the WeeWX ‘debug’ setting. Valid values are Python’s logging levels, CRITICAL, ERROR, WARNING, INFO, DEBUG, and NOTSET. An additional value TRACE is also supported. This logs even more detail than DEBUG. The default value is NOTSET. But in this case NOTSET means to use the WeeWX ‘debug’ setting.

max_loop_interval

Coming soon.

When no loop packet has been generated in max_loop_interval, MQTTSubscribeDriver will generate an 'empty' packet. This can be useful to ensure that archive processing regulary happens when the MQTT payload arrives very irregularly. Only used by the driver. The default is 0 (off).

message_callback_provider

Experimental option to specify different message parsers.

The [[topics]] section

collect_observations = False

With the exception of wind data, by default a packet is created for every MQTT message received. When this is true, MQTTSubscribe attempts to collect observations across messages into a packet. Default is False.

collect_wind_across_loops = True

By default wind data is collected together across generation of loop packets. Setting to false results in the data only being collected together within a loop packet. Default is True.

single_queue = False

With the exception of wind data, by default a queue is created for every MQTT topic. When this is true, MQTTSubsribe uses a single queue for all non wind data. This is useful when 'collect_observations = True'. Default is False.

The [[[topic-name]]] sections

topic_tail_is_fieldname = False

When true, the last segment of the topic is used as the fieldname. Only used for individual payloads. Default is False.

The [[weewx]] section

Used to configure additional observations and units for WeeWX to use. See, https://weewx.com/docs/5.0/custom/units/#creating-a-new-unit-group This assumes a good knowledge of customizing WeeWX. An example can be found here.

The [[[observations]]] section

observation-name

Used to designate the unit_group the observation belongs to. For example, observation-name = unit-group-name

The [[[units]]] section

For each [[[[unit-name]]]] section

format

The formatting for this unit.

group

The unit group this unit belongs to.

label

The label for this unit.

unit_system

The unit system this unit belongs to.

[[[[[conversion]]]]] section
to-unit-name

The formula to use to convert to this unit. For example, to-unit-name = function to convert from unit to to-unit

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

Date/Time Processing Options

Experimental Options

Configurator Mode

    Environment setup
    Invocation
    Options

Simulator Mode

    Environment setup
    Invocation
    driver simulation options
    service simulation options

Parser Mode

    Environment setup
    Invocation
    Options

Example individual Configuration

Example json Configuration

    Simple json message
    'Nested' json message
    json message with array

Example keyword Configuration

Example Configuration with multiple types

Example unit and unit group customization

FAQ

Debugging
Understanding The log

    Initialization
    MQTT Initialization
    MQTTSubscribeDriver secondary thread processing
    MQTTSubscribeDriver primary thread processing
    MQTTSubscribeService secondary thread processing
    MQTTSubscribeService primary thread processing

Supporting Additional message types
Development Environment
Deprecated Documentation

     Configuring pre 1.6.0
     Options Removed In 2.0.0
     Using test_mqtt.py To Check MQTT
     Running As A driver In Standalone Mode
     Running As A service In Standalone Mode

Clone this wiki locally