VoxCommando
Arduino & Other Home-made Gadgets (that work with VC!) => Arduino + MySensors => Topic started by: MrWolf on August 02, 2015, 09:32:49 AM
-
H guys,
Firstly I wanted to apologise to Kalle for taking so long to set this up! I tried to do a video for my channel today but my battery ran out on the camera :P I shall try again later when it's charged and will link the video here.
It works amazingly and looks beautiful behind my sofa, I can't thank you enough buddy, it's transformed the living room.
I had a question about whether there was a quick way to integrate the Hue plugin so that when creating, storing and recalling the colours on the LED strip vox would also do the same for Hue?
I'm presuming they're too separate for this to be possible but I thought I'd ask before I start manually syncing up the two colour libraries.
Thanks,
-P
xxx
-
Hi Paul, nice to hear you like it ;)
Most work did Dave to this project, because he has written the Arduino code ::bow
I can say nothing about the Hue, because I have no Hue - sorry. If the Hue use RGB color code, then maybe it is possible to use the color.xml
I'm curious about your video,
Kalle
-
The Hue colour format is of course, totally original in order to make it a PITA to work with. Colours look like this.
<?xml version="1.0" encoding="utf-8"?>
<!--A VoxCommando Payload file-->
<PayloadsRoot>
<payload>
<value>"sat":255, "hue":0</value>
<phrase>Red</phrase>
</payload>
<payload>
<value>"sat":255, "hue":5300</value>
<phrase>Orange</phrase>
</payload>
<payload>
<value>"sat":255, "hue":13500</value>
<phrase>Yellow</phrase>
</payload>
<payload>
<value>"sat":255, "hue":23500</value>
<phrase>Green</phrase>
</payload>
<payload>
<value>"sat":255, "hue":46000</value>
<phrase>Blue</phrase>
</payload>
<payload>
<value>"sat":255, "hue":48000</value>
<phrase>Purple</phrase>
</payload>
<payload>
<value>"sat":255, "hue":55000</value>
<phrase>Pink</phrase>
</payload>
<payload>
<value>"sat":80, "hue":15000</value>
<phrase>White</phrase>
</payload>
<payload>
<value>"sat":90, "hue":12000</value>
<phrase>Warm white</phrase>
</payload>
<payload>
<value>"sat":80, "hue":37500</value>
<phrase>Cool white</phrase>
</payload>
</PayloadsRoot>
-
Haha, if you can bring this in a python math script, then you have a converter :biglaugh
http://www.niwa.nu/2013/05/math-behind-colorspace-conversions-rgb-hsl/
http://www.rapidtables.com/convert/color/rgb-to-hsl.htm
-
Even with this conversion, colors will probably look different on (cheap) led strips and (expensive) hue lights. But the conversion looks doable, so maybe it's worth a try.
Otherwise you could still save your favourite led strip colors and try to find an equivalent hue color manually by testing.
-
Ok, a RGB to HSL converter is already in Python on board - https://docs.python.org/2/library/colorsys.html
but I don't understand the large "hue"value from the payload above for the phillips-hue.
-
No doubt this will help clear up your confusion. :biglaugh
http://www.developers.meethue.com/documentation/core-concepts#color_gets_more_complicated
(This is why James was making fun of the Philips Hue colour system in his post above.)
-
You can try scaling the hue value from whatever range python gives you to the range for the Philips hue.
Assuming python returns a value from 0 to 1 for the hue you can multiply this by 65280 to get the hue for Philips.
Hue does not reproduce very many colours accurately though so don't expect them to match. There are a lot of colours that the Philips Hue just can't do. It does red and violet and warm whites well though. ;)
-
Haha, good old Expensive toys. I'll have a proper look through this thread later. In fairness I'll probably only use a few colours anyway so I shall probably just program in some favourites and stick with them.
Here's my video as promised (not as good as Kalles) :) You can see how sexy my new sofa is:
Enjoy:
-P
-
Amazing Video :)
Thank you Paul
PS: I used in the video a strip with 300 LED's ;)