Page 1 of 1

Change hue brightness

Posted: Tuesday 27 June 2017 15:32
by dennusb
Hi,

I have a bunch of Hue lights, and i turn them on and off with Lua scripts (working fine). But i would also like to be able to set the brightness per light, but i cannot find how to do that...
Is there a simple way to post the intensity of the light from a LUA script?

Re: Change hue brightness

Posted: Sunday 20 August 2017 21:02
by commentator
Yes

Code: Select all

 os.execute('curl -s -H "Accept: application/json" -X PUT --data \'{"on":true, "sat":'..sat..', "bri":'..bri..',"hue":'..hue..'}\' http://<huebridgeip>/api/<seedocumentatioontogettheapikeyhere>/lights/<device number in hue bridge eg 4/state')
you can post these values:

sat
bri
hue

play a bit with them. Brightness is the parameter you're looking for