Send Line 1 to an MQTT broker
What you build
An Uplink that publishes the poll group fast of the Filler to your own MQTT broker, under an ISA-95 topic such as demo/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/fast. You then read the messages with mosquitto_sub. In the second half you open the read-only public broker of mii Lite and read the same values under mii/uns/#.
Time: about 25 minutes.
- You finished Your first pipeline. The device
line1-modbushas the groupfastwith the six Filler tags, bound to the equipment Filler. - Docker (to run a Mosquitto broker) and the Mosquitto command line tools (
mosquitto_sub) on a computer that can reach the Lite host. - You are signed in as a user who may configure uplinks (integration engineer or admin).
Part 1: publish to your own broker
1. Start a Mosquitto broker
Mosquitto 2 only listens on the local machine unless you tell it otherwise. Create a small config and start the broker:
mkdir -p ~/demo-broker && cd ~/demo-broker
cat > mosquitto.conf <<'EOF'
listener 1883
allow_anonymous true
EOF
docker run -d --name demo-broker --restart unless-stopped \
-p 1883:1883 \
-v "$PWD/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro" \
docker.io/library/eclipse-mosquitto:2
allow_anonymous true is fine for a tutorial on a closed network. In a plant, set a user and password and fill Username and Password in the uplink.
If you also switched on the public MQTT listener of Lite (part 2) on the same machine, both want port 1883. Map the broker to another port, for example -p 1884:1883, and use that port in the uplink.
The tutorials call the broker demo-broker. Use the IP address of the machine if the name does not resolve from the Lite host.
2. Create the uplink
-
Open Connectivity → Uplinks and click Add uplink.
-
In "Choose plugin" select MQTT.
-
Fill the form "Add uplink":
Field Value Name line1-mqttMQTT Version 3.1.1 (default) QoS Level 0 (default) Upload Format values-format (default) Broker Host demo-brokerBroker Port 1883Username, Password empty for this lab broker SSL off Enabled on -
Switch on ISA-95 topics (UNS). Set Topic root (optional) to
demo. Leave One topic per tag off. -
In Subscribe to device groups tick the group fast under
line1-modbus. -
Check the Topic preview. It should show:
demo/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/fast -
Click Test connection, then Save.

Every topic segment is the ISA-95 code you typed in the model (DEMOFOODS, IZMIR, Bottling, Line1, Filler), not the display name. A space would become %20. All tags of a group must belong to the same equipment, otherwise the group keeps the default topic /mii/line1-mqtt/line1-modbus/fast.
The Uplinks list shows line1-mqtt with the status Connected and the counter "N sent" rising.

