Sunday, November 03, 2013

Retrospective: The Raspberry Pi Garage Door Remote + Security System

My rinky-dinky garage security system is now online and in operational use. I still have more tweaks to do - for example, I got rid of the metal backplane within the My Book casing that now serves as my board enclosure because it shielded my WiFi signal, killing the network connection. I'm sure I will continue to tweak the Motion configs to increase framerates and decrease sensitivity. Now that e-mail notifications are working, hopefully I can limit the spurious notifications and just notify on the bigger changes of motion over two seconds in length.

Another measure of success is cost; if I could have purchased a ready-made setup for a marginal increase in cost, it may be better to go with a commercial platform. If the build is overkill and I could have built it with cheaper components, I should scrap this and re-build. Looking at commercial options I couldn't find anything that had both the garage door functionality and the security camera... just one or the other. Chamberlain does sell the MyQ Garage, a pretty nifty home automation product that contains a universal garage door opener and a tilt sensor that is WiFi-enabled and can be paired with a smartphone app. They also sell the MyQ Internet Connectivity Kit, which is more of an Internet-enabled garage door master controller. Neither have a security camera paired with it, but you could easily install a wireless camera separately for around $40. The MyQ solutions are $140 and $120 respectively, giving you a total build cost of $160-$180. Not bad, really.

If you bought every part new, the build list for my lil' setup is:
Raspberry Pi B $40
USB Micro-B cable $2
USB AC Adapter $5
8GB Class10 SD Card $8
802.11n USB dongle $9
Parts for MOSFET switch $5
Universal garage door opener $25
HP HD-3100 webcam $14
Enclosure made of random stuff $0
Total $108

I had most of these parts on-hand, so my actual cost was closer to $70. That means a savings of $90 over a commercial solution. I don't know of a cheaper solution than the Raspberry Pi that could handle a 1280x720 webcam feed and perform motion detection, and a $14 webcam is cheaper than Raspberry Pi's own camera expansion card.

Of course, your time isn't free. The hours spent in construction count - so I tried to estimate how long each step took me:
Tearing down & wiring up garage remote 1 hour
Setting up webcam and Motion 2 hours
Configuring OS & system administration 4 hours
Building web interface 3 hours
Building enclosure 2 hours

All told maybe 12 hours of work, a quarter of which was me figuring out how to render an MJPEG stream on an HTML5 canvas. The web interface can be re-used, as are the system administration steps, so I could probably do another in four hours or so. Four hours and $70 isn't too bad for peace of mind.

Speaking of ease of mind, I'll leave this thread with an ad for Chamberlain's MyQ Garage. I thought I was bad... but these actors have turned garage door anxiety into an existential crisis.

5 comments:

  1. Anonymous11:50 AM

    Interesting post and a very cost effective solution. I recently did the very same solution using Loxone in my home. Yes I know I work for them but it is an elegant solution that I want to share. I spent $15 on a garage sensor and $88 on a Grandstream cube cam. I had previously installed the Loxone Miniserver to control my heating/cooling. After running some Cat 5 wire to my existing garage door push button and and to garage door sensor I was able to configure Loxone in about 10 minutes to control my garage door.

    I also added 2 low voltage relays to control my garage light and drive way light. Using the garage door sensor and a presence detector I was able to configure the following logic

    1. When garage door is closed and we have motion turn on garage light.. shut off after 5 min of no motion
    2. When you open garage, turn off light if daylight outside (a Loxone function)
    3. When you open garage, turn on drive way light if no daylight. Keeps on garage light as well.
    4. When you close garage and lights were on shut off after 5 min.
    5. For added convenience I added a timer for the drive way lights as I have one care out side. On a work day I depart the home during a specific time slot. As we have been on Daylight savings time it has been pitch dark when I was leaving the home. I now have the lights come on during my departure time IF there is no daylight (Standard Loxone function).

    The result is that I have a fully automated lighting control tied to my garage door. I will call it a smart garage as it works flawless to my configuration expectations. I can use the garage remote or my phone and Loxone will manage for me.

    Now to the cost. The Miniserver runs $549. The required 24 power supply is $49 = 698. I control 2 heat pumps and my garage with this system. I also have a DMX extension to control RGB LED lighting strips on my deck as well as in living room. The best part is that the software to to configure this system is for free as well as the apps to run on your device are free as well. To configure the garage took about 20 minutes.

    With Loxone you get a single platform that allows for the automation of everything in your home. Just like the roof on your home Loxone can cover automation/control of anything that is under your home's roof. I call that the One Roof One App = a Loxone Smart Home promise.

    Loxone does all the heavy lifting for you: Using the built in functions you get custom visualization for your tablet/smart phone. Example when I use the garage control I get icon for the garage door that opens and closes when I click on up or down. With Loxone you can configure this to be a gate and yes you can specify if the gate swings left hand or right hand. The same works for curtains, blinds or roll up shutters.

    Loxone has a common sense approach to automation. When you count in time, reliability, and having a custom platform for all aspects of your home, and finally, having a single app that controls everything in your home. You will come to realize that Loxone is a very appealing solution.

    I expect to post on our Blog more details about this Loxone implementation later on this week. Take a look!


    http://blog.loxone.com/enus/

    ReplyDelete
    Replies
    1. Woah - really cool stuff! The Miniserver looks very compelling. I think you guys are definitely on to something with your "'Hair Straighteners off' Guarantee," since I've had to turn the car around for curling irons nearly as often (if not more) than for the garage door!

      Delete
  2. Thinking about using EnOcean's energy-harvesting reed switches to provide a wireless sensor to determine garage door state - http://www.enocean.com/en/enocean_modules/stm-320/

    ReplyDelete
  3. Thanks for sharing this informative post. In my opinion Fingerprint scanner is good for security system .In modern age everyone wants to take this security system for their own house and garage doors.

    ReplyDelete
  4. This is an extremely well written and informative. I was looking for some general information about garage door remote and your post was just perfect.And I really like the way you have explained each and everything so well. Very well done with the article!

    ReplyDelete

Note: Only a member of this blog may post a comment.