User Tools

Site Tools


Sidebar

supported_hardware:hue_old

Phillips Hue (Legacy Plugin)

This page is about the original and not legacy Phillips Hue Hub plugin. For new installs please use the new Hue plugin.

XTension has full support for the Phillips Hue Hub supporting the full color suite as well as the color temperature suite for all supported bulbs and lamps. XTension also supports any remotes, sensors and “clip” sensors that you may have attached to your hub.

XTension also supports the commands for color looping as well as flashing the bulbs or temporarily flashing a color by way of alerting you in response to some input to the system.

One thing I never cared for with CF and LED bulbs was that they didn’t get warmer when they dimmed like traditional bulbs (though the new Warm Glow lamps also from Phillips do a great job of simulating that on a regular dimmer) you can now simulate that change with the color temperature value for these lamps.

What You Need

You will need at least the phillips bridge and one bulb. They come in a starter pack with the bridge and 3 bulbs. As I write this it is possible to add the phillips color bulbs to other ZigBee hubs such as the Vera however they don’t yet offer control over the color or support the other features of the bulb. If you have the Phillips hub you’ll definitely want to connect that to XTension.

Setting up the Bridge

Follow Phillips instructions for the initial setup and linking the lights with the bridge (they should come out of the starter pack all linked and ready to go) Though it's not strictly necessary it will save you problems later if you dig deeper into the configuration and set up the bridge with a static IP, or do a DHCP reservation in your airport or other internet router so that the bridge will always get the same IP on your local network.

Connecting to the Bridge from XTension

In XTension's Interface window create a new interface and set it's type to “phillips hue bridge” if you dont know the IP address of the bridge you can click the “Search For Bridge” button which will go out to Phillips cloud service and ask it what the registered local IP of your bridge is. This is how all the IOS apps find a bridge to talk to on your local network but I have found it's not always updated if you change things. If you have multiple Hue hubs on the local network you will be provided with a link which will popup a menu to select the one who’s address you wish to use.

Next you need to create a user in the bridge for XTension, so that it knows it's supposed to accept commands from us. Click the “create user” button and XTension will verify that it can talk to the bridge and then ask you to press the button on the center of the bridge. After pressing the button XTension will tell you that it's successfully setup and you can click save and then enable the interface and start it up by clicking the checkbox in the Interface list.

Once the Interface is enabled you can come back to this window to add devices to the Hub. You can place the hub into add units mode with that button, and if a lamp is having trouble joining you can enter it’s serial number directly here to look for that particular lamp. You can also put the hub into “touchlink” mode. This was also called “lamp stealer” and there was a separate app that set this up on older firmware versions. XTension now supports this for the latest firmware version. This is not only useful but vital if you’re going to be allowed to link a lamp that thinks it’s linked to a different network. The light must be powered on and almost physically touching the hub for this work but it’s often the only way to add a new lamp to the Hub.

Making the XTension units

As of XTension 9.2 any units found on the Hue Hub will be created automatically in XTension so you no longer have to create them manually.

Controlling Color

The hue bulbs have 2 ways of setting their color, a hue/saturation number or an x/y coordinate system. XTension also supports a conversion from standard web colors expressed in the standard notation of 6 characters of hex for red green and blue. “RRGGBB” format. The hue bulbs seem heavy on the red so to get the colors to match what you see on a swatch you'll need to reduce the amount of red you're sending somewhat. XTension lets you use any of these ways to set the color. A color change must accompany a turnon command or a dim command, but the brightness of the bulb is inherent in the color, so the current brightness level of the lamp may change to be different from the dim or the current value you have set.

turn on "hue device" rgb color "AAFF22" 

sets a reasonable yellow. The other forms of sending color are via hue/saturation or the x/y like this:

turn on "hue device" hue 45032 saturation 200
turn on "hue device" xValue 0.134 yValue 0.441

You can set the color in XTension also by control clicking on the unit in any list and selecting “set color” which brings up a standard system color picker that you can choose from.

As of XTension build 850 and later the color data as XTension knows it will always be sent with any on or dim command. This is useful since the bulbs do not remember their color state when the power goes out and will return to white. It also adds the ability to change what this stored value is while the light is off using the sim preset command like:

sim preset "hue device" to 100 rgb color "AAFF22"

if the light is off that will not cause the light to go on, but the next time you issue an on without color data specified it will pass that level and color to the bulb.

You can see what color the bulb is current set to, or get a good color you like out that you've set from some separate controller by control clicking on the unit and selecting “edit unit properties” you'll get a display that looks like this. The “color mode” will tell you which values are actually being used right now. “hs” means that the Hue and Saturation values are the ones you're seeing, if it says xy then those numbers are currently active. If it says “ct” then the bulb is in “white” mode and the Color Temperature value is what is being displayed. You can read out these values and send them in verbs to get the same color later from XTension.

White Color Temperature

You can change the color temperature of the white being displayed by using the “color temperature” parameter of the turn on or dim verb like:

turn on "hue device" color temperature 300

will produce a good warm white. The valid range is from 153 for a very cool white up to 500 for something that looks more like orange to me. So I can have cool white when I“m working with sunlight adding to the room light and then warm things up in the evening when it's dark outside and the cool would look grey. This is really a nice adjustment to make.

alerts and color fades

The phillips bulbs support some alert and color fade modes accessed via the “blink” verb in XTension.

blink "hue device" rate "select"

produces a single flash.

blink "hue device" rate "lselect"

for “long select” will flash the bulb for 30 seconds. And can be canceled by you at any time by running the command again and passing “none”

blink "hue device" rate "colorloop"

starts the bulb slowly cycling through all it's colors and can be cancelled by setting it to a specific color or white or running the command again and passing “none” There seem to be some holdover from other commands as to how deeply saturated the color loop colors are and the rate at which they change. This doesn't appear to be documented so some experimentation might be necessary to get the effect you want here. It seems that you can issue other color change while the loop is running to change the saturation and brightness.

Other Scripting and Examples

all the commands support the “rate” parameter. So you can fade very slowly from one color or white temperature by adding “rate 500” to the end of the command or make the change happen immediately by setting 0.

you can script a flash to a color in XTension even though the Hub doesn’t support this directly by using standard XTension commands such as:

  brighten “hue device” to 100 rgb color “FF2222” for 2

which will turn the bulb on full bright to red for 2 seconds and then return to the previous state or color.

Hue Sensors

Any motion or temperature sensors added to the Hub should just show up in XTension without any other configuration needed.

Hue Remotes

As of this writing there are 2 different remotes that can be used with a Hue hub. Phillips “tap” battery less device and the dimmer remote which does require a battery and can be either mounted to the wall or used as a hand held remote. These units will also be created automatically in XTension. Each one will create a unit in XTension for each button on the remotes. They may not receive off events, but will receive ON events when the buttons are pushed.

Whats not immediately obvious is how to create the remote in the Hue hub and yet not assign anything to it in the hub. The default is that it always controls at least one lamp somewhere. In my case I didn’t want the hub to directly control any lamps when the remotes were used, I wanted to link those things to other events in XTension. I was able to do this by creating a new room with a single lamp. Setting up the remote to control that room and then remote the lamp from that room. The remote remains pointed to that room, but there are no lights in it for it to control. After doing that I was able to get the remote events in XTension without having it directly control any Hue devices.

supported_hardware/hue_old.txt · Last modified: 2019/07/02 14:23 by James Sentman