EXAMPLE 1

Upon receipt of an SMS message from an active user containing the text S1, exactly and only S1 we activate output 1 and send a confirmation SMS


SME SMS FROM USER 

$N24=S1 SMS LAST TEXT = S1 





out1=1

AT+SMS=$N23,"Output 1 on"




trigger event is the receipt of an SMS 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 number from which the last SMS message was sent (N23).

EXAMPLE 2

Upon receipt of an SMS message from an active user containing the text R1, we deactivate, activate output 1 and send a confirmation SMS.


SME SMS FROM USER 

$N24(R1 SMS LAST TEXT ( R1 





out1=0

AT+SMS=$N23,"Output 1 off"




trigger event is the receipt of an SMS message from an active user.

The first condition to check is that the SMS 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 number from which the last SMS message was sent (N23).

EXAMPLE 3

Upon receipt of an SMS message from an unknown user, we append a line containing the date, time and sender's phone number to a file stored in the LOGS folder of the SD card and inform him that he is not authorized to control the device.


SMU SMS FROM UNKNOWN 

 





AT#AFILE=S:LOGS/log.txt,T,"$D14 $D15 : $N23"

AT+SMS=$N23,"You are not an authorized user of $D01"




trigger event is the receipt of an SMS message from an unknown.

The first action contains the command that appends to the log.txt file in the LOGS folder of the unit S:t (SD card) a line containing:
TAG $D14 which is the current day
TAG $D15 which is the current time
TAG $N23 or phone number of the last SMS sender
The contents of the file will be something like this:
210308 121014 : +391234565
210328 162044 : +441234567

The second action contains the command that sends the text "You are not an authorized user of" followed by the device name (D01) to the number from which the last SMS message was sent (N23).