SMS command

This example shows how to setup shortcut commands via SMS.

Configuration

To send and receive SMS, PLMN must be active and a valid SIM card inserted.

Users

Users stored in user list can send SMS to control (for example) outputs and get feedback of the action:

NAME:       Bach
TYPE:       TELEPHONE
IDENTIFIER: +4911223344
GROUP:
START:      01/01/2000 00:00
STOP:       31/12/2099 23:59
WEEKDAYS:   YYYYYYY
TICKETS:    UNLIMITED
NAME:       Mozart
TYPE:       TELEPHONE
IDENTIFIER: +43987654321
GROUP:
START:      01/01/2000 00:00
STOP:       31/12/2099 23:59
WEEKDAYS:   YYYYYYY
TICKETS:    UNLIMITED
NAME:       Verdi
TYPE:       TELEPHONE
IDENTIFIER: +395551234567
GROUP:
START:      01/01/2000 00:00
STOP:       31/12/2099 23:59
WEEKDAYS:   YYYYYYY
TICKETS:    UNLIMITED

Rules

Rule 001 is triggered at each incoming SMS from users.
Condition: text of received SMS is "S1" (exactly "S1").
Switch ON Output 1 and send back confirmation SMS to user (N23).

S1.sms
↯ SMS from user
✛ PLMN - Text of Last SMS Received = S1
✛
✛
✛
✛
> out1=ON
> AT+SMS=$N23,"You turned ON output1"
>
>
>

Rule 002 is triggered at each incoming SMS from users.
Condition: text of received SMS is "R1" (exactly "R1").
Switch OFF Output 1 and send back confirmation SMS to user (N23).

R1.sms
↯ SMS from user
✛ PLMN - Text of Last SMS Received = R1
✛
✛
✛
✛
> out1=OFF
> AT+SMS=$N23,"You turned OFF output1"
>
>
>

Rule 003 is triggered at each incoming SMS from users.
Condition: text of received SMS is "S2" (exactly "S2").
Switch ON Output 2 and send back confirmation SMS to user (N23).

S2.sms
↯ SMS from user
✛ PLMN - Text of Last SMS Received = S2
✛
✛
✛
✛
> out2=ON
> AT+SMS=$N23,"You turned ON output2"
>
>
>

Rule 004 is triggered at each incoming SMS from users.
Condition: text of received SMS is "R2" (exactly "R2").
Switch OFF Output 2 and send back confirmation SMS to user (N23).

R2.sms
↯ SMS from user
✛ PLMN - Text of Last SMS Received = R2
✛
✛
✛
✛
> out2=OFF
> AT+SMS=$N23,"You turned OFF output2"
>
>
>

Rule 006 is triggered at each incoming SMS from umknown.
No conditions are set.
A notification is replied to inform that command is not accepted.

Unknown.sms
↯ SMS from unknown
✛
✛
✛
✛
✛
> AT+SMS=$N23,"You're not allowed to send SMS to this number"
>
>
>
>