IoT Garage door monitor based on Adabox003

Overview

I can't tell you how many times I've left the house, traveled about a block and wondered "Did I close the garage door?" I've often thought it ought to be pretty straightforward to build something that would answer this question. There are numerous web pages around the web describing ways to build an internet enabled garage door opener. But I never got around to trying it until Adabox003 shipped.

Adabox003 was the Internet of Things (IoT) box. Among other things, the box included an Adafruit Feather HUZZAH and a magnetic contact switch (door sensor).

The tutorials that were provided with Adabox003 made it possible to very quickly create an app running on the HUZZAH (for brevity, I'm going to drop the Adafruit Feather portion of name for the rest of this tutorial) that could detect when a door was open or closed. I grabbed the digital input example and modified it to create a garage door monitor.

The door monitor part is pretty easy. Just replace the push button with the provided magnetic contact switch. If you have two garage doors, get another contact switch and choose another GPIO pin to use as input. For the software side, create another feed, monitor the second magnetic contact switch, and you're done. You have a web based way to see if your garage door(s) are open or not.

AdafruitIO dashboard of the garage door states

So when is a project ever really "done." For instance, if you did leave the door open, you now know the door is open, but, you must drive back in range of your wireless garage door control to close the door. It would be nice to have a way to close (or open) the garage door too.

To add a garage door opener/closer, you need some way to remotely "push" the garage door button. The Digital Output example has the basics on having your web browser cause the HUZZAH to control an output. I chose to get a sainsmart 2 channel relay module to do the button pushing. There are several clones of the sainsmart out there that should work as well.

AdafruitIO dashboard with door states and an open/close button

The implementation described so far requires that your use a web browser on your phone and connect to io.adafruit.com to check the status of the garage doors. It works fine, but may not be quite what you're looking for.

I ended up built an iOS app to monitor the garage door. The user interface is pretty minimal and most of the work was figuring out how to get CocoaMQTT integrated and working. And even that was fairly straightforward –– again using an example app and modifying it to test that everything would work as desired. The app is in the Apple App Store and is free. See the Software - iOS part of this guide for a link.

Throughout this guide, the images used are available at higher resolution than shown in the web pages. If you open an image in another tab or window, you'll be able to examine it in more detail.

 


 

Project last updated: 21 Sep 2017