I am using the following script: https://github.com/callil/SparkHue/blob/master/sparkhue.ino
This is working great besides the fact that it only lets me control that one light with id 3. What is I have multiple light ID's I want to turn on / off with the light API. Do I need to make multiple calls for each?
client.println("PUT /api/deviceAddress/groups/1/action HTTP/1.1");
client.println("Connection: keep-alive"); //
client.println("Host: 192.168.1.11"); //same as server
client.println("Content-Type: text/plain;charset=UTF-8"); //
client.print("Content-Length: "); //param
client.println(11+len); //brightness string + val length
client.println(); // blank line before body
client.print("{\"bri\": ");
client.print(val); //value of potentiometer
client.println("}");
Serial.println("sent");