Versions Compared

Key

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

...

  • 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
      • general
      • server
      • server-set
      • cert-file
      • namespace-file
      • default-namespace
      • namespace-server-set
      • default-namespace-convert
      • custom-namespace
      • custom-namespace-convert
      • topic-token-filter
  • 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



Warning

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

For example, attempting to delete a Sets configuring that is being referenced by a Servers configuration will result in no action being performed.


Extended Operations

The following extended operations are available for the MQTT Engine Module and can be executed within any of the available Ignition scopes using the format system.cirruslink.engine.operation

...

Code Block
languagepy
# Cirrus Link provides these scripts as examples only, they are not supported or guaranteed to meet any particular functionality. Cirrus Link cannot provide any assistance to modify these scripts to meet a particular need.

# Create new server set
serverProps = {}
serverProps["name"] = "Server Set 1"
serverProps["description"] = ""
serverProps["primaryHostEnabled"] = True
serverProps["primaryHostId"] = "MyPrimaryHost"
system.cirruslink.engine.createConfig("Setsserver-set", serverProps)

# Delete server
system.cirruslink.engine.deleteConfig("Serversserver", name)

# Read alarms
system.cirruslink.engine.readAlarms()
# Example list returned for 4 alarms
[{59ff123d-62af-4272-83c8-cbc444891982={"id":"59ff123d-62af-4272-83c8-cbc444891982","name":"Alarm4","alarmSource":"prot:MQTT:/src:Ignition-pi5:/prov:edge:/tag:Edge Nodes/G1/E1/D1/tag1:/alm:Alarm4","priority":"Critical","activeTime":1731373561034,"groupId":"G1","edgeNodeId":"E1","deviceId":"D1","state":"ActiveUnacked","ackedBy":null}, fa076e0f-bc37-4ce0-a7a3-709d2e2389b2={"id":"fa076e0f-bc37-4ce0-a7a3-709d2e2389b2","name":"Alarm1","alarmSource":"prot:MQTT:/src:Ignition-pi5:/prov:edge:/tag:Edge Nodes/G1/E1/D1/tag1:/alm:Alarm1","priority":"Low","activeTime":1731373531034,"groupId":"G1","edgeNodeId":"E1","deviceId":"D1","state":"ActiveUnacked","ackedBy":null}, 2ac2c263-b552-49fc-a969-98313ca107b6={"id":"2ac2c263-b552-49fc-a969-98313ca107b6","name":"Alarm2","alarmSource":"prot:MQTT:/src:Ignition-pi5:/prov:edge:/tag:Edge Nodes/G1/E1/D1/tag1:/alm:Alarm2","priority":"Medium","activeTime":1731373541033,"groupId":"G1","edgeNodeId":"E1","deviceId":"D1","state":"ActiveUnacked","ackedBy":null}, 74a19264-8672-4e5b-ab9b-420c6aae7877={"id":"74a19264-8672-4e5b-ab9b-420c6aae7877","name":"Alarm3","alarmSource":"prot:MQTT:/src:Ignition-pi5:/prov:edge:/tag:Edge Nodes/G1/E1/D1/tag1:/alm:Alarm3","priority":"High","activeTime":1731373551034,"groupId":"G1","edgeNodeId":"E1","deviceId":"D1","state":"ActiveUnacked","ackedBy":null}}]

# Clear alarm
system.cirruslink.engine.clearAlarm("59ff123d-62af-4272-83c8-cbc444891982")

...