Things Gateway, Part 5 - more Philips Hue

In Part 4 of this series, I showed how to link the Things Gateway with a quartet of Philips Hue bulbs via the Hue Bridge.  There are advantages and disadvantages to using the Hue Bridge.  On the plus side, the Hue Bridge enables the mobile device app, a mature controller for Hue lights with plenty of bells and whistles.  On the downside, the Hue Bridge is an Internet capable device, and I'm just not sure I can trust that.

My experience shows that if you purchase a Hue bulb packaged without a Hue Bridge, you can pair the light directly with a Zigbee adapter.  This means that the light works like any Zigbee compatible bulb.

Purchasing Hue bulbs in a Starter Kit can be a less expensive way to purchase Hue bulbs.  Starter Kits include three or four bulbs along with a Hue Bridge.  However, the bulbs are effectively locked to the Hue Bridge that came in the package.  To use the bulb without the Hue Bridge, the bulbs need liberation. Fortunately, it is not as complicated and perilous as jail breaking a cell phone.  Ironically, Philips sells the tool to do the unlocking disguised as their own remote Hue Dimmer Switch.

Caveat emptor:  If you really want to avoid the Hue Bridge, compare the costs of buying single bulbs versus Starter Kits, factoring in the cost of the Hue Dimmer Switch.  The only way that Starter Kits saved money was when I found them on sale.  At their full price, they are a dubious bargain.

Goal: Get the Things Gateway to control Hue light bulbs without the use of a Hue bridge. Maintain total local control with no component communicating outside to the Internet.

To reproduce everything that I'm doing here today, you'll need these things:

Requirements & Parts List:

Item What's it for? Where I got it
The Raspberry Pi and associated hardware from Part 2 of this series. This is the base platform that we'll be adding onto From Part 2 of this series
DIGI XStick This allows the Raspberry Pi to talk the ZigBee protocol - there are several models, make sure you get the XU-Z11 model. The only place that I could find this was Mouser Electronics
Philips Hue White & Color Ambiance bulb To demonstrate use of a Hue bulb without any extra parts or incantations Home Depot
Philips Hue White & Color Ambiance Starter Kit To demonstrate unlocking Hue bulbs from their associated Hue Bridge Amazon
Philips Hue Dimmer Switch The magic key that can unlock Hue bulbs Amazon

Step 1: I'm assuming that we're starting with the Things Gateway configured for the Zigbee adapter.  See Part 2 of this series for instructions.  Remember to update the Zigbee add-on as specified in the instructions.

Step 2: First we're going to just show that we can, with no fuss, use a Philips Hue bulb that was not packaged with a Hue Bridge.
From the Things pane, press the "+" button.
Plug in your Hue light, you should see the bulb detected.  Press "Save" and "Done".
You now have full control of a Hue bulb in the Things Gateway.  You can repeat this step with any Hue bulbs that were purchased without a Hue Bridge.

Step 3:  From this point on, we're only going to deal with liberating Hue bulbs that were purchased in a Starter Kit that included a Hue Bridge.   If you've already set up your Hue lights and Bridge, these instructions will effectively undo that setup.
The first thing that we need to do is unlock the bulbs.  For that, we're going to use the Hue Dimmer Switch.  You'll notice that the instructions for the dimmer switch want you to pair it with the bridge.  Since our goal is to not use the bridge, we're going to ignore the instructions.  Pull the battery tab to get power to the dimmer.  There will be a tiny light in one corner of the ON switch that blinks orange.  This means that it is looking to pair with a Hue Bridge.  You may ignore the blinking light.

We're going to apply power to one of our Hue bulbs.  It should light up warm white in color.  Hold the Hue Dimmer in both hands with thumbs set to press both the ON and OFF buttons at the same time.  Move the dimmer to within four inches of the bulb to be unlocked.  Press and hold the ON and OFF buttons.  After ten seconds, continue holding when the bulb blinks a harsh bluish white light several times and then re-illuminates to a warm white.  Release the buttons.
Repeat this step for each bulb that you want to unlock.  In my case, since my bulbs are so close to each other, I had to ensure that only one bulb was powered at a time.

The Hue Dimmer can factory reset other Zigbee compatible bulbs, like the CREE bulbs and Ikea TRÅDFRI bulbs.  I'll have more on that in a future Ikea focused installment.

Step 4:  To add your newly unlocked Hue bulbs to the Things Gateway, repeat Step 2 for each bulb.  When completed, I had five Hue bulbs ready to color at will.  Now will somebody remind me why I would want lights of all these different colors?
In the next installment, I'm going to integrate TP-Link devices into this circus.