Contents
Cirrus Link Resources
Cirrus Link Website
Contact Us (Sales/Support)
Inductive Resources
Ignition User Manual
Knowledge Base Articles
Inductive University
Forum
...
The third tab is used for configuring namespaces. Each namespace configuration represents a family of devices and/or data that MQTT Engine will support. A namespace defines the topics that each MQTT Engine client will subscribe on as well as indicates how the payload will be handled. There are two types of namespaces: Default and Custom.
...
Custom namespaces are used to provide support for generic MQTT messages with string based payloads. If a custom namespace is configured MQTT Engine will convert all messages received to tags. The topic of each message will directly translate into the tag's path. The payload of the message will be that tag's value.
Each custom namespace has the following properties:
Note: if a Tag Name is not specified, care must be taken so that published messages do not end up overwriting previous tags.
Clicking on the 'Create new Custom Namespace...' link will bring up the following form to add a new Custom Namespace.
Custom Namespace Example
Let say we have a publish received on the topic "test/data/point" with value "12345". If no Tag Value is configured, and a message is received, MQTT Engine will create a two folders "test" and "data" and a tag "point" with the value of "12345".
Alternatively if a Tag Name is configured, lets call it "payload", then MQTT Engine will convert each token in the topic to a folder and create a tag called "payload" with the value "12345"
In most cases it is useful to specify a Tag Name in order to prevent cases when a publish on a topic can overwrite a previously created tag, changing it into a folder. Consider the case where you have the following two publishes:
...
When the 2nd publish is received it will overwrite the first tag because "two" is now a folder instead of a tag. This folder/tag name collision can be avoided by specifying the Tag Name to always use for tags.
Custom Namespace JSON Example
Let say we have a publish received on the topic "test/data/json" with value '{ "stringTag" : "12345", "folderTag" : { "intTag" : 1, "boolTag" : true }
}'. MQTT Engine will create a three folders "test", "data" and "point" followed by a tag/folder structure representing the JSON value of the payload.