Prerequisites:
Overview:
Transmission is an MQTT module for Ignition that can publish files using MQTT Sparkplug to be processed by MQTT engine.
Files are transferred using Sparkplug over MQTT and which files get transferred and when they get transferred can be configured in a number of different ways. The file transfer configuration also defines how quickly a file transfer occurs and how long before a timeout will occur on failure to receive host side acknowledgements which can be adjusted as required based on the size of files you are sending and any bandwidth constraints that you may have.
This tutorial shows how to configure the MQTT modules to publish files using both the manual and auto publish methods.
Install the MQTT modules
Install the three MQTT modules listed in the pre-requisites onto your Ignition system following the Cirrus Link Module Installation guide.
By default, both MQTT Engine and MQTT Transmission are configured to connect to MQTT Distributor on tcp://localhost:1883 and will show as Connected under their respective Servers configuration setting in the Ignition UI. MQTT Transmission will also have an Example Transmitter configured pointing to a set of tags that are configured in the Ignition "default" tag provider.
This allows the three modules to automatically connect and provide a starting base for the tutorial.
Navigate to the MQTT Engine > Settings in the left side of the Ignition Gateway UI and select the General tab.
Set Primary Host Enabled and add a Primary Host ID as shown below:

Navigate to the MQTT Transmission > Settings in the side of the Ignition Gateway UI and select the Sets tab.
Edit the Default Set and add a Primary Host ID as shown below:

Config MQTT Engine File Handling
Now we can configure the MQTT Engine module to process the published files.
Navigate to the MQTT Engine > Settings in the left side of the Ignition Gateway UI and select the Namespaces tab. From the Default tab, edit the Sparkplug B namespace shown below:

Now select the 'Files' tab and set the following
- Ignore Files
- Set this property to unchecked so that publish files will not be ignored
- File Host Type:
- ACTIVE to specify that a message ACK is sent back to MQTT Transmission
- Base File Directory
- Set to some directory file path (i.e. 'C:\My Files' or something similar) where the files will be stored
- Add Topic Tokens
- Leave this property as checked to add the Group ID, Edge Node ID and Device ID to the base file directory path
- File Storing Policy
- Set this policy to REPLACE_EXISTING_FILE
- File Attributes Policy
- Leave this property at the default value of IGNORE
When complete, it should look similar to the following. Save the changes after confirming.

Now we can configure the MQTT Transmission module to publish files using a configured Transmitter. Navigate to the MQTT Transmission > Settings in the left side bar of the Ignition Gateway UI and select the Transmitters tab.
Make note of the Sparkplug IDs configured for your transmitter. For our example we have the Group ID as My MQTT Group and the Edge Node ID as Edge Node faec7e

Now on the 'Files' tab, select the Create new Files... link and configure the following fields
- Name
- By default a unique name will be set for this File Record. You can edit this if you choose but it must be unique.
- Tag Provider
- This is the tag provider where the publish control and information tags will be created. In our example, set to 'default'.
- Tag Folder Path
- This is the tag folder in the specified tag provider where the publish control and information tags will be created.
- In our examples, set to 'files_manual' if configuring for manual publish or 'files_auto' if configuring for auto publish
- Enable Auto-Publish
- This will enable auto_publish.
- In our examples, leave unchecked if configuring for manual publish and check if configuring for auto publish.
- Group ID
- Use the Group ID from your Transmitters Sparkplug ID. For this example, My MQTT Group
- Edge Node ID:
- Use the Edge Node ID from your Transmitters Sparkplug ID. For this example, Edge Node faec7e
When complete, it should look similar to the following. Save the changes after confirming.

After the configuration is saved, it should look similar to below:

Manual Publish of Files
With a File record created following the steps in Configure MQTT Transmission to publish files with the 'Enable Auto-Publish' unchecked and the Tag Folder Path set to "files_manual", everything should be configured to send files from MQTT Transmission to MQTT Engine.
Open Ignition Designer on the system running MQTT Transmission. You should see the control and information tags created in the specified tag provider and folder as shown below:

