# 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**
MinMax
namestringUser-friendly name for a deviceYes
descriptionstingDescription of a deviceNo
device\_aliasstringAlphanumeric string to identify a deviceYes
enablebooleanEnabling/disabling of a deviceNo101
protocolstringProtocol to be used Yes sms receiver
hoststringTelephone 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**
MinMax
signal\_namestringUser-friendly signal nameYes
device\_aliasstring Alphanumeric string to identify a deviceYes
signal\_aliasstringUnique alphanumeric name of the signal to be Yes usedYes
enablebooleanEnabling/disabling of an individual signalNo101
job\_todostring Choose command typeYes \[SIGNAL, SYSTEM\] (case-insensitive)
tag\_job\_todostringwhich 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: [![image-1686311153046.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686311153046.png)](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: [![image-1686050114765.png](https://wiki.elseta.com/uploads/images/gallery/2023-06/scaled-1680-/image-1686050114765.png)](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)