The IBM Cloud Injector module provides the ability to push Tag data to an IBM's Watson IoT Platform. The settings configuration for this module are located under the Configure tab of the Ignition Gateway web UI. Once in the configuration section there are four tabs: General, IBM Cloud MQTT, Sets, and Tag Agents. Each of these tabs is described in detail in the following sections.
The first tab contains the general settings for the IBM Cloud Injector module.
The general configurations options available on this tab are listed below:
- Sets whether the module is enabled or disabled. If disabled, the Tag Agents will not run and now data will be pushed to any configured endpoints.
IBM Cloud MQTT
The next tab is the list of IBM Cloud endpoints that the module should connect to to push tag data.
One or more IBM Cloud MQTT endpoints can be configured on this tab. The configuration options for an IBM Cloud MQTT connection are listed below.
- Setting Name
- This is a friendly name of the IBM Cloud MQTT used to easily identify it. This must also be unique.
- Whether or not this setting is enabled/active or not.
- Organization ID
- This is the Organization ID associated with the IBM Cloud account to push data to.
- Device Type
- The device type associated with the device that has been provisioned in the IBM Cloud platform
- Device ID
- The Device ID that has been provisioned in the IBM Cloud platform
- The authentication token for the specified device ID that has been provisioned in the IBM Cloud platform
- The Set to associate this IBM Cloud MQTT connection with.
Store & Forward
- Store & Forward Enabled
- Whether to enable Store & Forward capabilities for this endpoint
- Store & Forward Type
- The type of the Store & Forward mechanism
- Message Capacity
- The Maximum number of messages to store before dropping the oldest historical messages
- Flush Period
- The period of time to wait (in milliseconds) between sending when flushing messages
- Keep Alive
- The MQTT Keep Alive timeout for the MQTT Connection
- Max Message Size
- The maximum message size allowed for an MQTT message before the message will be broken up into smaller messages
Clicking on the "Create new IBM Cloud MQTT Setting..." link will bring up the following form for adding a new IBM Cloud MQTT endpoint
The Sets tab contains a list of IBM Cloud Sets. Each set represents a grouping of IBM Cloud MQTT endpoints. When a set is referenced by a Tag Agent the Agent will push Tag data to all IBM Cloud MQTT endpoints contained within that Set. The Sets are disjoint, meaning that a single IBM Cloud MQTT endpoint cannot be in more than one set. Out of the box the IBM Cloud Injector module will have one "Default" set defined.
Additional Sets can be configured for situations where multiple Tag Agents will need to push to different IBM Cloud MQTT endpoints. The configuration options for Sets are listed below.
- This is the friendly name of the set used to easily identify it.
- This is a friendly description of the set.
- Push Policy
- This defines which endpoints to push to. If PUSH_TO_ALL is selected, every endpoint that is part of this set will receive all messages. If PUSH_TO_ANY is selected, only one of the endpoints that is part of this set will receive any given message. PUSH_TO_ANY is useful when adding endpoint configurations to increase the throughput of the Injector.
Clicking on the 'Create new IBM Cloud Set...' link will bring up the following form to add a new Set.
Tag Agents are the workers within IBM Cloud Injector that monitor tag events, convert them to a JSON representation, and push them to one or more IBM Cloud MQTT endpoints. Out of the box the IBM Cloud Injector module will have one "default" Tag Agent defined.
Tag Agents are configured to point to a single folder. All Tags within that folder will be monitored by the Tag Agent.
- Tag Provider Name
- The name of the Tag provider containing the tags.
- Tag Path
- An optional folder path under the Tag provider where the root folder of the Tags can be found.
- Tag Pacing Period
- The buffer period, in milliseconds, that Tag events will be aggregated into a single payload before pushing.
- Convert UDTs
- Whether to convert UDT members to normal Tags before publishing. If enabled the Tags representing the UDT member will retain their member path prefixed by the UDT Instance name.
- Publish UDT Definitions
- This can only be set if 'Convert UDTs' is false
- Whether or not to publish UDT definitions in the NBIRTH messages
- The Set of IBM Cloud MQTT endpoints that the Tag Agent will push to.
- Auto-discover Tags
- Whether newly added tags should be dynamically scanned and their values pushed. This field is disabled by default. It should remain disabled while manually editing tags and/or their configurations. It should only typically be enabled in systems where tags are created in real time.
- Group ID
- An ID representing a logical grouping of MQTT Edge Of Network (EoN) Nodes and Devices into the infrastructure.
- Edge Node ID
- An ID that uniquely identifies the MQTT Edge Of Network (EoN) Node within the infrastructure.
- Device ID
- An optional ID that uniquely identifies a Device within the infrastructure.
The Sparkplug settings are optional and allow for an additional customization of how the Tag Agent scans and discovers tag within the specified Tag Path. Here is a brief description of how the Agent scans/discovers folders based on the different combinations of potential Sparkplug Settings.
- If all three IDs are left blank the Agent will assume the following folder structures follow the Tag Path:
- If only the Group ID is specified the Agent will assume the following folder structure follows the Tag Path:
- If the Group ID and the Edge Node ID are specified the Agent will assume the following folder structure follows the Tag Path:
- If the Group ID, Edge Node ID, and the Device ID are specified the Agent will assume the following folder structure follows the Tag Path:
As you can see, the Sparkplug settings can be defined by setting these IDs in this configuration page, or leave them blank so that the Agent will scan and discover them based on the tag tree layout.
Clicking on the 'Create new Tag Agent Settings..' link will bring up the following form to add a new Tag Agent.