Versions Compared

Key

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

...

Step 4: Configure MQTT Transmission to publish files

Now we can configure the MQTT Transmission module to publish files using the existing MQTT client created by the Example 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 Image Modified

Now on the  'Files' tab, select the Create new Files... link and configure the following fields

...

Finally, click the 'Publish File' boolean tag. This will begin the file publish process which will cause the file to be published.  When the file is successfully transferred both files will be removed from the originating filesystem.After  After doing so, you should see something similar to what is shown below.

...

You should also now see the file on the Ignition system with MQTT Engine installed. The file will be saved to the location you set as the 'Base File Directory' in your MQTT Engine namespace configuration for Sparkplug B.

Note
With the File Auto_Publish disabled, the files will be left on the originating filesystem after a successful publish and will need to be removed manually



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:

  • Setup MQTT Transmission to automatically publish files. In the 'File' configuration of MQTT Transmission, check the 'Enable Auto-Publish'. When this is enabled, MQTT Transmission will create a tag called 'Publish Files Folder' instead of 'Publish File Path' as shown below.  MQTT Transmission will scan the folder specified in the tag and will publish all files that appear in this directory automatically. When the file is successfully transferred both files will be removed from the originating filesystem.

    Just as with the 'manual publish' option, an associated md5 sum file must be present and properly represent the md5 sum of the target file before it will be published.

...