Shortly after I moved into my home, my automatic garage door opener broke. For years after, I was content opening my garage manually, but last summer my contentment was interrupted by a door spring failure. When the repairman came to fix the spring, he noted that the automatic lift was also not working and offered to fix that too.
Before the repair I would simply open the door by hand, grab my bike, and ride away. After the repair I found myself needing to remember where I left the garage door remote. I fumbled in my pockets for my keys, but instead found my mobile phone. It has a radio, it can communicate with the world, and it’s always with me. Why do I need a second device? I don’t, and neither do you. In this project you’ll learn how to connect a mobile phone, via the internet, to actuate your garage door button using a wireless mesh network.
The project has 3 parts: controlling the garage door, connecting it to the internet, and configuring the smartphone. The basic pattern you’ll learn here for making your own wireless home automation devices — using Digi International’s XBee radio module, ConnectPort Ethernet device, XBee Internet Gateway software, and iDigi Device Cloud service — can be used to automate countless other devices in your home. (Full disclosure: I work for Digi.)
Perhaps you’d like to know when Tiger’s water bowl is empty? Detect freezing pipes or a leak in the basement? Know when the washing machine has finished its cycle? You can easily add another XBee to your network and reuse your entire wireless home automation infrastructure — the ConnectPort, XIG, and connection to iDigi. Everybody can share!
HOW IT WORKS
Almost all automatic garage door openers have a hard-wired button that when pressed opens the door. To remotely control the door, all that’s needed is a simple circuit that can simulate this button press. Since you’ll be able to control the door from anywhere, you’ll also want to detect and communicate whether the door is open or closed. For this, you’ll add a simple magnetic reed switch sensor that will tell you when the door is fully closed. Then you’ll connect this circuit to an XBee radio that will allow you to wirelessly communicate with a network inside your home.
The XBee ZB radio module (aka Series 2) speaks the ZigBee protocol. ZigBee is great for home automation projects. It’s secure and inexpensive but most importantly it’s a mesh network — a network that can extend its range using other radios intelligently and automatically. For example, if your garage is too far away from your gateway you can simply add another radio in the middle to facilitate the wireless connection.
To connect to your garage door circuit from the internet, you’ll use Digi’s ConnectPort X2 ZigBee-to-Ethernet gateway. The ConnectPort X2 can be programmed using the Python language. We used an open source Python application called the XBee Internet Gateway (XIG) to create the link between our garage door and the internet. You could also connect an XBee to a PC in order to make this link, but the ConnectPort X2 uses a lot less electricity and is always ready, so you won’t have to worry about forgetting to start a PC application in order to connect to your garage door. (If you wish to explore using the PC version, visit code.google.com/p/xig.)
Finally, you’ll set up your mobile phone to communicate with your garage door from anywhere in the world. Scott Kilau created a beautiful open source Android mobile application, and Margaret McKenna created a web version that people can use to turn any smartphone into a garage door remote.