MQTT
MQTT is subscription based, we receive a notification when something is published on the topic. We receive the payloads as a string and are able to convert them automatically to the following datatypes:
Datatype | Format |
---|---|
String | Regular string |
Int | 10 |
Float | 1,56 OR 1.56 |
Double | 1,56 OR 1.56 |
Bool | true OR false |
Array | [1,2,3] OR 1,2,3 => split on "," |
e.g.
Type | Example mapping | Output database fieldnames |
---|---|---|
Multi level wildcard | Machine1/# | Machine1_temp_sensor1, Machine1_xxxxx_xxxxx, ... |
Single level wildcard | Machine1/+/sensor1 | Machine1_temp_sensor1, Machine1_xxxxx_sensor1, ... |
Full topic names | Machine1/temp/sensor1 | Machine1_temp_sensor1 |
You can find a list of special data types you cand send here.
QoS Level
The QoS Level is defined in two places: the publishing client defines the QoS level between publishing client and broker, and the subscribing client defines the QoS level between broker and subscribing client. By default Capture will use QoS level 0 for subscribing. You can change this by setting this JSON in the custom Connection settings (cogwheel next to the Connection settings title of the MQTT connection):
{"QosLevel":1}
The possible QoS levels are:
QoS Level | Description |
---|---|
0 | At most once delivery: The message is delivered once or not at all. This is the fastest mode. |
1 | At least once delivery: The message is guaranteed to be delivered at least once, but duplicates may occur. |
2 | Exactly once delivery: The message is guaranteed to be delivered exactly once. This is the slowest mode. |