News:

HOT TIP! Commands and groups can be copied and pasted directly from your command editor to the forum, and vice versa. This makes sharing command XML on the forum much easier!

Main Menu

Finally set up my wonderful LED controller from Kalle, Hue integration?

Started by MrWolf, August 02, 2015, 09:32:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrWolf

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

Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

Kalle

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
***********  get excited and make things  **********

jitterjames

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>

Kalle

***********  get excited and make things  **********

Dave

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.

Kalle

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.
***********  get excited and make things  **********

nime5ter

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.)
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

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. ;)

MrWolf

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: https://www.youtube.com/watch?v=UhUIT6_N0DE

Enjoy:

-P
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

Kalle

Amazing Video  :)

Thank you Paul

PS: I used in the video a strip with 300 LED's  ;)
***********  get excited and make things  **********