![]()
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![]()
...
| Note |
|---|
If your payload contains escape characters such as backslash you will need to use the 'r' modifier on your payload string to ensure these are included payload = r{"metadata" : {},"plan" : {"requiredState" : {"value_control" :"{\"pump_1\":{\"4\":\"off\",\"3\":\"off\",\"2\":\"off\",\"1\":\"off\"},},},}}"},"state" : {}},"version" : 12} |
When complete, the script should look something like this. Now click OK.
...
Finally, save and publish the project. 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'.
Additional JSON examples:
payload=str('{"name":"John", "age":30, "car":"BMW"}').encode()