0% found this document useful (0 votes)
58 views

3 - Use MQTT's Built-In Stateful Awareness

This document discusses best practices for building an IIoT platform, focusing on the benefits of MQTT's built-in stateful awareness. MQTT is designed with a "last will and testament" feature allowing it to publish a "death certificate" if a device stops working, informing users of its status. This improves visibility of equipment health compared to legacy polling protocols. The document also provides an overview of different strategies for implementing MQTT communication in existing systems, including using edge devices that convert legacy protocols to MQTT or have MQTT capabilities built-in.

Uploaded by

Kumud Goel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

3 - Use MQTT's Built-In Stateful Awareness

This document discusses best practices for building an IIoT platform, focusing on the benefits of MQTT's built-in stateful awareness. MQTT is designed with a "last will and testament" feature allowing it to publish a "death certificate" if a device stops working, informing users of its status. This improves visibility of equipment health compared to legacy polling protocols. The document also provides an overview of different strategies for implementing MQTT communication in existing systems, including using edge devices that convert legacy protocols to MQTT or have MQTT capabilities built-in.

Uploaded by

Kumud Goel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Tip Sheet Series - 6 Best Practices for Building Your IIoT Platform

Best Practice #3: Use MQTT’s Built-In


Stateful Awareness
Gain Greater Visibility on Your Equipment Health

In the last article, we learned about the powerful feature set of MQTT. With its low-
bandwidth publish/subscribe methodology and TLS security, MQTT has proven to be a
formidable IIoT communication protocol. There is one additional feature that is critical to
your IIoT infrastructure: the stateful awareness that is built into MQTT.

Stateful Awareness is Important for IIoT


Stateful awareness is important for SCADA systems, especially for remote installations.
Knowing the health of the device and the network connection helps to mitigate any
downtime and ensures data is being shared with all levels of an organization. By having
state, data becomes more stable, reliable, and contextual.
Most enterprises still depend on legacy poll/response communication protocols to be able
to know the state of the network connection between devices and the SCADA system.
Unfortunately, in order to determine state, devices must be polled frequently to determine
whether or not a network connection is good, which can put a strain on a system.

Stateful Awareness is Built Into MQTT


MQTT has stateful awareness built in; it is the only stateful architecture available. It is
designed with a “last will and testament.” If the device stops working and falls off the network,
then the MQTT server will publish a “death certificate” and the device will be marked as
being unable to publish data. On a larger scale, with thousands of devices connected to the
MQTT server, it is important to know within seconds the state of each device and if it can
publish data. Devices are either online ready to publish data or they are unavailable.
When a device connects to an MQTT server, it registers its state and then it registers its last
will and testament. Ignition and MQTT Engine* will know that the devices are online and will
deliver information if and when it changes. In the event of hardware failure or environmental
issue, the MQTT server will publish the fact that the device is no longer available. In Ignition,
those tags are represented as stale data and the device is marked as unavailable. When the
device comes back online, it republishes its birth certificate. The MQTT Engine knows that the
device is available, and Ignition shows the updated tags and the device’s availability.

Stateful Awareness Improves Processes


Stateful awareness is a subtle but powerful feature of MQTT. There are many MQTT
implementations that are stateless, but for SCADA implementations, stateful awareness is
essential. MQTT improves efficiency by first being a lightweight communications protocol
that uses low bandwidth. Secondly, MQTT uses reporting by exception (RBE) which is made
possible by stateful awareness. Data is only sent when there are changes to the state of the

800.266.7798
www.inductiveautomation.com
device or when data values change, which reduces the amount of useless data taking up
bandwidth resources.
Knowing the device state is valuable since it helps to provide context to the data. Operators,
especially, can keep track of devices and quickly pinpoint any trouble spots without having
to send a technician out to a location to verify an issue. On the organizational level, data can
be verified to be up-to-date and accurate.

3 Ways to Implement MQTT


Now that we have established that MQTT is the ideal communications protocol for your IIoT
system, our next step is to look at ways to start implementing MQTT. There are three main
strategies to transition your SCADA system over to MQTT: converting existing devices to
MQTT, enabling existing devices to communicate with MQTT platforms, and embedding
MQTT directly onto devices.
The first strategy is to convert legacy devices to use MQTT. An edge-of-network device is
designed to communicate with legacy devices using their native protocol. The edge gateway
then connects directly to an MQTT server. The poll/response is moved to the local level and
data is converted to MQTT and publishes the information to an MQTT Server. This strategy is
ideal for current installations using legacy equipment and traditional poll/response protocols.
The second strategy is to enable edge devices to communicate with MQTT platforms using the
Sparkplug specification from Cirrus Link Solutions. Cirrus Link provides open-source software,
tools, and the Sparkplug reference specification to allow applications, sensors, devices, or
gateways to seamlessly integrate with Ignition using the Cirrus Link MQTT modules.
The third strategy, which is appropriate for newer installations, is to use devices with MQTT
already embedded into them. Manufacturers have begun to offer devices that have the
Sparkplug specification enabled, making them ready to install and connect to your MQTT
server and to the rest of your IIoT implementation. In this strategy, these edge-of-network
devices do not require a separate edge gateway since the MQTT functionality is already
built in.
Now that we have established the importance of stateful awareness and how MQTT can be
implemented, we now turn our attention to edge-of-network devices.
Edge-of-network devices act as a bridge between PLCs and the MQTT Server or “broker.” This
capability makes them a critical component in the MQTT architecture and IIoT infrastructure.
In the next article, we will learn more about what edge devices are and why redundancy is
important.
To learn more about how Ignition delivers the industry’s best IIoT solution, visit:
inductiveautomation.com

*The Cirrus Link MQTT Engine Module for Ignition will be described in Best Practice #5.

800.266.7798
www.inductiveautomation.com

You might also like