# 26 SMS Receiver # 26.1 Introduction SMS receiver is a service responsible for command execution that was received via text message. The service is available on WCC Lite with the modem. To use this service a working SIM card is also required. This chapter will describe command types and configuration for WCC Lite as well as an example of the said configuration. # 26.2 SMS Receiver There are two types of command signals used in SMS Receivers: 1. System: - reboot wcc/reboot modem – when sending a message with text *reboot, the* device starts rebooting and after successful reload sends back a message to the sender with text REBOOT OK. - switch sim – after sending a message with text *switch-sim, the* device should switch sim and send an SMS from the new sim card with the interface name and IP address. - Show IP – the sender can request the 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 the 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 the host is set to all, only the 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 the 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 the configuration specifies that tag\_job\_todo is led=%f, then after sending a message to a device led=50, the 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 rebooting a device or modem, changing the active SIM card, showing the IP address and turning on the red status LED, using SMS receiver and internal data. For this 2 working SIM cards and WCC Lite with modem will be needed. The 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 the 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 the 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 an 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 a message with the text reboot-wcc, the device should start rebooting and after the process is done it will send back a message "REBOOT WCCLITE OK". The same thing would happen after rebooting the 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)