Sunday, October 20, 2013

Home Automation with Raspberry Pi, Arduino, and Google Calendar. Pt 1.

Through an interesting series of uninteresting events, I found myself with the opportunity to use cheap, powerful technology to solve a basic problem: how to save money.

My brother gave me a Raspberry Pi and an Arduino for my birthday last February (OK, that was interesting).  Until then I had only heard of these things, and probably only from my brother.

This occurred around the same time that I began to take a much closer look at our household budget and personal finances.  At that time I had been paying about $28 per month on a landline that, since 3G coverage came about 3 years ago, was being used solely to turn the cottage heat on/off remotely.

My goal was to trim this monthly cost significantly, so I cancelled the landline as soon as spring really took hold.  That gave me until late fall to have the new solution in place.

It’s presently 12:52 am, October 20th, and the place was cold when I got in earlier in the day.  By this time tomorrow, once the hard-wiring is done, I will be scheduling the heat using Google Calendar.

Prior to the last 3-4 weeks, I had really only dabbled (refreshing some basics from early in my career, but mostly copying snippets from tutorials and forums), culminating in the ability to turn a little LED on the Arduino on/off using my tablet.  There was surprisingly little coding involved.

More recently I've been asking more questions and reading closer as my little project has grown to need robustness, manageability, and usability:
  • One defect and I could be in for a whopper of a hydro bill.
  • Using Google Calendar to schedule the heat seems like the right approach, so long as I have the ability to manually set the heat onsite if the Internet connection dies.
This meant swimming back and forth between trying to find out how to apply the logic I had in mind in Linux, Python, and Arduino, and learning what is made possible by these technologies along the way.  But it is with the input of friends and family that I can humbly state today that “It works.”  Other than some good guidance from smart people, I did this by myself – to be maintained by myself.

Tomorrow I will be paying $10+HST a month for the privilege of turning the heat on/off, and opening the door to a lot of cool, cheap projects.  This cost will be cut in half once I gain the confidence to cancel the public IP address.

I will be able to schedule the heat from Google Calendar, and get a daily email with solution stats.  Closed loop monitoring will be occurring via a temperature sensor, when I get to it.

I paid $100+HST for the 3G router, and $70 (hey, HST included) on a rocket stick that I bought from the same guy who sold my high def antenna (which stinks).  I refuse to calculate the RASPI and Arduino as capital investments as they were gifts (~$90).  The contactors for the heaters were legacy assets.  That’s a savings of $16.70 (60%) month over month, for an investment of about $200+labour.

I’ll soon post the details of the project; code, storyline, pics.

Thanks Bro, McEwen, and Elena (and my wife).

Below is the project board I've been carrying around.  Clockwise from upper-left:
  • Raspberry Pi Model B
  • Breadboard with resistors and LEDs and duct tape
  • the Arduino Uno is under the Relay Shield
  • 3G router with Rocket Stick
There.  Now I can go to sleep.




No comments: