Android hack – a smarter garage door opener

Computers & Mobile Technology

Brad Fitzpatrick created a garage door application for his G1 Android-based Google Phone. This would be noteworthy enough, but the interesting thing about Brad’s hack is that it opens the garage door automatically as he approaches his home.

I got it all working. I now have an Android Activity (GarageDoorActivity) which interacts with an Android Service I wrote (InRangeService), letting me start and stop the service’s wifi scanning task. The service gets the system WifiManager, holds a WifiLock to keep the radio active, and then does a Wifi scan every couple seconds, looking for my house.

When my house is in range, it does the magic HTTP request to my garage door opener’s webserver (HMAC-signed timestamped URL, for non-replayability/forgeability if sniffed) and my garage door opens. Complete with a bunch of fun Toast notifications (like Growl) and Android Notifications (both persistent ongoing notifications for background scanning, and one-time notifications for things like the garage door actually opening).

So when Brad comes home, he starts the application which scans the WiFi network and then opens the garage door as soon as his home network is in range. He even describes an automated version where the phone constantly monitors the network for common scenarios. For instance, your if your phone sees your work network disappear, followed an hour later by your home network appearing, it could safely assume you have come home from work, opening the door without any interaction.

This is compelling support for a fully hackable, open source device. With normal iPhone development, you don’t this level of deep access to be able to monitor WiFi connectivity or run an application as a background process.

Brad’s released the source code for this one. If this app gives you any ideas, his code might be a good place to start. Just make sure to send us a link to your Android hack when you get your G1 to turn lights on and off when you walk around the house.

Android Garage Door Opener
Download the Java Source

6 thoughts on “Android hack – a smarter garage door opener

  1. Andy says:

    It would probably use less power to use cell data based gps (or real gps, I don’t know how that compares to wifi) to determine your proximity to your house, much like Locale does to determine what settings it should use. I haven’t used Locale, but it might be possible to have that run a script to open your garage door once you’re near your house.

  2. Draguer sur internet says:

    This is like “out of head idea” .. Sure this will make my garage door smooth :P

  3. antima jain says:

    I think this article done a great job.What a best way to describe your view. Thanks for sharing with us.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK