Uplinks
An Uplink is a runtime exit. It runs on a Site Runtime, subscribes to poll groups of the Devices, and publishes every value it receives to an outside system: an MQTT broker, Kafka, an IoT hub, a webhook. An uplink never polls a device itself.

The page is Connectivity → Uplinks.
The product has no database uplink. Process history goes to the plant historian (mi-tsdb, or the embedded PostgreSQL in Lite). To read it from outside use the read-only SQL access described in Read with SQL. InfluxDB and PostgreSQL appear only as old types that connect but send no values ("In this version device data does not reach this type").
How it works
- You tick the device groups the uplink should send. Every poll result of those groups goes out.
- One message is sent per group and cycle (or one per tag, with One topic per tag).
- If the target is down, messages wait in a bounded queue and, with offline caching, on disk.
- An uplink can also receive: MQTT uplinks listen for write and read requests. See Writes.
Uplink types
| Type | Use | Status |
|---|---|---|
| MQTT | Any MQTT 3.1.1 or 5 broker | Production. Settings |
| AWS IoT | AWS IoT Core | Production. Settings |
| Azure IoT Hub | Azure IoT Hub | Production. Settings |
| Sparkplug B | Sparkplug B hosts | Production. Settings |
| WebSocket | A WebSocket server | Production. Settings |
| Kafka | Kafka clusters | Production. Settings |
| HTTP webhook | Your HTTPS endpoint | Production. Runs in the Site Runtime service. |
| OPC UA Server | Let an OPC UA client read the runtime | LAB. Read only unless client_writes is enabled. No certificates, security policies or users yet. Settings |
Step by step: add an uplink
- Open Connectivity → Uplinks and click Add uplink.
- On "Choose plugin" click the type.
- Fill Name and the connection fields. The form is drawn from the plugin schema, like the Devices form.
- For TLS pick the certificates from the Certificates store.
- Under Subscribe to device groups tick the groups to send. The text says "Checked device groups are subscribed to this uplink." If there is no device yet: "Create a device with groups under Devices first."
- For MQTT and AWS IoT decide on topics (see Topics).
- Click Test connection. It checks that the target answers.
- Keep Enabled on and click Save.

