MQTT Integration
Connect Konnect to your MQTT brokers to stream real-time IoT data into your workspace. Full support for MQTT 3.1.1/5.0 and Sparkplug B.
Overview
Section titled “Overview”MQTT (Message Queuing Telemetry Transport) is the standard messaging protocol for IoT devices. Konnect connects to any MQTT broker and lets you:
- Subscribe to topics and view live data streams
- Browse Sparkplug B device hierarchies
- Visualise MQTT data on your dashboards
- Query historical MQTT data through Kai
Adding an MQTT broker connection
Section titled “Adding an MQTT broker connection”Step-by-step:
- Click MQTT Integration in the sidebar navigation.
- Click Add Broker.
- Enter your broker details:
- Broker URL — e.g.,
mqtt://192.168.1.100:1883ormqtts://broker.example.com:8883 - Client ID — A unique identifier (auto-generated if left blank)
- Username — Optional, depending on your broker’s authentication
- Password — Optional
- Broker URL — e.g.,
- Click Connect.
Once connected, Konnect establishes a persistent WebSocket connection and begins receiving messages.
Tip: If you’re using the Docker Compose setup with EMQX, the broker is available at
mqtt://mqtt-broker:1883from within the Docker network.
Subscribing to topics
Section titled “Subscribing to topics”Step-by-step:
- On the MQTT Integration page, locate the Subscribe section.
- Enter a topic pattern — e.g.,
factory/line1/temperatureor use wildcards:factory/+/temperature— Single-level wildcard (any line)factory/#— Multi-level wildcard (all topics under factory)
- Click Subscribe.
- Incoming messages appear in the live message feed below.
Message display
Section titled “Message display”Each message shows:
| Field | Description |
|---|---|
| Topic | The full MQTT topic path |
| Payload | The message content (JSON is auto-formatted) |
| QoS | Quality of Service level (0, 1, or 2) |
| Timestamp | When the message was received |
Sparkplug B support
Section titled “Sparkplug B support”Konnect has native support for the Sparkplug B specification — the industrial IoT interoperability standard built on top of MQTT.
What is Sparkplug B?
Section titled “What is Sparkplug B?”Sparkplug B defines a standard topic namespace and payload format for industrial devices. Instead of raw MQTT topics, you get a structured hierarchy:
spBv1.0 / Group / NBIRTH|NDATA|NDEATH / Edge NodespBv1.0 / Group / DBIRTH|DDATA|DDEATH / Edge Node / DeviceViewing Sparkplug B data
Section titled “Viewing Sparkplug B data”Step-by-step:
- Connect to a broker that publishes Sparkplug B data.
- Konnect automatically detects Sparkplug B messages and presents them in a structured tree view:
- Groups — Top-level organisational units
- Edge Nodes — Gateway devices
- Devices — Individual sensors and controllers
- Metrics — Data points with names, values, and types
- Click any metric to view its current value and history.
- Drag a metric onto the dashboard to create a live chart.
Sparkplug B message types
Section titled “Sparkplug B message types”| Type | Description |
|---|---|
| NBIRTH | Edge Node birth certificate — announces an edge node coming online |
| NDATA | Edge Node data — periodic data updates from the edge node |
| NDEATH | Edge Node death certificate — announces an edge node going offline |
| DBIRTH | Device birth certificate — announces a device coming online |
| DDATA | Device data — periodic data updates from a device |
| DDEATH | Device death certificate — announces a device going offline |
Publishing messages
Section titled “Publishing messages”You can publish messages to MQTT topics directly from Konnect.
Step-by-step:
- On the MQTT Integration page, locate the Publish section.
- Enter the Topic — e.g.,
factory/line1/commands. - Enter the Payload — JSON or plain text.
- Select QoS level (0, 1, or 2).
- Optionally check Retain to retain the message on the broker.
- Click Publish.
Using MQTT data in dashboards
Section titled “Using MQTT data in dashboards”Once subscribed to MQTT topics, the data is available in the Data Sources explorer:
- Expand the MQTT connection in the left panel.
- Browse subscribed topics.
- Drag a topic onto the dashboard to create a live-updating chart.
- Or ask Kai:
Show me a live chart of factory/line1/temperature.
Next steps
Section titled “Next steps”- OPC-UA Integration → — Connect OPC-UA servers for industrial automation data.
- Dashboards & Charts → — Visualise MQTT data on custom dashboards.