--to set Hue Lamp ID 14 to red
set theLightID to "14" --id of light as string
set theOn to true --boolean
set theSat to 254 --number 0 to 254
set theBri to 254 --number 0 to 254
set theHue to 0 --number 1 to 65535
set theTime to 0 --transition time in 1/10s
------------------------------------
tell application id "com.figure53.QLab.4" to tell front workspace
set theBridgeIP to (get notes of cue "DATA") --IP of a Hue Bridge as string in the notes of a cue numbered DATA
set theUserID to (get q list name of cue "DATA") --UserID issued by Hue Bridge as string in the q name of a cue numbered DATA
set thedata to "{\"on\":" & theOn & ", \"sat\":" & theSat & ", \"bri\":" & theBri & ", \"hue\":" & theHue & ", \"transitiontime\":" & theTime & "}"
do shell script "curl --request PUT --data " & quoted form of thedata & " http://" & theBridgeIP & "/api/" & theUserID & "/lights/" & theLightID & "/state/"
end tell