APIssystem.cirruslink.transmission.publish(mqttServerName, topic, payload, qos, retained) → void
ParametersString mqttServerNameThe name of the server connection to use in the MQTT Transmission Server configuration. This must match an existing server name in the configuration.String topicThe MQTT topic to publish on. This must be a valid MQTT topicbyte[] payloadAn array of bytes representing the MQTT payloadint qosThe MQTT 'Quality of Service' to use. This must be either 0, 1, or 2boolean retainedWhether or not to publish this message with the retained flag setReturn ValueNonesystem.cirruslink.transmission.createConfig(type, props) → voidParametersString typeThe type of configuration to create with valid options:
History StoresCert FilesServersSetsTransmittersRecordsFilesMap propsDictionary of properties making up the configuration with the following keys and datatypes:History StoresId (long)
Name (str)
Enabled (bool)
TransmissionHistoryStoreType (str) "In-Memory" or "Disk-Backed"
EdgeNodeTagCapacity (int)
DeviceTagCapacity (int)
FlushQuantity (int)
FlushPeriod (long)
Cert FilesId (long)
Name (str)
FileContents (str)
Description (str)
ServersId (long)
Name (str)
Url (str)
ServerSetId (str)
Username (str)
Password (str)
CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
ClientKeyPassword (str)
HostnameVerification (bool)
ClientId (str)
KeepAlive (int)
RandomStartupDelay (str)
ReconnectDelay (long)
AutoReconnectRpcClient (bool)
DataFormatTypeWrapper (str) "Sparkplug_B_v1_0_Protobuf" or "Sparkplug_B_v1_0_JSON"
SetsId (long)
Name (str)
Description (str)
PrimaryHostId (str)
TransmittersId (long)
Name (str)
Enabled (bool)
TagProvider (str)
TagPath (str)
TagPacingPeriod (long)
ServerSetId (long)
DiscoveryDelay (long)
AliasedTags (bool)
CompressionTypeWrapper (long) "NONE" "DEFLATE" or "GZIP"
BlockCommands (bool)
ConvertUdts (bool)
PublishUdtDefinitions (bool)
OptimizeUdts (bool)
CacheBirthsEnabled (bool)
HistoryStoreId (long)
EnableStoreForwardByDefault (bool)
InOrderHistory (bool)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
FilteredProperties (str)
RebirthDebounceDelay (long)
RecordsId (long)
TagProvider (str)
TagFolderPath (str)
RecordType (long)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
OverridePublishTag (bool)
PublishTagPath (str)
FilesId (long)
TagProvider (str)
TagFolderPath (str)
EnableAutoPublishing (bool)
FileScanRate (int)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
MessageSize (int)
MessagePacingPeriod (int)
MessageAckTimeout (int)
Return ValueNonesystem.cirruslink.transmission.readConfig(type) → List ParametersString typeThe type of configuration to read with valid options:
History StoresGeneralCert FilesServersSetsTransmittersRecordsFilesReturn ValueA List of Dictionaries of properties making up the configurations with the following keys and datatypes:History StoresId (long)
Name (str)
Enabled (bool)
TransmissionHistoryStoreType (str) "In-Memory" or "Disk-Backed"
EdgeNodeTagCapacity (int)
DeviceTagCapacity (int)
FlushQuantity (int)
FlushPeriod (long)
GeneralId (long)
Enabled (bool)
Cert FilesId (long)
Name (str)
FileContents (str)
Description (str)
ServersId (long)
Name (str)
Url (str)
ServerSetId (str)
Username (str)
Password (str)
CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
ClientKeyPassword (str)
HostnameVerification (bool)
ClientId (str)
KeepAlive (int)
RandomStartupDelay (str)
ReconnectDelay (long)
AutoReconnectRpcClient (bool)
DataFormatTypeWrapper (str) "Sparkplug_B_v1_0_Protobuf" or "Sparkplug_B_v1_0_JSON"
SetsId (long)
Name (str)
Description (str)
PrimaryHostId (str)
TransmittersId (long)
Name (str)
Enabled (bool)
TagProvider (str)
TagPath (str)
TagPacingPeriod (long)
ServerSetId (long)
DiscoveryDelay (long)
AliasedTags (bool)
CompressionTypeWrapper (long) "NONE" "DEFLATE" or "GZIP"
BlockCommands (bool)
ConvertUdts (bool)
PublishUdtDefinitions (bool)
OptimizeUdts (bool)
CacheBirthsEnabled (bool)
HistoryStoreId (long)
EnableStoreForwardByDefault (bool)
InOrderHistory (bool)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
FilteredProperties (str)
RebirthDebounceDelay (long)
RecordsId (long)
TagProvider (str)
TagFolderPath (str)
RecordType (long)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
OverridePublishTag (bool)
PublishTagPath (str)
FilesId (long)
TagProvider (str)
TagFolderPath (str)
EnableAutoPublishing (bool)
FileScanRate (int)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
MessageSize (int)
MessagePacingPeriod (int)
MessageAckTimeout (int)
system.cirruslink.transmission.updateConfig(type, id, collisionPolicy, props) → voidParametersString typeThe type of configuration to update with valid options:
History StoresGeneralCert FilesServersSetsTransmittersRecordsFilesLong idThe ID of the record to updateString collisionPolicyEither "MergeOverwrite" or "Overwrite"Map propsDictionary of properties making up the configuration with the following keys and datatypes:History StoresId (long)
Name (str)
Enabled (bool)
TransmissionHistoryStoreType (str) "In-Memory" or "Disk-Backed"
EdgeNodeTagCapacity (int)
DeviceTagCapacity (int)
FlushQuantity (int)
FlushPeriod (long)
GeneralId (long)
Enabled (bool)
Cert FilesId (long)
Name (str)
FileContents (str)
Description (str)
ServersId (long)
Name (str)
Url (str)
ServerSetId (str)
Username (str)
Password (str)
CaCertFileId (long)
ClientCertFileId (long)
ClientPrivateKeyFileId (long)
ClientKeyPassword (str)
HostnameVerification (bool)
ClientId (str)
KeepAlive (int)
RandomStartupDelay (str)
ReconnectDelay (long)
AutoReconnectRpcClient (bool)
DataFormatTypeWrapper (str) "Sparkplug_B_v1_0_Protobuf" or "Sparkplug_B_v1_0_JSON"
SetsId (long)
Name (str)
Description (str)
PrimaryHostId (str)
TransmittersId (long)
Name (str)
Enabled (bool)
TagProvider (str)
TagPath (str)
TagPacingPeriod (long)
ServerSetId (long)
DiscoveryDelay (long)
AliasedTags (bool)
CompressionTypeWrapper (long) "NONE" "DEFLATE" or "GZIP"
BlockCommands (bool)
ConvertUdts (bool)
PublishUdtDefinitions (bool)
OptimizeUdts (bool)
CacheBirthsEnabled (bool)
HistoryStoreId (long)
EnableStoreForwardByDefault (bool)
InOrderHistory (bool)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
FilteredProperties (str)
RebirthDebounceDelay (long)
RecordsId (long)
TagProvider (str)
TagFolderPath (str)
RecordType (long)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
OverridePublishTag (bool)
PublishTagPath (str)
FilesId (long)
TagProvider (str)
TagFolderPath (str)
EnableAutoPublishing (bool)
FileScanRate (int)
GroupId (str)
EdgeNodeId (str)
DeviceId (str)
MessageSize (int)
MessagePacingPeriod (int)
MessageAckTimeout (int)
Return ValueNonesystem.cirruslink.transmission.deleteConfig(type, id) → voidParametersString typeThe type of configuration to delete with valid options:
History StoresGeneralCert FilesServersSetsTransmittersRecordsFilesLong idThe ID of the record to deleteReturn ValueNone# MQTT Transmission Create Transmitter
logger = system.util.logger("com.cirruslink.examples.transmitter.customtransmitters")
# Get the Default Set ID
sets = system.cirruslink.transmission.readConfig("Sets")
for config in sets:
if config["Name"] == "Default":
setId = config["Id"]
logger.debug("New Set ID: " + str(setId))
# Create Transmitter One
#transmitterProps = {}
#transmitterProps["Name"] = "Custom One"
#transmitterProps["Enabled"] = True
#transmitterProps["TagProvider"] = "default"
#transmitterProps["TagPath"] = ""
#transmitterProps["TagPacingPeriod"] = 1000
#transmitterProps["ServerSetId"] = setId
#transmitterProps["DiscoveryDelay"] = 0
#transmitterProps["AliasedTags"] = False
#transmitterProps["CompressionTypeWrapper"] = "NONE"
#transmitterProps["BlockCommands"] = False
#transmitterProps["ConvertUdts"] = True
#transmitterProps["PublishUdtDefinitions"] = True
#transmitterProps["OptimizeUdts"] = True
#transmitterProps["CacheBirthsEnabled"] = False
##transmitterProps["HistoryStore"] = None
#transmitterProps["EnableStoreForwardByDefault"] = True
#transmitterProps["InOrderHistory"] = False
#transmitterProps["GroupId"] = "Test1G"
#transmitterProps["EdgeNodeId"] = "Test1E"
#transmitterProps["DeviceId"] = None
#transmitterProps["FilteredProperties"] = "accessRights;clampMode;deadband;deadbandMode;formatString;historicalDeadband;historicalDeadbandMode;historicalDeadbandStyle;historyEnabled;historyMaxAge;historyMaxAgeUnits;historyProvider;historySampleRate;historySampleRateUnits;historyTagGroup;historyTimeDeadband;historyTimeDeadbandUnits;opcItemPath;opcServer;permissionModel;rawHigh;rawLow;sampleMode;scaleFactor;scaleMode;scaledHigh;scaledLow;tagGroup;valueSource;expression;expressionType;ConfiguredTagPath;eventScripts;readPermissions;writePermissions;eventScripts"
#transmitterProps["RebirthDebounceDelay"] = 5000
#system.cirruslink.transmission.createConfig("Transmitters", transmitterProps)
# Read Config
savedTransmitters = system.cirruslink.transmission.readConfig("Transmitters")
for config in savedTransmitters:
if config["Name"] == "Custom One":
logger.info("Transmitter Config: " + str(config))
customOneId = config["Id"]
# Delete Config
#system.cirruslink.transmission.deleteConfig("Transmitters", customOneId) |