I've always had a fascination with lighting technology. For a long time, I've wanted some sort of RGB LED lighting product that I could have fine-grained control over. I had a few color-changing “party LED bulb” type products before, but was disappointed that the color selection always seemed to be limited to only a few spectral colors, when I wanted to control aspects like saturation (or just manipulate red/green/blue brightness directly) as well. It seemed like such a waste of potential.

Back in August I checked out the smart lighting displays in a local electronics store and did some research. The Philips Hue light system had a mobile app that seemed to give me the level of control I wanted, but the color LED bulbs were expensive: $60 apiece, ouch! And I was sure the system was proprietary, as usual, so you wouldn't be able to use anything but their app. But it turned out I was wrong: It's an open standard, with many third-party apps and libraries available to interface with the lights. I found I could even control the lights to do anything I could imagine on just about any programmable computer with a network connection! That immediately sealed the deal for me, even at this price. Smile

So, long story short, I spent the last month and a half hammering out code and having a lot of fun. Things quickly got messy, just like when you slurp through your favorite meal, so I eventually had to spend a lot of time cleaning up the code. But finally, I've posted what I've made so far on GitHub: https://github.com/ticalc-travis/hue_lighting_toys

Currently, these are mostly command-line Python scripts using the phue library (also available on GitHub) and assuming the use of the expensive color lights only (since I don't have any of the cheaper white-only ones at the moment 'cause they're sorta boring Razz). At the moment, they include:

* Random color fades and “chasing” animations with an arbitrary number of lights

* Scripts that can flash color codes to convey digital information. I have a form of synethesia in which I have a strong mental association of each digit 0–9 to a specific color, so this allows me to “read” the color flashes with almost no effort. I can even turn lights into clocks or stopwatches in this way.

* A simple CLI program to set color/power parameters of lights on the command line or from shell scripts (it's largely a thin wrapper around Python phue library calls)

* A simple curses program to numerically change the color (hue, saturation, color temperature, X/Y, etc.) parameters of lights in an interactive terminal

* A monitoring program that tries to work around the annoying lack of ability for the Hue lights to remember their state when they lose power

* Rough simulations of certain other types of lights (particularly some compact fluorescent lamps that take a while to reach full brightness and go through particular color changes as they warm up due to needing time to reach operating temperature)

I also created some code to simulate tungsten incandescent lights when dimmed. Plain incandescent bulbs actually shift and become more red/orange in color when dimmed, according to black body radiation principles. Many modern dimmable CFL and LED lights are designed to simulate the color of incandescent at full brightness, but the color usually remains the same when they're dimmed, causing them to look grayish compared to an incandescent light. So, for fun, I placed an incandescent light on a dimmer next to a Hue light and worked out the color parameters needed to match the Hue light's appearance as closely as possible to the incandescent at several levels of dimming. Then, with the help of a graphing calculator and its statistical regression features, I used these observations to create a formula to map any brightness level to the approximate color shade to match the appearance of the incandescent bulb. Doing this was fairly tedious, but kind of fun.

Unfortunately, I can't provide photos or videos, because it seems typical consumer cameras just don't want to capture the rich, vibrant colors well at all. (I'd probably need a neutral density filter of some sort, I'm guessing, to do it any kind of justice.)
Nice work! My entire apartment is Hue enabled and I'll be sure to check these out.
  
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement