Versions Compared

Key

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

...

MQTT Engine supports MQTT Engine String Replacement for both MQTT Topics and Payloads for character sequences that will become part of an Ignition tag path. 

Examples

Subscriptions

Subscriptions support both the multi-level (#) and single level (+) wild card characters.

  • (+) Is a a single level wildcard that matches any name for a specific topic level. We can use this wildcard instead of specifying a name for any topic level in the topic filter.

  • (#) Is a multi level wildcard that we can use only at the end of the topic filter, as the last level and matches any topic whose first levels are the same as the topic levels specified at the left-hand side of the # symbol.

Examples for wildcard usage are below:

  • subscribing on site/# covers
    • site/area1/pump
    • site/area1/flowmeter
    • site/area2/pump
    • site/area3
  • subscribing on site/+/pump covers
    • site/area1/pump
    • site/area2/pump
  • subscribing on site/+/+ covers
    • messages that are published with only two distinct topic levels below site such as site/area2/pump
    • messages that have less than, or more than, two levels will be filtered such as site/area3 or site/area2/pump/pressure

Note: Subscriptions such as site# or site+ are invalid as there is no topic level for the wildcard to denote. 


No Tag Value configured  

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".

...

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 two folders "test", "data" and "json" followed by a tag/folder structure representing the JSON value of the payload. 





Additional Resources