There are a couple of features of the TTN broker that may have an impact on your connections:

(1) it doesn’t support subscriptions on STATE topic

(2) it has "@" characters in the topic namespace.

MQTT Sparkplug STATE topic

Within the Sparkplug Specification is the concept of the STATE topic. This allows the retained publish of the current state of a specific MQTT Client, known as the Primary Host, to all available MQTT Servers. This can then be used by other MQTT Clients in high availability or redundancy use cases to successfully manage their connectivity to each MQTT server. We have seen that if Primary Host subscriptions are enabled in MQTT Engine that this can cause ‘intermittent’ connected/disconnected states.

Verify the two MQTT Engine configuration options below are deselected to ensure that MQTT Engine is not subscribing on the STATE topic.

  • In the General tab Main section of the MQTT Engine Settings configuration

  • In the Server > Advanced > Legacy State section of MQTT Engine Settings configuration

As the TTN MQTT Server does not support STATE/# topics we would not recommend using it for Sparkplug applications.

The TTN topic namespace includes an "@" symbol

The TTN topic namespace is v3/{application id}@{tenant id}/.

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. 

MQTT Engine supports 'String Replacement' for both MQTT Topics and Payloads for character sequences that will become part of an Ignition tag path. Review the MQTT Engine String Replacement HowTo for details on how to accomplish this.

String Replacement requires MQTT Engine 4.0.10 or later installed. Updated modules can be downloaded from the Ignition Strategic Partner Modules download page.

Unable to Resolve?

If the troubleshooting tips did not help you resolve your issues, please open a ticket with Support making sure to include the MQTT Engine logs as appropriate.  

From the Ignition Logs view, select the Download icon to download a copy of the system-name.idb file to your local file system. You will need to compress (zip, 7z or rar) this file before sending to Support.

Additional Resources

  • No labels