Basic Operations
The following basic operations are available for the MQTT Distributor Module and can be executed within any of the available Ignition scopes using the format system.cirruslink.distributor.operation
- createConfig(type, name, config, enabled, description)
- enabled (boolean) and description (string) are optional calls
- returns a dictionary that represents the config.json of the specified resource
- deleteConfig(type, name)
- getConfigNames(type, enabled)
- enabled is an optional call
- returns a list strings
- isConfigEnabled(type, name)
- readConfig(type, name)
- returns a dictionary that represents the config.json of the specified resource
- setConfigEnabled(type, name, enabled)
- updateConfig(type, name, collisionPolicy, config)
- returns a dictionary that represents the config.json of the specified resource
where:
- type
- string denoting the type of configuration to operate on
- name
- string denoting the unique name for the configuration resource to operate on
- config
- dictionary of properties making up the configuration resource to operate on
- enabled
- collisionPolicy
- string with options "MergeOverwrite" or "Overwrite"
- "MergeOverwrite" will replace the existing properties in the resource name with only those included in the call
- "Overwrite" will replace all properties in the resource name with those in the call
Distributor 'type' keys
Distributor 'general' keys
| enabled | boolean | Whether or not the configuration resource is enabled |
| name | string | The unique name for the configuration resource |
| enableDistributor | boolean | Whether to enable MQTT Distributor |
| enableTcp | boolean | Whether to enable plain TCP connections |
| port | integer | The standard (non-secure) MQTT port |
| enableWebsocket | boolean | Whether to enable Websocket connections |
| websocketPort | integer | The standard (non-secure) Websockets port |
| enableTls | boolean | Whether to enable TLS connections |
| securePort | integer | The secure MQTT port |
| allowAnonymousConnections | boolean | Whether or not to allow anonymous connections |
| customProperties | string | Custom/internal properties |
| enforceUniqueLwtTopic | boolean | Whether or not to enforce unique Will Message topics across MQTT clients |
| uniqueLwtTopicFilter | string | A comma separated list of topic filters to use to enforce unique Will Message topics |
Distributor 'user' keys
| enabled | boolean | Whether or not the configuration resource is enabled |
| name | string | The unique name for the configuration resource |
| password | string | The user password |
| ACLs | string | A comma separated list of ACL's |