Philips Hue users here?

Is someone here using a Philips Hue system to illuminate his home? I took the time between the years to set up the basics of a Philips Hue API 2 Xojo (API 2 …) framework but would need some assistance from time to time to verify devices I do not own.
The GUI is macOS only currently but the framework might become open source. It is bound to CurlMBS because I could find no other way to use the IP upstream.


Done a similar thing in pure JS here:

Would you mind to opensource what you’ve written so we can bring more things together?


No, I wouldn’t. Only issue is I’d have to clean up/move a few things first. The basic framework is completely device independent, but I added a few features that address my own macOS declare framework, like a lightcolor property that basically throws out a NSColor. These should be moved out of sight for compatibility.

If you happen to have found a really working RGBtoXY calculation, please let me know. The method described in Philip’s API 1 docs throws out amazing colors but rarely matching ones for me.

1 Like

I’m using quite a few Philips Hue lights, plugs, smart buttons and dimmers. How can I help?

I have written a plugin for the XTension home automation system for the Hue API2 as well. Sadly I no longer have a Hue hub as while building a new rack to hold some of these things I accidentally connected it to 12v instead of 5v :wink: Whats interesting is that it didn’t completely blow up it just damaged the power supply and the hub appears to work until you try to do wireless access at which point it reboots from voltage sage from the damaged regulator. I could probably repair it, or get a new one, so I’ve moved my devices to the ZigBee radio on a Hubitat which works very well and which I also have a plugin for.

I really like the interface you’ve built! While I can’t test things with specific devices anymore since my hub is dead, if I can help with other things about the protocol or whatever else let me know.

Thank you, James. It is work in progress and will change a lot. The idea is to be able to control most features from a group control but have optional light controls for fine tuning. You can already drag & drop light colors in the color palette canvas at the bottom or create gradients between the lights in a group, and I finally debugged the RGB to XY method so you can use a color picker or even enter RGB values. It’s a bit more technical than most other Hue GUIs but hey: My main job is in color management, so I prefer a bit more information.

The drawback is that this design limits the GUI to macOS currently. I use a lot of declares, so drawing time is quite ok and colors are based on NSColor, which means they use the whole gamut of a Mac display and not Xojo’s 24 bit colors. I fear that Windows performance based on custom container controls could be insufficient and would look worse, but maybe I am simply prejudiced.

@Christoph_Emrich Great, thank you! There are a few steps missing before I can share a test version, so nothing now but soon simply basic tests first: Are all devices found, do they react, does the GUI update correctly?

I have a limited setup with one Bridge 2, 2 dimmer buttons and 10 Sultan and Candle bulbs, so I am especially interested in different configurations. Theoretically the app should run with a multi-bridge setup, and I will add palette definitions for animated scenes and gradient lights. Which I don’t own, so in case you have spacious premises to illuminate …

I should also add an authorisation method before I can send a test version.

Here’s a download link for the very first Alpha valid one week.
It’s not code signed yet, so you have to open it with two right clicks.
It should prompt you to create an App key as usual: Press the bridge connect button and click on the dialog immediately after.
The main window is very draft. You’ll see the bridge with a few buttons where the most interesting one should be the room icon. The app will currently open one window for each selected room, and you should currently not close a room window and reopen it – I have to debug some references.

The control on top is a GroupControl. You can use it to modify all lights in that group, whereby moving one of the sliders will not override the current setting but change the lights proportionally. This can create some unexpected results because the lights can take a few seconds to update, so another slider move will change this current state.

Clicking on a slider with ALT will change all group lights to that setting.

Below the sliders are the light patches. Dragging is not well set up, but you should be able to drag one light over another patch to copy its setting, or to exchange but settings with ALT being held.

If you select at least two light patches which are not direct neighbours, a click on the right rainbow icon will generate a gradient between the lights.

The (way too small) icon buttons on the left bottom are for selecting a scene or animated scene. You can save a scene, but not an animated one, currently by right-clicking the disclosure triangle. (This will move of course).

I experienced some problems loading the scenes which I never saw before. Please let me know if you do too.

A normal click on the disclosure triangle will show/hide the light controls. Their main difference is in the additional RGB selector.

The animation controls on the right are mostly useless currently, unless you activate an animated scene. Then you can use the light controls to change the animation speed.