Home Automation: Controlling the lights with your voice

Posted by ProgrammingAce on Wed 18 March 2015

I’ve always had a distant fascination with the idea of a ‘Smart Home’. Not having a house, my options for improving the intelligence of my homestead are pretty limited. A few years ago, Phillips came out with smart lightbulbs called ‘Hue’ that work wirelessly without modifying your existing infrastructure. So I recently picked up a starter pack of the bulbs and got to work setting the system up with some voice controls.

By default, the Phillips system requires a smart phone to control the lighting throughout the house. Not only does it set the on/off state for each bulb, but it also sets the brightness and the color values (for the bulbs that can change colors). One of the big benefits to this lighting system is that it operates on open standards. This lets you mix and match individual parts from different manufacturers and have some assurances that everything will work together.

My setup currently has the following:

  • Phillips Hue hub
  • Nexus 7 (to control the system)
  • 3x Phillips Hue bulbs (color changing)
  • 3x GE Link bulbs (white only)

The Phillips color changing bulbs have an MSRP of $60, and honestly have a limited number of sensible uses. We have 2 in the living room and one in the bedroom; this lets us adjust the color temperature in the rooms we’re in the most. The GE bulbs can only do white light, but have dimmer controls through the Phillips hub. Phillips offers a similar bulb, but the GE offering is half the cost and has a slightly higher maximum brightness. I have two of these bulbs in the kitchen and one in our bedroom. The Nexus 7 tablet was laying in a drawer unused, so it was repurposed into a master controller for all of the lights in the apartment. We can also control the system through our cell phones.

The lighting system proved its worth early on when I was able to configure a night light setting for getting around after bed (which consists of turning off all the white bulbs and setting the colored bulbs to pure red on minimum brightness), and I was able to set a sunrise setting for when we woke up in the morning (an alarm that slowly turns the light on from the lowest setting to 25% power over the course of 10 minutes). Otherwise it was fun just playing with various lighting colors, like turning the living room green on saint paddy’s day. But there was one major downside with this lighting system, and that’s the requirement to carry around a phone to turn on the lights in each room. That would have to change.

I started looking into various apps and control schemes for smart lighting and I ended up trying out a few different apps. Chroma on the Mac App store seemed to be the best option for PC controls, and Lampshade.io was the easiest to use on Android. These apps gave me the ability to ‘set and forget’ lighting, but it was still cumbersome to find my phone, unlock it, open the app, and pick the lights I wanted to turn on and off. I needed to look at better automation.

Tasker is the goto automation app for Android, and it has no lack of plugins that can interact with smart lighting. Unfortunately a lot of those plugins are awful, but I was able to find a combination of tools that lets me control my lighting system with my voice. Tasker, AutoVoice and Lampshade.io all fit together nicely accept voice commands to activate different parts of the lighting system. This voice recognition can either be running in the background listening for commands it understands, or it can be activated with a button press on the android home screen. After that, turning on lights is as easy as saying ‘Turn on bedroom’ or ‘dim kitchen’. When I’m getting ready for bed, I give a command that turns on the ‘night light’ setting for 10 minutes, then slowly fades out and turns off all the lights in the house.

Now there are definitely improvements that could be done if I owned the property rather than rented, but I’m pretty happy with the level of automation I was able to get with just the starter kit and an old tablet. I’m sure this is just the start of what I can play with to make a ‘Smart Apartment’.