The MQTT plugin enables communication with an MQTT broker (server) on the network. The Miniserver always acts as an MQTT client and supports sending ("publishing") data to and receiving ("subscribing") data from the broker.
MQTT (Message Queuing Telemetry Transport) is a simple and lightweight protocol that can be used for communication between devices. It is widely used for "Internet of Things (IoT)" applications, e.g., for collecting data from sensors or controlling smart devices.
An MQTT broker is required, to which the Miniserver can subscribe and publish. The Miniserver can manage 16 subscriptions (inputs) as well as 16 publishes (outputs).
Please note that the Miniserver Gen. 1 is not supported. |
Table of Contents
Creating and Configuring an Object↑
The MQTT plugin is integrated via Network Periphery:
One MQTT plugin can only connect to one broker at a time. Configure the settings as follows:
Sending/Receiving Data↑
To receive data from the broker (subscribe) or send data to the broker (publish), created the appropriate object:
Sending and receiving messages are always based on topics, which serve as the path or address identifying the data. Subscriptions can listen to multiple topics simultaneously using (wildcards). Publishes do not support wildcards.
Example of a Topic:
If data needs to be sent to a temperature sensor in the living room, the corresponding topic could look like this:
home/livingroom/temperature
Subscription:
Subscribe (receive):
Receives values on the specified topic from the broker.
Another device or application can subscribe to this topic to receive the transmitted messages. For example, a thermostat could subscribe to the topic home/livingroom/temperature to obtain the temperature data.
If JSON formatted data or similar is received, it is recommended to use the "Command Recognition" block to extract the analog value from the data.
Subscription value changes are evaluated at most once every 2 seconds. If a value change occurs within 2 seconds of the previous one, the new change will be cached. After the 2-second interval, the most recent change will be processed. This approach helps to reduce the load on the Miniserver, particularly when multiple changes are sent to a topic within a short period. |
Wildcards in Subscriptions:
To avoid having to subscribe to each topic individually, MQTT supports wildcards, which allow a subscription to multiple topics simultaneously:
Single-Level Wildcard (+): Replaces exactly one topic level in the topic path.
Example:
home/+/temperature
This subscription receives messages from all rooms in the home that send temperature data, such as:
home/livingroom/temperature
home/kitchen/temperature
Multi-Level Wildcard (#): Covers all subsequent topic levels in the topic path and must be used at the end of the path.
Example:
home/#
This subscription receives all messages starting with home/, regardless of the number of subsequent levels, such as:
home/livingroom/temperature
home/kitchen/humidity
home/garage/car/battery
Only subscriptions support wildcards, publishes do not. A device can only send messages to a specific topic, not to multiple topics simultaneously. |
Publish:
Publish (send):
A device (client) sends a message to a specific topic. In the example above, the temperature sensor would send the current temperature to home/livingroom/temperature.
Sensors↑
Summary | Unit |
---|---|
Subscription | Text |
Actuators↑
Summary | Unit |
---|---|
Publish | Text |
Diagnostic Inputs↑
Summary | Description | Unit | Value Range |
---|---|---|---|
Onlinestatus | Indicates whether the device can be reached by the Miniserver. Diagnostics for Air devices Diagnostics for Tree devices Diagnostics for Extensions |
Digital | 0/1 |
Properties↑
Summary | Description | Value Range | Default Value |
---|---|---|---|
Broker address | Network address of the MQTT broker | - | - |
Broker port | Network port of the MQTT broker (Default: 1883) | 0...65535 | - |
Protocol version | MQTT protocol version supported by the MQTT broker (default: MQTTv5) | - | - |
Client ID | The ID of this MQTT client. The ID must be unique when connecting to the MQTT broker! When using MQTTv3 protocol, the ID is truncated to 23 characters. | - | - |
Username | Username for authentication on the MQTT broker. Leave empty for anonymous login (if allowed by the MQTT broker). | - | - |
Password | Password for authentication on the MQTT broker. Leave empty for anonymous login (if allowed by the MQTT broker). | - | - |
Use SSL/TLS | Use SSL/TLS connection to the MQTT broker. | - | - |
Monitor service | If checked, you will be notified by the System Status or Cloud Mailer if this service is no longer available or offline. | - | - |