Photo of Jamie & Lion

The personal site of Jamie Knight, an autistic web developer, speaker and mountain biker who is never seen far from his plush sidekick Lion. View the Archive

Topics: Autism Development

A physical controller for Hue smart lights

TL:DR I’m using an Xbox controller to control my smart light. Code is on GitHub.

Introduction

I received a set of Phillips Hue smart lights for my birthday. I really like them. I have been working on a proper review; but this post is about my first hue hack. Physical controls.

Why?

App controlled lighting is awesome. When I want it, I have complete control of my lighting. But I don’t always want complete control. Often I want something simple and more importantly something fast.

For those situations I wanted a physical controller. Something where I can turn on a preset or an individual lamp easily.

I wanted something physical for ease of use. I want to use this thing to check for monsters at midnight when unlocking my phone is too fiddly and slow.

Hue has a product for this (the Hue Tap) but its pricey and I wanted too build something more expressive.

Why the Xbox controller

I picked the Xbox controller for 3 reasons:

  1. I have one
  2. I knew of a node library to control it (thanks Andrew)
  3. it has enough buttons to do fun stuff.

How does it work

When I press a button on the controller, it trigger an event in a node.js app.

The node apps then sends the preprogrammed command to the hue bridge which in turn controls the lights. Source code can be found at: https://github.com/JamieKnight/xbox-node-hue

The Controls.

The control scheme is has 4 areas. Presets, Individual controls and group light switch.

The dpad maps to presets:

The coloured buttons and shoulder pads are used to control individual lights.

And finally, group light switch.

Usage Patterns

I’m using the presents most, but the Individual light control comes in handy when I want to just light my bed or desk etc.

Where Next

I have a few ideas too extend and enhance the system.

  1. Wireless controller – I need to buy the little wireless dongle so I can go cable free.
  2. More than lights – I also want to control TV volume and fan from the same controller. This can be done via an OS X system event API and a wireless mains switch.
  3. Multiple rooms

final words

If you have any question feel free to email me, or leave a comment. If you spot a bug please open an issue in GitHub.

Published: 25 August 2014 | Categories: , Permalink

Comment

Your Comment