Many thanks to Krannich Hausautomation for his tutorial and basis of this script. If you are new to this, follow his tutorial to get the key from your bridge and install the enigmalight. I had some problems with his script (no blue, big delay), so I rewrote most of his script.
Thanks to benknight for his lib to transform the rgb to xy values.
The Idea is pretty simple, instead of sending the extracted color from the enigmalight to the LEDs connected it sends them to this script which then makes a rest call to your hue bridge. It only makes 1 rest call per second because the hue bridge is pretty slow, and saving the rest calls you will not get the right color to the tv picture.
- Install enigmalight
- Make your enigmalight.cfg
- Copy the engimalight_hue.py in the folder you specified in the enigmalight.cfg
- Get an Key from your Hue Bridge
- Insert the Key and IP in the Script, import the right Gamut for your Hue.
- Start enigmalight
The script is prepared to use 3 Lamps. This are the 3 Lamps URLs. If you want a 4th you need to do some copy paste driven development . The Number you get from your bridge.
lurl = url + '2/state'
rurl = url + '1/state'
burl = url + '4/state'
Sometimes the color is not what i've excepted. Too much hard coded stuff.
This is more or less a proof of concept. Feel free to contribute.