Kanpur - A city of many resources but politically neglected

Tuesday, February 28, 2017

Home Automation using Raspberrypi - One of the most interesting application of IOT.

Home Automation using IOT 

Hello friends. Starting a new technical blog series on home automation using IOT (Internet of Things). And this time not something like which i had done a long time back i.e. control a AC appliance(refrigerator) using a SIM900 GPRS module, Arduino UNO and text SMS and later tested the same with HC-05 bluetooth module and an android application. This story started a long time back (almost 3.5 years back), when i started working with Rajeev on a remote basis and we were developing "some" home automation device - something like Wemo Switch from Belkin.  And no wonder, we were able to control the device. I lost the video though or other wise i would have uploaded it here. 

Wemo switch from Belkin
Side View of proposed device

front view of proposed device
How it look in actual
At that point of time, building such thing was more of your passion rather than building a startup out of it. You do a lot of research for sales, hardware and even take stupid decisions (like buy a electric imp device and then loose it somewhere, Rajeev was so angry!!!!). 

But now when you had some hold-on on the hardware, you understand things a bit more, you understand what a product which can be used by general public and users is, you can clearly differentiate the DIY and a "product". So what i am trying to write about here is a DIY project which probably only i will use but yes, i can feel that this will be useful for me. Now question is why am writing a blog on home-automation and why even i am doing this when a lot of people have done this earlier and my answer is "out of curiosity and to apply IOT in day-to-day life and make things easy " I am designing it for myself as i am planning to do some Agriculture / Hydroponics related stuff at my home and in that, i would require some thing like continuous monitoring and remote control and secondly sometime i become too much lazy that after reading a book, i don't want to get-up from the bed and turn the light "OFF".

Company where i presently work do continuous monitoring but that is what i call as "Product" because 100's of people use it on a daily basis and what i am trying to create here is more of my personal usage i.e. it will not be required to handle "x" amount of traffic, i will not write workers queues to manage different jobs, i will not optimise my Mysql performance, i will not use a time series DB, i will not use any kind of load balancing stuff here and not even two layer authentication for API's (yes when you work in a startup with guys like Rajeev - you know some stuff about web-designing also). 

So this time, i would create a small home automation using a combination of 
  1. RPI
  2. WiFi / Ethernet 
  3. Bluetooth
  4. A 5V 230 V relay, some other hardware 
  5. And an simple web / android application
I will try to go as much as detail in possible (there are many existing home automation projects in net and here is one of the link) and will push code to a  git repository . I will start first with controlling a AC appliance with RPI GPIO and later on i will try to make RPI as a hub and communicate to the other switched via Bluetooth or other communication options. I will try to do this systematically and will keep on adding the information here also.  In-fact i already started coding a bit for web-application and made a small web-page using MDL (Material Design Lite). Although the UI don't seems to be good, but i am working on it and will try to make it more aesthetically pleasing. 


A sample UI for the home automation project using MDL

I will divide this blog into some parts

1. Web-application
2. Hardware
3. Android Application - Will take help of my brother Ravi who is a Android Developer 
4. Complete set-up
5. Introducing bluetooth in the scene for making RPI as hub.