Key Characteristics
- Pub/Sub Architecture: Devices publish messages to topics, and other devices subscribe to those topics.
- Broker-based: All messages are routed through a broker (e.g., Mosquitto, HiveMQ, EMQX).
- Lightweight and efficient: Designed for low-bandwidth, low-power, and high-latency networks.
- Uses TCP/IP (and optionally WebSockets)
- Standard Port: TCP 1883 (unencrypted), TCP 8883 (with TLS encryption)
MQTT in Industrial Automation
MQTT is becoming popular in automation systems as industries move toward Industry 4.0 and IIoT (Industrial Internet of Things). It's supported by major automation platforms including:
Platform | MQTT Support |
---|---|
Ignition SCADA | Built-in MQTT Transmission & Engine modules |
Siemens | Via IoT2040, SIMATIC IoT Gateway, or Edge apps |
Rockwell/AB | Via FactoryTalk Edge Gateway or 3rd-party bridges |
Arduino/Pi/ESP32 | Natively via libraries |
Kepware | Via MQTT client and server drivers |
How MQTT Works
Pub/Sub Model Example
- Sensor publishes:
- Topic: factory/machine1/temperature
- Payload: 72.4
- PLC or SCADA subscribes to: factory/machine1/#
- Broker receives and routes messages between devices.
Security Options
- TLS encryption for data security
- Username/password authentication
- Access Control Lists (ACLs) for topic-level restrictions
Common MQTT Terms
Term | Description |
---|---|
Broker | Server that routes messages (e.g., Mosquitto) |
Client | Device or application that publishes/subscribes |
Topic | Hierarchical string path (e.g., plant1/line2/temp) |
QoS | Quality of Service levels (0, 1, 2) for message delivery reliability |
Retain | Broker stores the last message for new subscribers |
LWT | Last Will and Testament — notifies others if a client disconnects unexpectedly |
When to Use MQTT in Automation
Ideal for:
- Connecting remote sensors to SCADA
- Cloud-to-edge data flows
- Real-time telemetry from PLCs, HMIs, or devices
- Bridging OT (Operational Technology) to IT systems
Less ideal for:
- Deterministic, hard real-time control
- High-speed closed-loop feedback without buffering