ConfigModel

Type: object

Type: array
No Additional Items

Each item of this array must be:

Type: object

The configuration for a MQTT host

Type: object Default: null

The MQTT auth mechanism

Type: null

No authentication

User/Password

Type: object

Authentication using a username and password

Type: integerFormat: uint Default: 1024

The buffer size for each connection

Value must be greater or equal to 0.0

Type: string

The MQTT host

Type: string

The MQTT client ID

Type: integerFormat: uint64

The MQTT keep alive time in seconds

Value must be greater or equal to 0.0

Type: integerFormat: uint16

The MQTT port

Value must be greater or equal to 0.0

Type: object Default: null

Whether or not to use TLS encryption

Type: null

No encryption

TLS Certificate

Type: object

Encryption using a custom TLS certificate

Type: boolean or null

Whether or not to use TLS encryption (default = true)

Type: boolean or null

Whether or not to verify the server's certificate using the provided CA Certificate (default = true)

Type: array of string or null

Which TLS versions are accepted (default = all versions are accepted)

No Additional Items

Each item of this array must be:

Type: array

All the topics to subscribe/publish

No Additional Items

Each item of this array must be:

Type: object

The configuration for a MQTT topic

Type: array

A list of datapoints for this topic, which can either be a subscription or publication depending on the mode.

No Additional Items

Each item of this array must be:

Type: object

Datapoint mode

MQTT Publication

Type: object

The mapping of a datapoint to a MQTT JSON It will send MQTT messages with the following structure: json { "datapoint_name": "some_name", "value": UInt32, "timestamp": 1234567890 }

Type: string

The name of the datapoint This datapoint must be set as a subscriber

Type: enum (of string)

Must be one of:

  • "mqtt_publication"

QoS

Type: enum (of string)

The QoS level for the MQTT message

Must be one of:

  • "AtMostOnce"
  • "AtLeastOnce"
  • "ExactlyOnce"

MQTT Subscription

Type: object

The mapping of a MQTT JSON value to a datapoint

Type: string

The name of the datapoint This datapoint must be set as a publisher

Type: enum (of string)

Must be one of:

  • "mqtt_subscription"

Type: string or null

If the MQTT message contains a timestamp, this is the path to the timestamp. If this field is set to None, the timestamp will be set to the current time.


If the MQTT timestamp path is set, this is the type used to convert that path into a timestamp value. If this field is set to None, the timestamp will use unix timestamps in nanoseconds.

Type: object

Supported types for the MQTT timestamp. Custom formatting based on https://docs.rs/chrono/0.4.45/chrono/format/strftime/

Type: enum (of string)

Must be one of:

  • "UnixSeconds"
  • "UnixMilliseconds"
  • "UnixNanoseconds"
  • "FloatingUnixSeconds"
  • "FloatingUnixMilliseconds"
  • "FloatingUnixNanoseconds"
  • "Iso8601"
  • "Rfc3339"
  • "Rfc2822"
Type: object

Custom formatting string without timezone (will use local timezone)

No Additional Properties

Type: string

The path to the MQTT JSON value

Example If the MQTT message is: json { "temperature": { "value": [25.0, 10, 20], "unit": "C" } } and we pretend to map the first element of the value array, then the path is temperature.value[0]

Type: enum (of string)

The type of the MQTT value

Must be one of:

  • "Float32"
  • "Float64"
  • "UInt32"
  • "UInt64"
  • "Int32"
  • "Int64"
  • "Timestamp"
  • "Boolean"

QoS

Type: enum (of string) Default: "AtMostOnce"

The QoS level for all the subscriptions

Must be one of:

  • "AtMostOnce"
  • "AtLeastOnce"
  • "ExactlyOnce"

Type: string

The name of the topic

MQTT Version

Type: object

The MQTT server version

Type: enum (of string)

For MQTT server with versions up to and including 4

Must be one of:

  • "3"
Type: enum (of string)

For MQTT server with version 5

Must be one of:

  • "5"