OptoBlog

MQTT: Bringing it all together

Posted by Josh Eastburn on Jul 29, 2020 8:45:29 AM

Building industrial MQTT networks at scale with Opto 22 groov devices.

If you've followed this series since the beginning, you should have a good idea of how to set up your groov EPIC or groov RIO for MQTT communication. You also understand the importance of Sparkplug B in building MQTT systems and designing industrial-strength IoT networks.

After all that, you might still be wondering what the big picture looks like: can MQTT really be counted on to build industrial networks? If so, how do all the pieces come together, including existing equipment, back-end applications, and legacy devices that use serial or fieldbus protocols?

In this final installment of the series, I will lay out what these systems look like and how they solve the problems of securing and connecting disparate automation and business systems. With groov hardware, getting started with MQTT is fast and easy.

Components of an MQTT network

So you think you want to build an MQTT/Sparkplug B network? This diagram might look scary, but there are really only two components.

MQTT/Sparkplug B infrastructure components
MQTT/Sparkplug B infrastructure components (courtesy of Cirrus Link Solutions)

MQTT Server(s): One or more MQTT brokers as needed for redundancy, high availability, or scalability. The broker(s) can run on anything from a single-board computer, to an edge device like groov EPIC, to a local PC or server, or even a cloud-hosted VM (virtual machine). Any MQTT 3.1.1+ server will support Sparkplug B payloads.

MQTT/Sparkplug B Client(s): These publish and/or subscribe to MQTT data, conforming to the Sparkplug B topic and payload definition. Clients can include:

  • MQTT Edge of Network (EoN) Node(s): Devices like groov EPIC or groov RIO that provide physical and/or logical gateway functions to non-MQTT devices and sensors. They can also publish their own internal data.
  • MQTT-enabled Device(s): Device, sensor, or hardware clients that can provide data, process variables, or metrics directly to an MQTT broker.
  • MQTT Application(s): Software clients, optionally including one primary SCADA/IIoT host application. An MQTT application may also be a gateway to other software systems that don’t support MQTT yet.

Not as bad as it looked, right?

OK, but which broker should I use?

Here are a few options we recommend. All of them support user authentication, certificate-based TLS encryption, and access control lists (ACLs), and all have plenty of real-world users.

Eclipse Mosquitto

Lightweight, fast, and free. A good option if you're comfortable on the command line. Already included in the groov EPIC repository for users who have installed the free Shell access license.

Cost: Free, open-source, cross-platform.
Capacity: Successfully tested with 100,000 clients.
Requirements: ~120 KB executable; 3 MB RAM is enough to support 1000 clients.
Technical support: Community support only.

Ignition MQTT Distributor

Designed for industrial applications, Ignition is easy to set up and boasts features for scalability and redundancy as well as integration with other features of the Ignition platform.

Cost: $2,950/$4,250*, or free on two-hour timer.
Capacity: Available in 50- and 250-client versions.
Requirements: Ignition or Ignition Edge platform. Ignition requires Java, a dual-core processor, and 4 GB RAM.
Technical support: Free email and forum support. 90-day free post-sales telephone support. Long-term support contracts available.

Chariot MQTT Server

Designed by the co-inventors of MQTT and Sparkplug B for industrial end-users, Chariot is a functional replacement for MQTT Distributor for larger-scale deployments and non-Ignition users.

Cost: $7,950**, or free on two-hour timer.
Capacity: Unlimited clients.
Requirements: Delivered as an OVF file for native import to VM or cloud computing platforms. Requires a quad-core processor and 8 GB RAM (or equivalent).
Technical support: Free phone and email support.

* List price as of 7/20/20. Discounted Ignition Edge pricing available through Opto 22.
** List price as of 7/20/20.

And what about everything else?

Because of the long lifetime of most industrial installations, the majority of desirable automation data is found in existing equipment, locked in legacy devices and standalone machinery. Additionally, there are many SCADA and business applications that may not yet support MQTT communication. A realistic IIoT solution must provide an integration path for these systems, seamlessly bridging disparate automation and IT networks.

