Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Prerequisites

  • Have two machines available to run Ignition Gateway and Ignition Edge MQTT
    • Ignition Gateway can run on a laptop, in the cloud via an AWS EC2 instance or some other development computer
    • Ignition Edge MQTT can run on one of many supported embedded edge of network gateways, a laptop or development computer, or also in a cloud service

...

Go to the Inductive Automation download page and download the desired version of Ignition installer for Windows, Linux or MacOS;
https://
inductiveautomation.com/downloads/ignitionarchive.

Once the Ignition installer has been downloaded, follow the instructions provided by Inductive Automation to install and start Ignition.

Important Note: For this test infrastructure, MQTT Distributor will be installed as an Ignition module. Remember to either turn off firewalls or at a minimum allow inbound connections to TCP/IP port #1883 and port #8883, as remote MQTT Clients will need to be able to establish a TCP/IP socket connection to these ports.

...

Go to the Inductive Automation download page again and scroll down to the Third Party modules section. Find the Cirrus Link modules section and download the MQTT Distributor, MQTT Engine, MQTT Transmission modules.
https://
inductiveautomation.com/downloads/ignitionarchive.  The download links should look similar to what is shown below.

  • In Step 4 you will:
    • Install MQTT Distributor and MQTT Engine into the Central Ignition Gateway installed in step 1.
    • Install MQTT Transmission into Ignition Edge MQTT that was installed in step 2.

Step 4: Install the MQTT Modules

...

Now perform the following actions.

  • Under the 'Edge Node' folder, create a new folder called 'Group 1'
  • Under the 'Group 1' folder, create a new folder called 'Edge Node 1'
  • Under the 'Edge Node 1', create a new folder called 'Device 1'
  • Under the 'Device 1' folder, create a new Memory Tag as shown below.

Image Added

When done with the steps above, you should have a folder/tag structure as shown below.

Image Added

Note additional tags could be added to the 'Device 1' folder as well.  These could be OPC tags, UDTs, or other types of tags.  Also, additional folders could be added below this level as well.  The structure of the 'default transmitter' requires that the first three folder levels represent the Sparkplug Group ID, Edge Node ID, and Device ID respectively.

At this point, we can start the Transmitter by writing to the 'Transmission Control/Refresh' boolean tag.  Writing to this tag tells MQTT Transmission to rescan the entire tag tree, detect the folders and tags present, and then begin publishing Sparkplug messages to the MQTT Server.  The location of the tag to write to is shown below.

Image Added

Step 6: Verify MQTT Transmission is Connected

Open the Ignition Edge MQTT Web UI and browse to 'Configure → MQTT Transmission → Settings → Servers' and verify the connected status shows '1 of 1'.  If it does not, double check the firewall and antivirus settings on the Central Ignition Gateway and ensure port 1883 is open.

Image Added

Step 7: Verify Data Flowing into MQTT Engine

With MQTT Transmission now connected, open Ignition Designer on the Central Ignition Gateway.  Expand the Tag Browser and look expand the folder tree as shown below.  You should see the 'My Tag' tag published from the Ignition Edge MQTT Edge Node.

Image Added

Extra Activities

At this point you have a fully functional system that can be expanded or modified as required.  Below are some additional activities you may want to try on your own.

  • TLS enable the MQTT Distributor module and disable port 1883
    • Note production MQTT Infrastructures should never run on the open Internet without using TLS enabled MQTT connections!
  • Modify the MQTT Transmission default transmitter tag tree to add additional tags and get them to show up in the Central Ignition Gateway
  • Write to a tag in MQTT Engine to show it update in MQTT Transmission
  • Disable MQTT Transmission in Ignition Edge MQTT to see the tags go stale in MQTT Engine
  • Set up store and forward in MQTT Transmission to show data being saved in Ignition Edge MQTT when the connection goes down
  • Use a Custom Transmitter rather than the Default Transmitter to provide more flexibility on the MQTT Transmission side in terms of tag tree/arrangement
  • Add a second or more Ignition Edge MQTT instances pointed at the same MQTT Distirbutor instance that was set up in this tutorial