Contents
Cirrus Link Resources
Cirrus Link Website
Contact Us (Sales/Support)
Forum
Cirrus Link Modules Docs for Ignition 7.9.x
Inductive Resources
Ignition User Manual
Knowledge Base Articles
Inductive University
Forum
Details about the MQTT Clients connected at Engine can be found in the Engine Info > MQTT Clients folder in the MQTT Engine tag provider where a tag path is created for each Server Setting configured
where:
Name | Data Type | Description |
---|---|---|
Connected Nodes | Integer | Number of currently connected Sparkplug Edge Nodes to this MQTT Client |
Enable Latency Check | Integer | Writable tag to enabled message latency checking for each MQTT Client |
Message Processing Latency (ms) | Integer | The amount of time to process the last Sparkplug message |
Messages Per Second | Integer | The number of MQTT messages received by Engine per second |
MQTT Client ID | String | The Client ID for the MQTT Client |
Offline DateTime | DateTime | The last time at which the MQTT Client successfully disconnected from the MQTT Server |
Online | Boolean | A read-only tag showing the connection status of the MQTT Client |
Online DateTime | DateTime | The last time at which the MQTT Client successfully connected to the MQTT Server |
Server Latency (ms) | Integer | The amount of time that it takes for a test MQTT message to be sent and received back by MQTT Engine |
Target Server URL | String | The URL of the target MQTT Server to connect to |
Executing the code below in the Ignition Script Console will print out the details for each MQTT Client for review:
clients = system.tag.browseTags(parentPath="[MQTT Engine]Engine Info/MQTT Clients", tagType="Folder", recursive=False) index = 0 print ("Number of MQTT Clients: " + str(len(clients))) while index < len(clients): data = [] tagPath = str(clients[index]).split("/") data.append(["Server Name", tagPath[len(tagPath)-1]]) data.append(["MQTT Client ID", system.tag.readBlocking(str(clients[index]) + "/MQTT Client ID")[0].value]) data.append(["Online", system.tag.readBlocking(str(clients[index]) + "/Online")[0].value]) data.append(["Online DateTime", system.tag.readBlocking(str(clients[index]) + "/Online DateTime")[0].value]) data.append(["Primary Host ID", system.tag.readBlocking(str(clients[index]) + "/Primary Host ID")[0].value]) data.append(["Target Server URL", system.tag.readBlocking(str(clients[index]) + "/Target Server URL")[0].value]) data.append(["Offline DateTime", system.tag.readBlocking(str(clients[index]) + "/Offline DateTime")[0].value]) print data index = index + 1
Example result from the Engine Info > MQTT Clients above
>>> Number of MQTT Clients: 2 [['Server Name', 'Chariot SCADA'], ['MQTT Client ID', u'ME-d631ab45-4466-42f0'], ['Online', True], ['Online DateTime', Fri Sep 22 14:01:14 CDT 2023], ['Primary Host ID', None], ['Target Server URL', u'tcp://localhost:1883'], ['Offline DateTime', None]] [['Server Name', 'Second MQTT Server'], ['MQTT Client ID', u'ME-9a13f3b9-b9e4-4c6f'], ['Online', False], ['Online DateTime', Fri Sep 22 14:20:06 CDT 2023], ['Primary Host ID', None], ['Target Server URL', u'tcp://192.72.123.45:1883'], ['Offline DateTime', None]] >>>