EXAMPLE 1 |
||
When digital input 1 closes, publish a content in the specific MQTT topic. If the publication is successful, activate output 1 for 3 seconds. |
||
|
|
I1 DIGITAL INPUT 1 |
|
$I12=1 INPUT 1 STATUS = 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AT#MQTT=mytopic/box,"closed",1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
trigger event is the change of state of digital input 1. The first condition to check is that the digital input 1 is in the logical state 1, ie closed. The first action contains the command that publishes "closed" in the topic "mytopic/box" with quality of service 1 (at least once). |
|
|
MQT MQTT TOPIC PUBLICATION |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
out1=1,3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
trigger event is the successful publication of an MQTT topic. The first action contains the command that activates output 1 for 3". |