EXAMPLE 1

Send an SMS message when the main power supply fails and at the same time activate a buzzer connected to output 4 to which we assign a name.

O41=horn

OUTPUT 4 NAME = horn


I7 MAIN POWER SUPPLY 

$I72=0 MAIN POWER SUPPLY STATUS = 0 





AT+SMS=+391234,"Blackout"

horn=on,10




trigger event is the change of state of the main power supply.

The first condition to check is that the main power supply is not present, it means logical state 0.

The first action contains the command that sends an SMS message to the number +391234 with the text "Blackout".

The second action contains the command that activates for 10 seconds the output 4 to which the name assigned is horn, equivalent to out4=1,10.
As you can see, an output can be recalled both with its standard identification and with the name assigned to it using either 0/1 or on/off.


EXAMPLE 2

Make a phone call when the main power supply fails.


I7 MAIN POWER SUPPLY 

$I72=0 MAIN POWER SUPPLY STATUS = 0 





AT+CALL=+391234





trigger event is the change of state of the main power supply.

The first condition to check is that the main power supply is not present, it means logical state 0.

The first action contains the command to make a call to +391234.

Play an audio message when the recipient answers.


CAO ANSWER TO ORIGINATED CALL 

$I72=0 MAIN POWER SUPPLY STATUS = 0 





AT+QWTTS=1,1,2,"$D01 Power supply failure"

AT#LOG="$N26 answered"




trigger event is the answer to originated call.

The first condition to confirm that the main power supply is not present.

The first action contains the command to convert the text to an audio message and play it in the active call.

The second action appends a customized line in the log file reporting the phone number called call (N26).