You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Prerequisites

  • Knowledge of Ignition and Module installation process: Cirrus Link Module Installation
  • Have Ignition 8.0.16 or greater installed
  • Have MQTT Engine 4.0.10 or later installed

Abstract

MQTT Engine supports 'String Replacement' for both MQTT Topics and Payloads. In many cases with Custom Namespaces this can be required if one does not have full control of the topics and payloads that are sent. This can also be true even with certain Sparkplug based payloads. While MQTT and Sparkplug both support characters such as . & % =, Ignition does not support these as valid characters in a tag path or tag name. As a result, sometimes it may be necessary to tell MQTT Engine to replace certain characters or strings of characters with something else so the tag path and tag names can be properly created in Ignition.

String Replacement Usage

Consider the following Custom Namespace.

Now consider an incoming MQTT message with the characteristics:

  • Topic = a/b
  • Payload = { "tag 1": 123, "tag@2": "some.value" }

This will fail to be handled by the Custom Namespace and an error will be logged that looks like:

INFO   | jvm 1    | 2022/01/06 11:33:29 | E [c.c.m.e.g.j.JsonPayloadHandler] [19:33:29]: Failed to handle tagPath - not adding tag: a/b/tag@2 - Remove it from future payloads


Additional Resources

  • No labels