MQTT Alarm Monitoring for Industrial Equipment

Traditional alarm monitoring is trapped inside the SCADA network. MQTT breaks that boundary — delivering alarm state changes to any subscriber, anywhere, in milliseconds.

MQTT Sparkplug B OPC-UA Industrial IoT Real-Time Alerts Edge Computing

The Problem with Polling-Based Alarm Systems

Most industrial alarm monitoring systems work by polling. A SCADA server or HMI reads PLC tags on a fixed interval — typically every 500ms to 5 seconds — checks for alarm conditions, and logs any changes. This approach has worked for decades within the confines of a single control network, but it has fundamental limitations.

Polling creates a latency floor equal to the poll interval. If you poll every 2 seconds, you can miss an alarm that activates and clears within that window. More importantly, polling does not scale well across plants. If you want a central monitoring system across 50 machines in 3 buildings, you need the SCADA server to maintain persistent connections and poll cycles for every machine — a configuration nightmare that grows linearly with machine count.

Then there is the network boundary problem. SCADA systems typically run on isolated OT networks with no internet access. Getting alarm data to a cloud dashboard, a mobile phone, or an enterprise historian means building complex DMZ architectures with data diodes, relay servers, and custom middleware.

Why MQTT Is Better for Alarm Delivery

MQTT is a publish-subscribe messaging protocol designed for constrained networks. Instead of polling, devices publish messages when state changes occur. Subscribers receive those messages immediately. The fundamental difference is event-driven delivery vs. scheduled reads.

For alarm monitoring, this means:

Sparkplug B: The Industrial MQTT Standard

Raw MQTT defines a transport mechanism but not a data format. Sparkplug B, now an Eclipse Foundation specification, adds the structure that industrial applications need:

Topic Namespace

Sparkplug B defines a hierarchical topic structure: spBv1.0/GroupId/MessageType/EdgeNodeId/DeviceId. For alarm monitoring, a typical alarm topic might be:

The DDATA message type indicates device data — a report-by-exception payload containing only the metrics (tags) that changed since the last publish.

Alarm Payloads in Sparkplug B

Sparkplug B uses Google Protocol Buffers (protobuf) for efficient binary encoding. Each metric in a payload includes:

This structure means every alarm state change arrives with a precise timestamp from the edge, not from the receiving server. For root cause analysis across multiple machines, having accurate edge timestamps is critical for determining event sequence.

Birth and Death Certificates

Sparkplug B includes birth (NBIRTH/DBIRTH) and death (NDEATH/DDEATH) messages. When an edge node connects, it publishes a birth certificate containing every metric it will report, including all alarm tags with their current values. When it disconnects unexpectedly, the broker publishes a pre-registered death certificate.

For alarm monitoring, this means:

OPC-UA Subscriptions vs. MQTT Pub/Sub

OPC-UA also supports event-driven communication through its subscription model. A client creates a subscription, adds monitored items (tags), and receives notifications when values change. So why choose MQTT over OPC-UA for alarm monitoring?

The pragmatic approach: Use OPC-UA at the edge to read PLC tags, and MQTT to transport them to monitoring systems. An OPC-UA-to-MQTT edge gateway combines the best of both: reliable PLC communication via OPC-UA, efficient fan-out via MQTT.

Setting Up Alarm Monitoring Without SCADA

You do not need a full SCADA system to monitor alarms. A minimal MQTT-based alarm monitoring setup requires three components:

1. Edge Gateway

A small industrial PC or gateway appliance running an OPC-UA client and MQTT publisher. Common options include:

The edge gateway connects to the PLC via OPC-UA (or EtherNet/IP for Allen-Bradley, S7 for Siemens), reads alarm tags, and publishes state changes to the MQTT broker.

2. MQTT Broker

The broker can run on-premise, in the cloud, or as a managed service. For industrial alarm monitoring:

For alarm reliability, use QoS 1 at minimum. QoS 0 (fire-and-forget) risks losing alarm messages during network glitches.

3. Alarm Consumer

Any MQTT subscriber can consume alarm data. This could be a cloud application, a mobile notification service, an enterprise historian, or a dedicated alarm management platform.

Edge Deployment Considerations

Deploying MQTT alarm monitoring at the edge introduces practical considerations:

MQTT-Native Alarm Intelligence

AlarmIQ connects to your MQTT broker or OPC-UA server and monitors every alarm in real time. Combine live alarm data with PLC program analysis for instant root-cause tracing — no SCADA required.

Learn About AlarmIQ

Further Reading