MQTT
On this page
MQTT (Message Queuing Telemetry Transport) is a lightweight publish/subscribe protocol designed for efficient communication between devices in environments with limited bandwidth or high latency. It is widely used in IoT applications for real-time data exchange between sensors, edge devices, and servers.
DataTalk acts as an MQTT client, subscribing to topics from an external MQTT broker.
Device identification
MQTT devices can be identified in two ways:
ID in payload — the device identifier is part of the message body:
Topic: sensors
Payload: {"ID": 1, "temperature": 23}
ID in topic — the device identifier is part of the topic path:
Topic: sensors/1
Payload: {"temperature": 23}
When creating an MQTT connection, specify which method your devices use. DataTalk then uses the unique identifier as the tag address in the Tag Database.
Supported data types
| Data type | Description |
|---|---|
| Buffer | Raw binary data |
| String | UTF-8 encoded text |
| Number | 32-bit integer |
| Boolean | True/False |
| null | Null value |
Connection parameters
| Parameter | Description |
|---|---|
| Broker address | Hostname or IP of the MQTT broker. For TLS use mqtts:// prefix, e.g. mqtts://192.168.1.10 |
| Port | Default 1883 (unencrypted) or 8883 (TLS) |
| Client ID | Unique identifier for this connection on the broker |
| Username / Password | Credentials if the broker requires authentication |
| Topic | Topic(s) to subscribe to; supports + (single level) and # (multi-level) wildcards |
Tags and UDT
MQTT tags in the Tag Database use the UDT type. To configure log groups, limits, or scaling for MQTT tags, set them first in the UDT section — changes propagate automatically to all tags using that UDT.
This connection receives data from an external MQTT broker. To publish DataTalk data outward to other systems, enable the built-in MQTT Broker under Settings → Data Servers.