You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Setup a custom namespace as shown below:

Publish MQTT message
system.cirruslink.transmission.publish("Chariot SCADA", "a/b", [30, 32, 32, 34, 41], 0, False)
Create a Value Changed script on the tag
def valueChanged(tag, tagPath, previousValue, currentValue, initialChange, missedEvents):
from org.slf4j import LoggerFactory
from ch.qos.logback.classic import Logger
from ch.qos.logback.classic import Level
from ch.qos.logback.classic import LoggerContext as LoggerContext
logger = system.util.logger("com.cirruslink.test.binarymessageconvert")
newByteArray = bytearray(str(currentValue.value), "ISO-8859-1");
for b in newByteArray:
logger.info("Byte: " + str(b))