A physical controller for Hue smart lights
TL:DR I’m using an Xbox controller to control my smart light. Code is on GitHub.
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.
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:
- I have one
- I knew of a node library to control it (thanks Andrew)
- 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 control scheme is has 4 areas. Presets, Individual controls and group light switch.
The dpad maps to presets:
- UP: 100% brightness warm light
- DOWN: 1% brightness night / monster light
- LEFT: 50% brightness warm light
- LEFT: 100% brightness cool light
The coloured buttons and shoulder pads are used to control individual lights.
- A: turn selected light green
- X: turn selected light blue
- B: turns selected light red
- Y: turn off selected light
- Right Shoulder: select next light (flashes the light to show selection)
- Left shoulder: select previous light (flashes the light to show selection)
- Back: flashes currently select light
And finally, group light switch.
- XBOX: turn everything off
- Start: turn everything on
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.
I have a few ideas too extend and enhance the system.
- Wireless controller – I need to buy the little wireless dongle so I can go cable free.
- 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.
- Multiple rooms
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.