In this example, we can see how to configure MTX-Tunnel to control four relays via SMS messages. Relays that can be used include those to turn lights on or off, boilers, etc.
Details of the example scenario:
- Four relays need to be controlled by SMS to turn streetlights on or off in a remote location
- When sending an SMS with the text ONx or OFFx (where x is 1, 2, 3 or 4), the purpose is so that the relays of every streetlight are either enabled or disabled. In order to do this, it is necessary to create an ALIAS text string in the modem.
- Only the 100 phone numbers, starting with 6662746X,allowed by the company should be able to send an SMS.
- We want to access the relays and also activate the WEBSERVER on MTX-Tunnel via SMS (sending an SMS with an “on” string or using a missed call). WebServer is only activated for 10 minute sessions which are long enough to perform maintenance tasks such as accessing relays from a PC browser or changing any other MTX-Tunnel configuration settings.
Proposed solution using MTX-IND and MTX-Tunnel.
Configuration files for the MTX-65i and MTX-Tunnel for the proposed solution:
This configuration is what must be inputted in the configuration file of the modem to be able to carry out the implementation described in the scenario.
With this configuration, we set up an ALIAS. A full explanation can be found in the MTX-Tunnel manual, but in summary they basically serve to do the following: the MTX-Tunnel is capable of carrying out AT commands via SMS. To commute a relay, we can send an AT command, for example “AT^SSIO=0,0”, if we wish to change Relay1. Obviously, it is difficult to type (and remember) using a mobile phone, so MTX-Tunnel allows an ALIAS to be used. This means that we can define code so that when MTX-Tunnel receives a SMS with that code, the AT command associated with that code is executed. In the example shown, the ALIAS “ON1” will execute the AT command “AT^SSIO=0,0”, and therefore sending an SMS with the text “ON1” is sufficient to change the relay.