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)
    • returns a boolean
  • getConfigNames(type, enabled)
    • enabled is an optional call
    • returns a list strings
  • isConfigEnabled(type, name)
    • returns a boolean
  • readConfig(type, name)
    • returns a dictionary that represents the config.json of the specified resource
  • setConfigEnabled(type, name, enabled)
    • returns a boolean 
  • 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
    • boolean
  • 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



Configuration changes made through scripting do not have the same validation as when made through the UI. 

For example, deleting a Sets configuring that is being referenced by a Servers configuration will result in the UI showing an Internal Error


Distributor 'type' keys

Distributor 'general' keys

enabledboolean

Whether or not the configuration resource is enabled

namestring

The unique name for the configuration resource

enableDistributorboolean

Whether to enable MQTT Distributor

enableTcpbooleanWhether to enable plain TCP connections
portinteger

The standard (non-secure) MQTT port

enableWebsocketboolean

Whether to enable Websocket connections

websocketPortinteger

The standard (non-secure) Websockets port

enableTlsboolean

Whether to enable TLS connections

securePortinteger

The secure MQTT port

allowAnonymousConnectionsboolean

Whether or not to allow anonymous connections

customPropertiesstring

Custom/internal properties

enforceUniqueLwtTopicboolean

Whether or not to enforce unique Will Message topics across MQTT clients

uniqueLwtTopicFilterstring

A comma separated list of topic filters to use to enforce unique Will Message topics

Distributor 'user' keys

enabledboolean

Whether or not the configuration resource is enabled

namestringThe unique name for the configuration resource
passwordstringThe user password
ACLsstringA comma separated list of ACL's
  • No labels