Raspberry Pi, Node.js and Twilio – Is It Raining Arvind? #IoT

Usually my mom dries the clothes on the terrace and whenever I am at home she keeps asking me to look outside and tell her if it raining or not. Literally every half an hour or every time she hears a swoosh or a woosh from outside.

I was fed up and wanted to eliminate the middle man (me). So I came up with an app. It is called “Is it raining Arvind?” (LOL I know) . All the app does is tell my mom if it is raining outside now. And when it starts raining, the app triggers a buzzer and sends an SMS to my mom. Smart right! And I was off the hook.

So, this is how the app works. It uses the conductive property of the water. There are 2 wires that are connected to the Pi between a GPIO pin and 5v. And when these 2 pins are connected, it triggers a High on GPIO pin. So, we place these 2 wires outside on the terrace inside a bowl. Once the bowl is filled with water because of the rain, the circuit is completed and a High is triggered on the GPIO.

We take advantage of the GPIO high and then trigger the buzzer and send an SMS using Twilio. Smart right!?

Below is a quick demo of the app

Sweet right!

You can find the completed code here.

So, let us get started.

Continue reading

Ionic, Twilio and Node Scheduler – A Reminder App – Part I [Server]

Ionic, Twilio and Node Scheduler – A Reminder App – Part I [Server]

In this post, we will take a look at building a Reminder app. With this mobile hybrid app, a user can register, login and then create a reminder. While creating the reminder, the user has an option to schedule a Call or a SMS to remind him/her of the task at the scheduled time. Sweet right?

Our client will be built using Ionic Framework and our server side will be built on top of Node.js with Express.js as the framework. We will be leveraging a node module named node-schedule to schedule tasks. And we will be using the powerful cloud based communication API exposed by Twilio to make a call or send an SMS.

Below is a video recording of the app. There is no audio, but you can find the recorded phone call after that

Note : There is ~25 seconds gap between scheduling the call and the call arriving. The call start @ 01.06 mins into the video.

Screenshot_2014-09-29-23-51-47 Screenshot_2014-09-29-23-53-15 Screenshot_2014-09-29-23-54-00

You can find the completed code here.

This post is going to be the first half of the tutorial, where we would be working on the server side to build the REST API with which our Ionic app would consume to register, authenticate users and manage reminders.

For the Ionic app take a look : Ionic, Twilio and Node Scheduler – A Reminder App – Part II [Client]

So, Let us get started.

Continue reading

Ionic, Twilio and Node Scheduler – A Reminder App – Part II [Client]

Ionic, Twilio and Node Scheduler – A Reminder App – Part II [Client]

This is the second part of the two part post on how to build a reminder app using Node scheduler, Twilio cloud API and Ionic Framework. If you did not already check out the first part, you can do so here : Ionic, Twilio and Node Scheduler – A Reminder App – Part I [Server].

To give a quick overview, we have gone through the required technologies, understood the architecture and how each component plugs into another. Then we have gone ahead and built the REST API using Node.js.

In this post, we will continue our journey toward the app. Quick reminder, this is where we are headed to!

Note : There is ~25 seconds gap between scheduling the call and the call arriving. The call start @ 01.06 mins into the video.

 

You can find the completed code here.

So, let us continue development.

Continue reading

Twilio, Ionic Framework and Node.js – A Message & Call App

Twilio, Ionic Framework and Node.js – A Message & Call App

Also checkout Ionic Restify MongoDB – An End to End Hybrid App, Ionic Framework, Angularjs & PhoneGap Build- The Awesome Threesome! and Architecting a Secure RESTful Node.js app

In this post, we will take a look at integrating Twilio, Ionic Framework and Node.js to build a Mobile Hybrid app named “The Twilio App“.  This app can send SMS or trigger calls using the Twilio cloud based API’s. We will be using Ionic Framework as our Mobile Hybrid app framework and Node.js/Express.js as our REST Server to customize the responses. We will also use DiskDB to keep a track of our API calls.

The final app would look like Screenshot_2014-09-14-18-34-16

Screenshot_2014-09-14-18-37-33Screenshot_2014-09-14-18-38-21 Screenshot_2014-09-14-18-39-03

And the call you get would sound like

 

You can find the complete code here.

So let us get started.

Continue reading