Here’s our go-to formula for setting up an MQTT network that provides a full set of integration options and can also be tested out at no cost:

groov_epic_rio_mqtt

A starter MQTT network using groov EPIC and Ignition

  1. Download and install Ignition to a local computer (Linux, Mac, Windows). It only takes a few minutes and is fully functional in two-hour increments.
  2. Within Ignition, install the Cirrus Link MQTT Distributor module (Modules > Install or Upgrade a Module). You now have a scalable MQTT broker.
  3. Next, install the Cirrus Link MQTT Engine module. Non-MQTT applications can now access your MQTT data through Ignition's OPC UA Server.
  4. On your groov EPIC, enable Ignition Edge to access OPC drivers for Allen-Bradley, Siemens, and Modbus/TCP; or leverage integration kits for PAC Control to access a variety of serial protocols. You now have an MQTT gateway (EoN Node) for all your legacy devices.

Ready to go, and you haven’t spent a dime! Experiment as much as you want, and when you're ready for prime time, all you have to do is license the system.

With this setup, you can connect MQTT-enabled devices, legacy automation, traditional I/O, and all kinds of databases and applications to your MQTT network. For more control over how databases interact with your MQTT data, add the SQL Bridge module to your Ignition server as well. Or add the Perspective module to bring your MQTT data into a mobile HMI.

Scale up your network with additional groov hardware, or add another broker for high-availability. You also have the option of adding protocol modules to EPIC's CODESYS engine or running custom interfaces from the EPIC command line. It just keeps getting better, and you have complete control over how your network grows.

Are there other ways to build an MQTT network? Definitely, yes. But for many serious industrial users, this approach will get you the most bang for your buck, including easy administration, technical support, and all the options needed for a resilient system.

What’s so great about MQTT again?

After all that, let’s step back and remember why it’s worth considering MQTT as a large-scale industrial data solution.

Where traditional automation protocols require a lot of back and forth traffic for interrogating field devices and sending (often redundant) updates, MQTT clients publish updates only as required, using a streamlined payload. Data delivery is managed by a common server, eliminating redundant update requests. This consumes 80-90% less bandwidth, according to Cirrus Link Solutions, making room for networks to grow.

Designed for TCP/IP networks, MQTT has also found broad adoption in consumer and enterprise communications platforms, replacing heavier IT protocols, like HTTP, and creating an efficient bridge between IT and OT.

The open-source Sparkplug B specification extends this efficiency into configuration and administration by guaranteeing interoperability between conforming clients using a shared topic namespace and payload format.

But scalability isn’t just about efficiency and interoperability. MQTT’s device-originating communication is inherently more secure as well. Since connections are always outbound, complex port forwarding rules and firewall configurations are a thing of the past. And because the broker alone manages user authentication, access rights, and message delivery, each client can remain anonymous to other network members.

Together, MQTT/Sparkplug B and edge-oriented automation address many of the obstacles to digital transformation, breaking down data silos and closing the gap between IT and OT systems.

All posts in this series

Part 1 - MQTT: Basic publishing with groov EPIC
Part 2 - MQTT: Faster, better with Sparkplug B
Part 3 - MQTT: Mission-critical fault tolerance
Part 4 - MQTT: Bringing it all together

Thank you for following along on this EPIC MQTT journey. I hope you learned a few things along the way. And now that this series is wrapped, drop a comment below for a technical topic you'd like to see me cover next!

Until next time, -Josh

Topics: MQTT, groov EPIC, Sparkplug, Ignition, MQTT implementation, groov RIO

Written by Josh Eastburn

After 12 years as an automation engineer working in the semiconductor, petrochemical, food and beverage, and life sciences industries, Josh Eastburn works with the engineers at Opto 22 to understand the needs of tomorrow's customers.
Find me on:

Subscribe to Email Updates

Recent Posts

Posts by Topic

see all