The control and information tags created in the folder are:
Name | Type | Description |
---|
Last Published File | String | Name of last published file |
Last Published Sequence Number | Integer | Sequence number of last published file since last reset of metrics |
Percent Completed | Byte | Publish completion percent for file being published |
Publish File | Boolean | Manual trigger to publish file |
Publish File Count | Long | Number of files published since last reset of metrics |
Publish File in Transit | String | Name of current file being published |
Publish Files Path | String | Full path to the target file to publish over MQTT |
Publish Operation Status | String | Status description of current publish operation |
Publish Operation Status Code | Integer | Status code for current publish operation |
Reset | Boolean | Trigger to reset publish metrics |
At this point, we just need to tell MQTT Transmission which file to send. Download and unzip this sample file to some location and note that location.
This sample_file.zip contains two text files which are:
sample_file.txt
- This is a text file with an arbitrary string. But, it could be a file of any type. This is purely for demonstration purposes.
sample_file.txt.md5
- This is a text file that contains only the md5 sum of the sample_file.txt
With the file to be transferred in place, we can now set the 'Publish File Path' tag.
This path must be the full path to the target file to publish over MQTT. In this example, we're using the path of '/tmp/transmission/sample_file.txt'. However, on a Windows system that would look something like 'C:\full\path\to\my\sample_file.txt'. When this is set, you should see something like this

Finally, click the 'Publish File' boolean tag. This will begin the file publish process which will cause the file to be published. After doing so, you should see something similar to what is shown below.

You should also now see the file to the location you set as the 'Base File Directory' in your MQTT Engine namespace configuration for Sparkplug B.
Auto Publish of Files
With a File record created following the steps in Configure MQTT Transmission to publish files with 'Enable Auto-Publish' checked and the Tag Folder Path set to "files_auto", everything should be configured to send files from MQTT Transmission to MQTT Engine.
Open Ignition Designer on the system running MQTT Transmission. You should see the control and information tags created in the specified tag provider and folder as shown below:

The control and information tags created in the folder are:
Name | Type | Description |
---|
Last Published File | String | Name of last published file |
Last Published Sequence Number | Integer | Sequence number of last published file since last reset of metrics |
Percent Completed | Byte | Publish completion percent for file being published |
Publish File Count | Long | Number of files published since last reset of metrics |
Publish File in Transit | String | Name of current file being published |
Publish Files Folder | String | Full path to the target folder containing the files to publish over MQTT |
Publish Operation Status | String | Status description of current publish operation |
Publish Operation Status Code | Integer | Status code for current publish operation |
Reset | Boolean | Trigger to reset publish metrics |
At this point, we just need to tell MQTT Transmission which folder contains the file(s) to publish. Download and unzip this sample file to some location and note that location.
This sample_file.zip contains two text files which are:
sample_file.txt
- This is a text file with an arbitrary string. But, it could be a file of any type. This is purely for demonstration purposes.
sample_file.txt.md5
- This is a text file that contains only the md5 sum of the sample_file.txt
MQTT Transmission will scan the folder specified in the tag, with a frequency defined by the File Scan Rate, and publish all files that appear in this directory automatically.
Viewing the messages in the Ignition logs
The records published from MQTT Transmission can be be viewed in the Ignition Gateway logs by setting the com.cirruslink.mqtt.engine.gateway.sparkplug.SparkplugPayloadHandler logger to TRACE.

Extra Activities
At this point you have a fully functional system which can be expanded or modified as required. Below are some addition configuration options to try:
Adjust the file transfer configuration to define how quickly a file transfer occurs and how long before a timeout will occur on failure to receive host side acknowledgements based on the size of files you are sending and any bandwidth constraints that you may have.

Setup two Ignition systems - a host system installed with MQTT Engine and MQTT Distributor and and edge system installed with MQTT Transmission
By default, MQTT Transmission is configured to connect to MQTT Distributor on tcp://localhost:1883. As the MQTT Distributor is installed on a different server, we will need to edit the configuration to allow MQTT Transmission to connect to the host server.
Navigate to the MQTT Transmission > Settings in the left side bar of the Ignition Gateway UI and select the Servers tab.
Change the server URL to point to the server IP address or domain name of the Ignition system running MQTT Distributor and save the configuration.
Additional Resources
- Inductive Automation's Ignition download with free trial
- Cirrus Link Solutions Modules for Ignition
- Support questions
- Sales questions
- About Cirrus Link