Like many techie new homeowners, I wanted to trick out my home with the latest and greatest in smart home gadgets. But with so many gadgets out there, where do I start?
Fortunately for me I had a couple of non-techie users who could weigh in on what's important: my wife and her sister.
After trying to sell them on the importance of having our lights turn on through a voice command with Alexa, the use case they keep coming back to that was truly useful was opening and closing the garage door without needing the remote.
I bought a Chamberlain garage door opener with MyQ compatibility. If you have a MyQ-compatible opener like I do, you’ll need an “Chamberlain Internet Gateway”.
If you don’t have MyQ in your garage door opener, Chamberlain makes a MyQ Wi-Fi hub device that is compatible with most garage openers made since 1993.
I chose MyQ because it had high reviews and Chamberlain had a ready-to-use app if I didn’t want to bother with the HomeKit integration.
I could stop here and give them the app with a shared login. But I really wanted the ability to voice command my garage door to open.
Unfortunately, MyQ does not natively integrate with HomeKit or Google Home or Amazon Alexa. Chamberlain also does not have a nice REST API. Fortunately for me, many folks on the internet have already reverse-engineered the MyQ web API.
The next hurdle was a way to bridge the MyQ web API and Alexa / HomeKit. Alexa was open interface, Apple's Homekit was not to the average dev.
Whenever Apple closes a door, the internet opens a window.
Homebridge is an open source HomeKit bridge that has plugins for every imaginable smart home device out there. Homebridge can run on Windows, Linux, or Mac. So I dug up an old BeagleBone Black for the job of the Homebridge server.
I used the homebridge-chamberlain plugin for this project.
What you’ll need:
A mini-computer that can run Node.js and has either ethernet or Wi-Fi. I used a BeagleBone Black (BBB). A Raspberry Pi is a popular option.
Familiarity with basic Linux commands
MicroSD card with at least 4GB of storage
First load Ubuntu (or your favorite Linux variant) onto your mini-computer.
After the BeagleBone has completed setting up Ubuntu on its eMMC, I removed the SD card and plugged the BeagleBone into power an ethernet so that it’s on the network.
Then SSH into your mini-computer.
I used the Fing app to find the IP of the BeagleBone once the BeagleBone was on the network.
Once you’re in, update all the packages.
sudo apt-get update sudo apt-get upgrade
Then install the latest Node.js:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install -y nodejs
Then follow this guide to install and configure Homebridge.
After installing Homebridge, install the homebridge-chamberlain plugin and follow its readme to add the proper config.json entries to your Homebridge setup.
Also worth considering:
HomeKit only works when the iPhone is one the same Wi-Fi as the Homebridge. To make it work over Cellular, set up an Apple TV (3rd or 4th gen) or an iPad as a HomeKit Hub.
There you have it. It took me 5 devices, countless open-source man hours, 2 hrs of my nightly hacking time. Finally I can say “Hey Siri, Open the Garage Door”
Garage Door Opener <-> MyQ Gateway <-> Wi-Fi Router <-> HomeBridge <-> Apple TV <-> iPhone
Was it worth all that effort?
Definitely not. I wish Chamberlain and Apple Homekit worked together out of the box. It should take two devices for this to work, Phone <-> Garage Door Opener.
Was it a ton of fun?
Yes, it was!