# 26 SMS Receiver
# 26.1 Introduction
SMS receiver is a service responsible for command execution that were received via text message. The service is available on WCC Lite with modem. To use this service a working SIM card is also required. This chapter will describe command types, configuration for WCC Lite as well as an example of said configuration.
# 26.2 SMS Receiver
There are two types of command signals used in SMS Receiver:
1. System:
- reboot wcc/reboot modem – when sending a message with text *reboot,* device starts rebooting and after successful reload sends back a message to sender with text REBOOT OK.
- switch sim – after sending a message with text *switch-sim,* device should switch sim and send a SMS from the new sim card with interface name and IP address.
- show ip – sender can request IP address of the receiving device.
2. Signal:
- publish – executes *publish* to a certain tag after sending a text message, which will be indicated in configuration field tag\_job\_todo. For example if tag\_job\_todo is led=%f, after sending a text message *led=1*, a publish will happen to a tag that's linked with this signal.
##### Configuration
Devices sheet:
**Parameter**
| **Type**
| **Description**
| **Required**
| **Default Value**
(when not specified)
| **Range**
|
Min | Max |
name | string | User-friendly name for a device | Yes |
|
|
|
description | sting | Description of a device | No |
|
|
|
device\_alias | string | Alphanumeric string to identify a device | Yes |
|
|
|
enable | boolean | Enabling/disabling of a device | No | 1 | 0 | 1 |
protocol | string | Protocol to be used
| Yes |
| sms receiver |
host | string | Telephone number from which to receive SMS
| Yes |
| \[all, +37061111111\] (case-sensitive, separated by command or space) |
When host is set to all, only job\_todo=signal type is allowed.
Signals sheet:
**Parameter**
| **Type**
| **Description**
| **Required**
| **Default Value**
(when not specified)
| **Range**
|
Min | Max |
signal\_name | string | User-friendly signal name | Yes |
|
|
|
device\_alias | string | Alphanumeric string to identify a device | Yes |
|
|
|
signal\_alias | string | Unique alphanumeric name of the signal to be Yes used | Yes |
|
|
|
enable | boolean | Enabling/disabling of an individual signal | No | 1 | 0 | 1 |
job\_todo | string
| Choose command type | Yes |
| \[SIGNAL, SYSTEM\]
(case-insensitive)
|
tag\_job\_todo | string | which command to execute
(if signal, then configure the SMS)
|
|
| \[REBOOT WCC, REBOOT MODEM, SWITCH SIM, SHOW IP, <CUSTOM>%F\] (case-insensitive) |
When configuring publish signal, the command which will be received needs to be specified. Instead of %f a number will be sent to the receiver as a text message. For example if configuration specifies that tag\_job\_todo is led=%f, then after sending a message to a device led=50, signal will publish a number 50 to an indicated tag.
##### Configuration example
The following example will show how to create a configuration for WCC Lite which would allow to reboot a device or modem, change active SIM card, show IP address and turn on red status led, using SMS receiver and internal data. For this 2 working SIM cards and WCC Lite with modem will be needed.
Devices sheet should look like this:
[](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686311153046.png)
For device *SMS receiver admin* host should be changed to a phone number from which commands will be received, because for this device signals will be system type. For device SMS receiver host can be either all or the same phone number.
Signals sheet:
[](https://wiki.elseta.com/uploads/images/gallery/2023-06/image-1686050114765.png)
Signal LED red fault is linked with signal sms-led as a source. This means that after sending a SMS message to a device with text led=1, red status led will turn on. The rest of the signals are system type so after sending an SMS message a certain event will happen. For example after sending message with text reboot-wcc, device should start rebooting and after the process is done it will send back a message "REBOOT WCCLITE OK". Same thing would happen after rebooting modem. With system signals it is also possible to switch between SIM cards or request IP address via text message.
Configuration --> [Download](https://wiki.elseta.com/attachments/106)