Controlling Hue Lights within Max4Live
Hello there,
I am trying to control hue lights from within ableton using max. I have two problems which I have been banging my head against the wall with and probably have a relatively simple solution, deperately hoping for help.
1. I am unable to turn my phillips hue lights on and off with maxURL. I can change their hue, saturation and brightness, but on/off evades me.
using hue’s debugging tool, I can send a message body of {“on”: false} and turn the light off:
######### data using hue’s api debugger ########
http://<bridgeIP>/debug/clip.html
message body: {"on": false} (or true, to turn them on, works fine)
##############################################
within ableton I’ve used the following dict @embed successfully to adjust the light, but not to turn it on or off:
{ "http_method”: “put”,
“post_data”: {
“sat”: 201,
”bri” : 500,
“hue”: 20000
}
}
I thought I could set post_data to contain “on”: false, to turn the light off but I get an error
Things I’ve noticed: the max editor changes false to 0, it doesn’t help to put false in quotes, but I don’t know why this isn’t working.
2. My second problem is that I’d like to create knobs/sliders to control the lights from within ableton and I haven’t been able to figure out how to do it. I know how to create a slider/knob and have it effect values in an dict using dict.pack and triggers, but how to get the knob/value changes to push/live stream to the url as post_data evades me. For a working static change I use a bang connected to the above dict @embed connected to maxurl, but I’m not clear on how to get live adjustments pushed.
I’d appreciate any help that you can give me. If I can’t get this to work by the end of the weekend then I’ll be stuck using an app on my iPhone/iPad to control the lights, which will work, but means juggling another interface instead of being able to simply work within ableton.
MANY thanks from
a real noob!
lysha