Philips Hue

you have the info in the previous picture :smiley:

old thread here, but some new tricks.

I’ve been working with zoe sandoval to add extensions and make a more modular approach for this puppy. Took a moment to clean-up the documentation as well, so there’s at least a little get you started.

If you’re interested, you can take a look:

github.com/raganmd/touchdesigner-hueControl

1 Like

Hello @raganmd I tried few times your files in 2 different computer, and get always same problem trying to connect to my bridge with 192.168.2.4 ip


And i have library installed and everything in the place… becasue my old files still working

any idea?? :open_mouth:

Regards
Javo

Ahhh - I think I need to update some of the documentation.

First, make sure that you’re starting with a toe file you’ve already saved to a location on your computer. Next use the TOX from the directory called “release”. When you drop that TOX into your project it should do a little house keeping and run some python scripts.

Next, are you pressing the button on your hue bridge before you pulse the “Set-up Individual Lights” parameter? That’s the bit that should handshake with the hue and make sure you’re able to retrieve the dictionary of lights.

Thanks! now it works.

:smiley:

Glad to hear it’s working!

Hi,

I want to use this Hue node for one of my project, but when I import the TOX, I have an error and I don’t know how to fix that. Can someone helps me ?

Thanks,


Hi MFagniard,

Matthew here - what version of the tox are you using?

Hi @raganmd,

Sorry for the latish reply.

I’m using the TOX in the release folder. I don’t have any error when i’m importing the TOX.
I’m entering the IP adress and pressing the button of the Hue bridge, and the error appears when I’m pressing the set up individual lights parameter.

Thanks

Can you post the error message from the text port?

Hi @raganmd,

That’s the error.

Thanks

hey MFagniard - I’ve been wracking my brain trying to figure out what was going on here, and I think it’s actually the build you’re using.

Looks like you’re still on 2017.16620. Can you try updating your Touch build to see if that makes a difference?

Hi @raganmd,

I’m having some problems connecting the tox to my bridge too. Here are the text port errors I am getting:

I have followed everything methodically (use a saved toe file and use the tox in the release folder, etc.) and am able to control the lights from my computer with code, but am having several problems getting it to work in TD.

Hope you can help!

Thanks

Hi @charliej99 - what I can see right off the bat is that the python version for the latest TouchDesigner is 3.9 and this module hasn’t been updated since the change from Python 3.7. I should be able to look at this during the week and see if I can get an update pushed to github.

1 Like

Ah okay, thank you! That would be amazing if you could give it an update!

Hi @charliej99 - I just pushed some updates. You will need to download the tox from the release folder again, but you should now be able to run this in the latest Version of TouchDesigner without issue.

You will need a stand alone version of Python 3.9 installed, but otherwise should be good to go.:slight_smile:

1 Like

Thank you Matt! I really appreciate you updating it this quickly!! Works great

1 Like

Hi Matt,

how can i achieve a transition between colors?

For Example i have constant TOP where the colorr colorg colorb are changing constantly.

If i use a script which then pulses the UpdateAll Button the frame rate goes down and i get time out errors from the IP.

I have two hue play lightbars they react kinda ok and i have one Lightstrip which is sometimes reacting and then not, all connected to the same bridge.

Is there a better way to submit color changes in a short time without using the updateall button via script? I think it is triggered several times in a second.

thank you

TD Hue Control Updates

Since first making this component I’ve fielded a good set of questions about working with a third party library, and the hassles that come along with that in TouchDesigner. So, to help resolve those issues I’ve recently re-written this TOX to instead use the requests library that ships with Touch. That means that this is now a truly drag and drop tox that you can add to your network without needed any extra python libraries for this to work.

Changes also now push immediately from parameters to to lights - so you can think of this as when you make a change to the custom pars, those requests for updates go to the lights right away. This does have some performance slow-downs, and on my todo list is to improve the response rate and performance for this TOX.

Hope this helps folks who are interested in controlling Hue lights from TouchDesigner.

2 Likes

Hey @raganmd, first of all, thanks for this great tox, worked out of the box here! Tested with build 2022.31030 and then with 2022.32660. (Actually, one thing didn’t work: the “All lights” functionality. But I’m more interested in controlling each light individually, so ok by me)

I’m having some issues and doubts though. I wanted to know if these are expected or if they are actual bugs:

  1. Performance
    I’m not sure if this is what you meant with “some performance slow-downs”, but even if I’m just sliding the values in the parameters my FPS goes down dramatically (from 60 to 4). Is this normal?

    I also tried creating a simple 3x1 resolution (I have 3 lamps) rampTOP > topToCHOP > shuffleCHOP > resampleCHOP sequence and exporting the values to the base_hueControl parameters, resampling to 1 sample/sec and everytime it hit’s that sample the FPS drops considerably…

  2. Single R G B colors don’t vary in intensity
    When experimenting with low RGB values (like 0.1,0,0) and high RGB values (1,0,0), I don’t see any changes on the lamp color/intensity. Should I just set a color and then use the Brightness instead?

  3. Looking inside your tox I noticed that for some values the glsl_color_space_converter glslTOP returns some nan values, is this expected? For instance, setting the RGB parameter to 0,0,0 gives me a white lamp color and that GLSL TOP returns nan,nan,1.

Regarding the performance issue, I was looking into the Philips Hue developers documentation and found that there’s a “Hue Entertainment API” that can “stream lighting effects to multiple lights in parallel with a high update rate”. It changes the communication with the lights from HTTP to UDP, apparently making it much faster. You’ve probably seen this but still thought it was worth mentioning.

EDIT: Oh, one last question, regarding issues and bugs with your tox, do you prefer to keep on this thread or should we post them on the GitHub Issues?