Versions Compared

Key

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

...

Now select the 'Script' tab near the top.  In it, type the following line

system.cirruslink.engine.publish("Chariot SCADA", "a/b/c", str("hello world").encode(), 0, 0)

Note, the form of the publish method is as follows.  You may need to change the method arguments based on your configuration:

system.cirruslink.engine.publish(String serverName, String mqttTopic, byte[] payload, int qos, boolean retain)

Where:

  • serverName: The server name as shown in the MQTT Engine Settings configuration shown below
  • mqttTopic: The MQTT Topic to publish on
  • payload: The MQTT payload
  • qos: The MQTT quality of service to publish on
  • retain: Whether or not to set the retain flag in the MQTT message

Image Added
When complete, the script should look something like this.  Now click OK.

Image Added

At this point every time this tags value, quality, or timestamp changes it will result in a MQTT message being published on topic 'a/b/c' with a payload of 'hello world'.