3. Subscribe and read the payload
mosquitto_sub -h demo-broker -p 1883 -t 'demo/#' -v
Every second you get one message per group:
demo/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/fast {"node":"line1-modbus","group":"fast","timestamp":1764670530123,"values":{"State":1,"Speed":116,"Temperature":4.1,"Pressure":3.21,"GoodCount":14872,"RejectCount":181}}
| Part | Meaning |
|---|---|
node | The device name. |
group | The group name. |
timestamp | Unix milliseconds, set by the Site Runtime when it publishes (not the device clock). |
values | One entry per tag, scaled (Temperature is 4.1 and not 41). |
errors | Added only if a tag could not be read and Upload Tag Error Code is on, for example "errors":{"Pressure":3002}. |
Pretty-print one message with jq:
mosquitto_sub -h demo-broker -t 'demo/#' -C 1 | jq .
4. Try one topic per tag
- Edit the uplink and switch on One topic per tag. The Topic preview now lists six topics, for example
demo/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/Speed. - Subscribe to a single value:
mosquitto_sub -h demo-broker -t 'demo/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/Speed' -v.
Switch it off again when you are done. A rename of any code moves the topic, and the uplink re-subscribes without reconnecting. Uplinks never publish retained messages, so a new subscriber waits up to a second for the first value.
5. Store and forward
If the broker goes away, the MQTT uplink can cache values: edit the uplink, switch on Offline Data Caching and set Cache Memory Size and Cache Disk Size. Test it with docker stop demo-broker, wait a minute, docker start demo-broker, and watch the older values arrive. The counters "N queued" and "N dropped" under the uplink row show what happened.
Part 2: the public read-only broker of Lite
mii Lite has its own broker for outside readers. It is closed by default (Docker images open it). It publishes every tag that is bound to equipment under mii/uns/<enterprise>/<site>/<area>/<work center>/<equipment>/<tag>, one message per tag, and a reader cannot write.
1. Open the listener
- Windows
- Linux
- Docker
Edit C:\ProgramData\MakeIntelligent\config\mii.env and add:
MI_LITE_MQTT_PUBLIC_LISTEN=0.0.0.0:1883
Restart the service, then open the port yourself (the installer opens only 8080):
& "C:\Program Files\MakeIntelligent\mii.exe" stop
& "C:\Program Files\MakeIntelligent\mii.exe" start
New-NetFirewallRule -DisplayName "MakeIntelligent Lite MQTT (1883)" -Direction Inbound -Protocol TCP -LocalPort 1883 -Action Allow
Add this line to /var/lib/makeintelligent/config/mii.env:
MI_LITE_MQTT_PUBLIC_LISTEN=0.0.0.0:1883
sudo systemctl restart makeintelligent
Open 1883/tcp in your firewall if one is active.
The image opens the listener by default (MI_LITE_MQTT_PUBLIC_LISTEN=0.0.0.0:1883). Publish the port: -p 1883:1883, or use --network host.
If the public port collides with another Lite port, Lite does not start. The values off, 0, false, no or empty close the listener.
2. Get the login
When an outside access is open, Lite writes the logins to a restricted file:
# Linux
sudo cat /var/lib/makeintelligent/DATA-ACCESS.txt
# Docker
docker exec mii cat /data/DATA-ACCESS.txt
On Windows open C:\ProgramData\MakeIntelligent\DATA-ACCESS.txt as Administrator. It holds the MQTT user mii-reader and its password.
3. Subscribe
mosquitto_sub -h <lite-host> -p 1883 -u mii-reader -P '<password>' -t 'mii/uns/#' -v
mii/uns/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/Speed {"value":116,"quality":"good","ts":"2026-12-02T10:15:30.123Z","tagId":"tag_01h8x2k9"}
mii/uns/DEMOFOODS/IZMIR/BOTTLING/LINE1/FILLER/Temperature {"value":4.1,"quality":"good","ts":"2026-12-02T10:15:30.123Z","tagId":"tag_01h8x2ka"}
| Field | Meaning |
|---|---|
value | The scaled value. |
quality | good, uncertain, bad or unknown. |
ts | UTC time, ISO 8601 with milliseconds. |
tagId | The tag id (left out when empty). |
error | Only on a bad read: then quality is bad and there is no value. |
- The account
mii-readermay readmii/uns/#and nothing else. The internal topics are closed to it. - Tags that are not bound to an equipment have no path and are skipped.
- This feed does not use your own topic root. It is not the same as the uplink option ISA-95 topics (UNS), which uses the root you choose.
- Messages are QoS 0 and not retained.
Check it works
- The Uplinks list shows
line1-mqttas Connected and "N sent" grows every second. -
mosquitto_sub -t 'demo/#' -vprints one JSON message per second withSpeedbetween 110 and 120 while the Filler runs. -
Temperatureis about 4, not 40. - After
docker stop demo-brokerthe status changes to Retrying or Down, and after the start it returns to Connected. - Part 2:
mii/uns/.../Filler/Speedarrives with"quality":"good".
Next steps
Uplinks in depth
All uplink types, topics and store and forward.
Namespace
How ISA-95 paths become topics.
Read with SQL
The other read-only door of Lite.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Uplink status "Error" or "Retrying" | Broker unreachable, or wrong host or port. | Test with mosquitto_pub -h demo-broker -t test -m hi. Use the IP address. |
Connected but mosquitto_sub prints nothing | The group is not ticked in Subscribe to device groups, or the uplink is not enabled. | Edit the uplink, tick the group, switch on Enabled. |
Topics look like /mii/line1-mqtt/line1-modbus/fast | ISA-95 topics are off, or the group has tags of different equipment ("tags in this group belong to different equipment"). | Switch on ISA-95 topics (UNS) and keep one equipment per group. |
| "no complete ISA-95 path" | The tags are not bound to equipment. | Bind them in the device (see the first tutorial). |
| "another uplink on this broker uses this topic" | Two uplinks produce the same topic. | Change Topic root (optional). |
| Mosquitto: connection refused from another host | Default Mosquitto config listens locally only. | Use the listener 1883 config above. |
| Lite does not start after adding the public listener | The port collides with another Lite port. | Choose a free port in MI_LITE_MQTT_PUBLIC_LISTEN. |
mii-reader login refused | Wrong password, or the listener is closed. | Read DATA-ACCESS.txt again. It exists only while an outside access is open. |