Author Topic: Finally set up my wonderful LED controller from Kalle, Hue integration?  (Read 4646 times)

0 Members and 1 Guest are viewing this topic.

MrWolf

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
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

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Finally set up my wonderful LED controller from Kalle, Hue integration?
« Reply #1 on: August 02, 2015, 10:52:27 AM »
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
« Last Edit: August 02, 2015, 11:36:29 AM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Finally set up my wonderful LED controller from Kalle, Hue integration?
« Reply #2 on: August 02, 2015, 12:58:42 PM »
The Hue colour format is of course, totally original in order to make it a PITA to work with.  Colours look like this.

Code: [Select]
<?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

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
***********  get excited and make things  **********

Dave

  • $upporter
  • Sr. Member
  • *****
  • Posts: 139
  • Karma: 31
    • View Profile
Re: Finally set up my wonderful LED controller from Kalle, Hue integration?
« Reply #4 on: August 03, 2015, 11:33:47 AM »
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

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Finally set up my wonderful LED controller from Kalle, Hue integration?
« Reply #5 on: August 03, 2015, 01:07:22 PM »
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.
« Last Edit: August 03, 2015, 06:21:26 PM by jitterjames »
***********  get excited and make things  **********

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Finally set up my wonderful LED controller from Kalle, Hue integration?
« Reply #6 on: August 03, 2015, 02:41:18 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Finally set up my wonderful LED controller from Kalle, Hue integration?
« Reply #7 on: August 03, 2015, 06:19:29 PM »
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

  • $upporter
  • Sr. Member
  • *****
  • Posts: 209
  • Karma: 4
    • View Profile
Re: Finally set up my wonderful LED controller from Kalle, Hue integration?
« Reply #8 on: August 05, 2015, 02:55:48 PM »
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
Home automation guides for idiots like me by an idiot (me)...
https://www.youtube.com/user/wolfsweb

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2319
  • Karma: 47
    • View Profile
Re: Finally set up my wonderful LED controller from Kalle, Hue integration?
« Reply #9 on: August 05, 2015, 03:24:52 PM »
Amazing Video  :)

Thank you Paul

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