This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
sdk:scripts:sms-control [2015/03/03 15:07] – [Application] fachet | sdk:scripts:sms-control [2022/08/26 10:51] – dodenhoeft | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== SDK Script sms-control.are ====== | ====== SDK Script sms-control.are ====== | ||
- | You will also find this sample | + | |
+ | ===== Configuration ===== | ||
+ | - Enable the SDK: Services =>SDK => | ||
+ | - Services => SDK =>Job Management => | ||
+ | * Name: e.g. smscontrol | ||
+ | * Descr. e.g. smscontrol | ||
+ | * Arguments: " | ||
+ | * choose the sms-control.are from the Example Skript in the select area | ||
+ | - Services =>SDK => Job Management => Trigger => [+] Create a new Trigger | ||
+ | * Name e.g. sms-in | ||
+ | * Type: event-based | ||
+ | * Event: sms-received Put the trigger and the script into one job: | ||
+ | - Services =>SDK => Job Management => Jobs => [+] Create a new Job | ||
+ | * Name: smsServer | ||
+ | * Script: smscontrol | ||
+ | * Trigger: sms-in | ||
+ | |||
+ | ===== Usage ===== | ||
+ | Sending an SMS to the SIM card number: \\ | ||
+ | First line: <admin password> | ||
+ | Second line: <command argument1 argument2> | ||
+ | |||
+ | ==== Example ==== | ||
+ | <code - SMS.txt> | ||
+ | admin01 | ||
+ | status | ||
+ | output 1 on | ||
+ | output 2 on | ||
+ | output 1 off | ||
+ | output 2 off | ||
+ | disconnect | ||
+ | connect | ||
+ | reboot | ||
+ | </ | ||
<code c sms-control.are> | <code c sms-control.are> | ||
/* DESC: This script will execute commands received by SMS. | /* DESC: This script will execute commands received by SMS. | ||
Line 152: | Line 186: | ||
rc = nb_dio_set(sprintf(" | rc = nb_dio_set(sprintf(" | ||
if (rc) { | if (rc) { | ||
- | nb_syslog(" | + | nb_syslog(" |
return -1; | return -1; | ||
} else { | } else { | ||
- | nb_syslog(" | + | nb_syslog(" |
return 0; | return 0; | ||
} | } | ||
Line 269: | Line 303: | ||
</ | </ | ||
- | ------------------------------------------------------------------------------------------------------------------ | ||
- | ====== Application ====== | ||
- | |||
- | Scrips -->edit, Arguments: leave the field empty (by default) or type " | ||
- | empty | ||
- | noauth | ||
- | |||
- | The SMS must be send to the SIM-card phone number. (e.g. +41791112233) | ||
- | |||
- | **SMS commands: | ||
- | status: Sends back the status.\\ | ||
- | connect: | ||
- | disconnect: | ||
- | reboot: | ||
- | output [1|2] [on|off]: | ||
- | |||
- | |||