Phone notifications are a good way to get alerted about any unusual activity. When we are developing an IoT solution it is always good to send SMS to the user’s phone for certain activity as the smartphones are always within reach. It is not always possible for a user to monitor the data with a Mobile app or a website. If they get a notification about a certain activity or a sudden variation in data they will come to know this by time and can immediately check it with the mobile app and can take the further steps.
Earlier sending SMS with a microcontroller was a little clumsy process, you have to create an account on an SMS service provider like Twilio and then you have to use some IoT channels like Thingspeak, Temboo, and IFTTT. Lots of work! But now as the IoT devices are getting powerful, there are some new revolutionary IoT Cloud services that are immerging. They are aimed to take your data to the cloud with ease. One of the IoT clouds recently I am using in my projects in Ubidots. The best thing about Ubidots is, it is user-friendly. It won’t take much time to take your IoT solution to the cloud. Ubidots visualize your data in a better way. You can even track the locations with its GPS widget, all you need is just to send the data with a simple API.
With Ubidots, we can easily configure under what conditions an alert should be triggered. We can set any type of thresholds through a simple "IF-THEN" statements. Once an event is triggered it will send an Email or SMS alerting someone about a specific event or you can perform any other task like trigger another action.
Let us create a simple project with a Burglar Alarm System with Intel Edison which will detect any intrusion and notify you with an SMS or an Email. I am using Ubidot’s Node.Js library and programming in Node.Js with Intel XDK IoT edition.
If you have an Intel Galileo board and programming using Arduino IDE or you want to know more about the PIR sensor and its working have a look at another article of mine “
Burglar Alarm with PIR motion sensor”.
Requirements
Now we have added an Email and an SMS trigger. Build, upload and run your code on Edison. You will notice data sending to Ubidots in the console. If any motion is detected by the PIR motion sensor it will blink the LED, play the buzzer and an SMS and an Email will be sent to your Phone.
Figure 13: Type text message
Figure 14: PIR Motion Sensor Detects a moving object