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
...
Name | Data Type | Description |
---|---|---|
Connected Clients | Integer | The number of the MQTT Clients currently connected |
Keep Inactive Clients | Boolean | A writeable tag that controls whether to include inactive clients in Distributor Info tags (available 4.0.18 onward) |
MQTT Clients | Dataset String Array String Array String Array Boolean Array DateTime Array DateTime Array | A dataset containing information about each connected client (available 4.0.18 onward). The following Column Names are included the dataset: ClientId Username IP Address Connected Last Connect Time Last Disconnect Time |
Total Clients | Integer | The total number of clients that have connected since the last MQTT Distributor restart (available 4.0.18 onward) |
Executing the code below in the Ignition Script Console will print out the to pull out the values in the MQTT Clients dataset for review:
Code Block | ||
---|---|---|
| ||
clients = system.dataset.toPyDataSet(system.tag.readBlocking("[MQTT Distributor]Distributor Info/MQTT Clients")[0].value)
for row in clients:
clientId = row[0]
userName = row["Username"]
ipAddress = row["IP Address"]
connected = row["Connected"]
lastConnectTime = row["Last Connect Time"]
lastDisconnectTime = row["Last Disconnect Time"]
print clientId, userName, ipAddress, connected, lastConnectTime, lastDisconnectTime |
Example Result for two connected clients
Code Block | ||
---|---|---|
| ||
>>>
ME-d631ab45-4466-42f0 admin 127.0.0.1 True Fri Sep 22 09:45:03 CDT 2023 None
MT-1693f8e5-014a-4609 admin 127.0.0.1 True Fri Sep 22 10:04:20 CDT 2023 None
>>> |
MQTT Engine has two potential client connections.
...