Arduino is one of the most accessible platforms for creating home automation applications such as switching circuits, measurement, and collection of data, drive control, etc. However, the question arises as to how to control this type of system remotely, preferably using a mobile phone which we carry with us all the time nowadays. Of course, one of the solutions is to connect the Arduino system to the Internet to communicate through it. Another interesting solution is in the form of a LPWAN network and modules designed for it.
However, these solutions are a challenge for the less technically savvy user, as they would have to deal with problems such as getting the Internet up and running in a cottage, garden or barn, or dealing with a seemingly trivial task like pinging Arduino from the Internet. The challenge is also to program sophisticated responsive software.
You can overcome this barrier with the Adeon mobile application, which offers a ready-made solution for sending “automation” SMS messages. We send SMS to our loved ones daily, so why not send them to Arduino.
Adeon provides users with a clean and simple interface for sending commands to devices connected to the GSM network. The mobile network is also available in remote areas, making it the most accessible telecommunications tool for remote hardware control.
The basic idea of the application is simple - the user can define devices that he wants to control remotely. Creating a new device is very simple and intuitive. The user names the device, selects the location and enters the phone number associated with the hardware. For clarity, any image or icon from the built-in library can be added to the device profile. Of course, the commands that the user wants to send are important. Each device profile can contain any number of commands. Individual commands can be named and provided with appropriate text for clarity.
The application supports two command formats - textual and parametric. The text command is suitable for use with any (commercial) GSM device that may have nothing to do with automation or Arduino. The content of this command is a standard "plain" text (the same as in an SMS message) - so you can basically predefine the messages you use often. For example, if you buy public transport tickets via SMS or send a regular SMS to your significant other, you can create your own profiles in the mobile application.
For Arduino and other development kits, the parametric message format is intended. The command is defined by the parameter name and numeric value. This message format has several advantages:
- multiple commands can be sent in one SMS message
- the formatted message is easy for the programmer to read
- the message text has a hash to verify the validity of the message
The message that the mobile application generates and sends in a parametric format can be read and processed by the Adeon library for the Arduino platform. Based on the received parameters it is then possible to create the required automation task (e.g. to switch a relay or measure the temperature).
The app has also other useful features:
- making a call to a phone number stored in the device profile
- export and import of device profiles (transfer data between multiple phones)
- organizing the order of commands in the device profile
Imagine a model situation. You have an Arduino-controlled relay switching set to which the GSM module is connected. Writing a program for relay switching is a breeze. But how do we control the GSM module? How do we read incoming messages from the mobile app? How do we assign incoming parameters to functions that switch a relay on or off based on the parameter value? What if an unknown number controls our set?
The answer to these questions is the open-source Adeon library for the Arduino platform, which handles the most important operations such as managing authorized numbers and their rights, managing parameter lists and their values, checking message validity with a hash, or executing functions based on the value of an incoming parameter. An indisputable advantage of the library is the already implemented functions for controlling SIMCom GSM modules and automatic reading of incoming messages.
The library is compatible with basic Arduino models such as Arduino Uno, Nano, and Mega and does not depend on the type of GSM module used. The library also includes examples that demonstrate both basic and advanced functions. For more information and to download the library, visit the Adeon website.
What are we going to do in the next article?
In the next part of SMS automation, we will show you how to use the Adeon application in practice and describe the connection between the Arduino and GSM module. We will also program the Arduino to be able to turn on the relay and turn on the LED-based on the received message. Follow us. :-)