EXAMPLE 1 |
||
Upon receipt of a chat message from an active user containing the text S1, exactly and only S1 activate output 1 and send a confirmation message. |
||
|
|
CHE CHAT FROM USER |
|
$S16=S1 LAST CHAT MESSAGE = S1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
out1=1 |
|
|
AT#TGM=$S14,"Output 1 on" |
|
|
|
|
|
|
|
|
|
|
trigger event is the receipt of a chat message from an active user. The first condition to check is that the text of the message received is equal (exactly) to S1. The first action contains the command that activates output 1. The second action contains the command that sends the text "Output 1 on" to the sender of the last chat message (S14). |
EXAMPLE 2 |
||
Upon receipt of a chat message from an active user containing the text R1, turn off output 1 and send a confirmation chat message. |
||
|
|
CHE CHAT FROM USER |
|
$S16(R1 LAST CHAT MESSAGE ( R1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
out1=0 |
|
|
AT#TGM=$S14,"Output 1 off" |
|
|
|
|
|
|
|
|
|
|
trigger event is the receipt of a chat message from an active user. The first condition to check is that the chat message received contains (also) the text R1. The first action contains the command that turns output 1 off. The second action contains the command that sends the text "Output 1 off" to the sender of the last chat message (S14). |
EXAMPLE 3 |
||
Upon receipt of a chat message from an unknown user, append a line containing the date, time and number of the sender on a file in the LOGS folder of the SD card and inform that it is not authorized to control the device. |
||
|
|
CHU CHAT FROM UNKNOWN |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AT#AFILE=S:LOGS/log.txt,T,"$D14 $D15 : $S14" |
|
|
AT#TGM=$S14,"You are not an authorized user of $D01" |
|
|
|
|
|
|
|
|
|
|
trigger event is the receipt of a chat message from unknown. The first action contains the command that appends to the log.txt file in the LOGS folder of the S: unit (SD card) a new line: The second action contains the command that sends the text "You are not an authorized user" followed by the device name (D01) to the sender of the last chat message (S14). |