I love home automation. I’m enamored with the idea of a house that knows where I am, intelligently controls lighting for me, talks to me, and the goal I’ve worked toward for years with varying degrees of success: voice control. While solid close-range proximity triggering has still eluded me1, my voice control dream is here.
Over the years, I’ve accumulated a large collection of X10 and Insteon devices. Light bulbs, switches, outlets, motion sensors, door close detectors, low voltage triggers, mercury switches, and an array remote controls. I currently use Indigo as the brain behind everything, handling more complex scenarios based on variables and even provide an API on my LAN that I can use to control everything from web URLs.
The API allowed me to use Workflow on my Apple Watch to control lights from Glances. Siri (and Echo) were out of reach, though, as the aging devices I own are never going to work with HomeKit. Then, Homebridge and the Indigo plugin.
I discovered Homebridge via OneThingWell. The Mac mini that runs my house was already set up for NodeJS, so installing it was a breeze. The homebridge-indigo plugin took about 5 minutes to configure. There are plenty more plugins if you happen to use a different automation system. Just run
npm search homebridge-plugin to see the available options.
You can install node and npm using Homebrew (which everyone working in the shell should have anyway). Then just install Homebridge globally:
$ npm install -g homebridge
And the Indigo plugin:
$ npm install -g homebridge-indigo
Then edit the
~/.homebridge/config.json file based on the example shown in the Indigo plugin documentation, renaming and adjusting server ports as needed. You can use the keys
includeIds to only include specific devices/actions, or
excludeIds to include everything except certain ones.
Then test the Homebridge server:
If there are any errors in your configuration, you’ll see them. In the future, you can use launchd (LaunchControl makes this really easy) to set up the Homebridge server to launch in the background and keep it running.
Now you just need an iOS app to bridge Siri to your server. After trying a few HomeKit-capable apps, I found myTouchHome and it instantly picked up all of the devices and actions I had set up in Indigo.
Now Siri recognizes commands like “Hey Siri, turn on all office lights,” or “Hey Siri, turn on bedroom lights low.” I can control single devices with “turn on” and “turn off,” and actions set up in Indigo appear as switches, running when you use “turn on.”
The actions-as-switches setup leads to some naming irregularities with actions designed to turn off lights, e.g. “turn on all office lights off.” myTouchHome makes this easy to fix, though. Just create a “scene” named with what you want the voice command to be, then assign one or more actions or device commands to it. For example, I have one set up called Good Morning that triggers an Indigo action that checks whether the sun has come up yet or not, and sets my office lighting accordingly.
I can also query devices, e.g. “is the living room floor lamp on?” I’m hoping to devise some more advanced query and command functionality, but haven’t actually dug into the homebridge code yet to see what’s possible. For the most part, the Indigo Touch control panels I’ve set up are more useful than asking Siri about one device at a time.
If you use Indigo (or just have other controllable devices without HomeKit capabilities) and have an always-on machine to run Homebridge, I suggest checking it out. Installation instructions are listed in the README, and you can find Indigo-specific instructions on the homebridge-indigo plugin page.
I’m hoping to see HomeKit functionality with Siri on my Apple TV. Being able to set movie lighting from my remote would be grand.
I’ve worked with motion detectors and timers, Bluetooth proximity (extensively), and iBeacons. I’ve gotten all to work, but every system ends up with false triggers and unreliable detection. Or I don’t have my phone in my pocket and find I’ve forgotten how to turn lights on manually…↩