The list shows Name, Kind, Target, Status and Subs (subscriptions). Status values include Connected, Connecting, Retrying, Error, "Needs enabling", Waiting, Down and "Site Runtime needs an update". Counters under a row: "N sent", "N dropped", "N not accepted", "N queued", and "N kept in the plant" (withheld by the egress policy).
Settings reference: MQTT
| Field | Meaning | Default |
|---|---|---|
| MQTT Version | 3.1.1 or 5.0 | 3.1.1 |
| Client ID | Must be unique on the broker. | mii_ plus a random string |
| QoS Level | 0, 1 or 2 | 0 |
| Upload Format | values-format, tags-format, ECP-format, Custom (needs a Schema), protobuf | values-format |
| Upload Tag Error Code | Include the error code of failed tags. | on |
| Enable driver topic | Listen for read and write requests. | on |
| Write Request Topic, Write Response Topic | Where write requests arrive and answers go. | mii/<random>/write/req, .../write/resp |
| Driver Topic Prefix | Prefix of the driver topics. | mii/<random> |
| Driver Status Report | Publish device status regularly (topic, interval 1 to 3600 s). | off |
| Offline Data Caching | Cache while the broker is away. | off |
| Cache Memory Size (MB) | 1 to 1024. | none |
| Cache Disk Size (MB) | 1 to 10240. | none |
| Cache Sync Interval (MS) | 10 to 120000. | 100 |
| Broker Host, Broker Port | The broker. | broker.emqx.io, 1883 |
| Username, Password | Credentials. | empty |
| SSL, CA, Client Cert, Client Private Key | TLS. The CA is required when SSL is on. | off |
The default Broker Host is a public test broker. Always replace it with your own broker.
Other types: AWS IoT (Client ID, QoS 0 or 1, Upload Format, write topics, offline cache, device data endpoint, Root CA, device certificate and key; port 8883, TLS always on), Azure IoT Hub (Device ID, QoS 0 or 1, IoT Hub Hostname, Authentication Shared Access Signature or X.509 Certificates), Sparkplug B (Client ID, Group ID, Node ID, Enable Alias, Group Path, broker), WebSocket (Upload Format, Server URL, certificates). Kafka has Broker Address (default 127.0.0.1:9092), Default Topic (mii-data), Upload Format, Compression, Batch Max Messages (10000), Linger (5 ms), Security Protocol, SASL, certificates, Message Timeout (5000 ms) and Acknowledgements.
HTTP webhook
| Field | Meaning | Default |
|---|---|---|
| URL | http or https. The Site Runtime's own localhost is blocked. Redirects are not followed. | none |
| HMAC secret | Optional. Signs the body in the header X-MI-Signature: sha256=<hex>. | none |
| Samples per post | 1 to 500 | 100 |
| Longest wait (ms) | 50 to 10000 | 200 |
| Timeout (ms) | 500 to 60000 | 5000 |
| Retries | 0 to 8 | 3 |
| CA certificate, Skip server certificate check | TLS. | none |
| Deliver samples | The master switch. Only a person can turn it on. An AI assistant cannot. | off |
Test connection says "The address can be reached. Nothing was posted." Posts carry the headers X-MI-Batch-Id (the same on every retry), X-MI-Attempt and X-MI-Signature. Delivery is at least once: your endpoint must accept a repeated batch id.
Topics
Default topic
With no prefix and ISA-95 topics off, an MQTT uplink publishes each group to
/mii/<uplink name>/<device name>/<group name>
For the demo plant: /mii/plant-mqtt/line1-modbus/fast.
Topic prefix
In the subscription tree each group has Topic prefix (optional) with the buttons Apply the prefix and Undo. With a prefix the topic is <prefix>/<device name>/<group name>. The prefix applies to MQTT and AWS IoT, and only while ISA-95 topics are off.
ISA-95 topics (UNS)
Switch on ISA-95 topics (UNS) (MQTT and AWS IoT) to publish on the plant model's names:
| Mode | Topic |
|---|---|
| Group (default) | [root/]enterprise/site/area/workCenter[/workUnit]/equipment/<group name>. One message per group. |
| One topic per tag | [root/]enterprise/site/area/workCenter[/workUnit]/equipment/<tag>. One message per tag. |
- Topic root (optional) goes in front. The field Topic preview lists up to 20 topics with a copy button.
- Segments are the ISA-95 codes, not display names. Characters
+ # / $ %, white space and control characters are percent-encoded (a space becomes%20). - Limits: 1024 bytes and 32 levels (AWS IoT: 256 bytes and 8 levels). Nothing is cut off. A topic over the limit is an error.
- Reserved roots that cannot be derived:
spBv1.0,mii/v1/...,mii/write/..., and the uplink's own write and status topics. - Uplinks never publish retained messages.
- A rename of a code moves the topic. The uplink re-subscribes and does not reconnect.
- All tags of a group must belong to the same equipment. Otherwise the group has no ISA-95 topic and keeps its default topic.
Error texts you may see in the preview: "another uplink on this broker uses this topic", "same topic as another group", "tags in this group belong to different equipment", "topic is too long", "topic has too many levels", "reserved topic", "no complete ISA-95 path".
The public read-only feed mii/uns/... of the embedded broker is a different thing. See Namespace and MQTT topics.
Sparkplug B and Kafka
Sparkplug B uses spBv1.0/<group id>/NBIRTH|NDEATH/<node id> and spBv1.0/<group id>/DBIRTH|DDATA/<node id>/<device>. Kafka sends to the Default Topic.
Payloads
values-format (default)
{
"node": "line1-modbus",
"group": "fast",
"timestamp": 1764670530123,
"values": { "State": 1, "Speed": 118, "Temperature": 4.1, "Pressure": 3.21 },
"errors": { "Level": 3002 }
}
node is the device name, group the group name. timestamp is epoch milliseconds from the Site Runtime. errors has the codes of failed tags and exists only when Upload Tag Error Code is on. See Error codes.
tags-format and ECP-format
{
"node": "line1-modbus",
"group": "fast",
"timestamp": 1764670530123,
"tags": [
{ "name": "Speed", "value": 118, "type": 4 },
{ "name": "Level", "error": 3002 }
]
}
ECP-format carries type (a numeric type code: 3 INT16, 4 UINT16, 9 FLOAT and so on). Custom without a schema falls back to the tags-format without type. In per-tag mode each message has this shape with one tag.
Public UNS payload
On mii/uns/... the payload is {"value":4.1,"quality":"good","ts":"2026-12-02T10:15:30.123Z","tagId":"tag_…"}.
Store and forward
| Uplink | What happens when the target is away |
|---|---|
| MQTT, AWS IoT, Azure IoT Hub, Sparkplug B | With Offline Data Caching messages are cached in memory (up to Cache Memory Size) and on disk (up to Cache Disk Size), then sent when the connection is back, paced by Cache Sync Interval. Without it messages wait in the bounded queue only. |
| HTTP webhook | At least once. Samples wait on a disk queue. A post can repeat with the same batch id. Retry waits start at 500 ms and grow to 1 minute. A Retry-After up to 5 minutes is honoured. Turning delivery off deletes waiting data. |
| All | The runtime's uplink queue is bounded. When it is full the oldest data is dropped ("dropped" counter) so that polling never stalls. |
Separately, the Site Runtime's own buffer protects the path to the historian (default 4 hours of retention). See Data path.
Tags that may not leave the plant (governance egress policy) are withheld before any uplink sees them. The list shows "N kept in the plant".
Example: the demo plant to an MQTT broker
Goal: publish the group fast of line1-modbus as one message per cycle on ISA-95 topics.
- Add an MQTT uplink named
plant-mqtt. - Broker Host
broker.example.local(your broker), Broker Port1883, QoS Level1, Upload Formatvalues-format. - Turn on ISA-95 topics (UNS) and set Topic root (optional) to
demo. - Under Subscribe to device groups tick
line1-modbus›fast. - Click Test connection, then Save.
The topic preview shows
demo/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/fast
(codes, assuming the codes of the demo model). Check from a shell:
mosquitto_sub -h broker.example.local -t 'demo/#' -v
demo/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/fast {"node":"line1-modbus","group":"fast","timestamp":1764670530123,"values":{"State":1,"Speed":118,"Temperature":4.1,"Pressure":3.21,"GoodCount":15234,"RejectCount":187}}
With One topic per tag the same cycle gives six messages, for example on demo/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/Speed.
Limits and good practice
- Use QoS 1 for production data and QoS 0 for high-rate telemetry. Inbound QoS 2 messages are not delivered to the uplink.
- Give each uplink its own Client ID. Two clients with the same ID disconnect each other.
- Prefer ISA-95 topics: they follow the plant model, not device names.
- Size the offline cache for the longest outage you accept: values per second times message size times outage seconds.
- Do not subscribe one uplink to hundreds of fast groups. Use several uplinks.
- Secrets are never shown again after saving. Keep the broker password in a password manager.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Status Error or Retrying | Broker unreachable, wrong credentials or TLS. | Test connection. Check host, port, CA. |
| Status "Needs enabling" | Enabled is off. | Enable it. |
| Status "Site Runtime needs an update" | The runtime is older than the Console. | Update the runtime. |
| Connected, no messages | No group subscribed, or the group has no tags. | Tick the groups. |
| "same topic as another group" | Two groups map to one topic. | Change the equipment or the prefix. |
| "tags in this group belong to different equipment" | A group mixes equipment. | Split the group by equipment. |
| "dropped" grows | Queue full, broker too slow. | Enable the offline cache, slow the groups, use QoS 0. |
| Webhook delivers nothing | Deliver samples is off. | A person must turn it on. |