chendo / lifx-http

A HTTP API for controlling LIFX devices.
MIT License
91 stars 13 forks source link

request: turn light on/off with a fade #2

Open bjeanes opened 10 years ago

bjeanes commented 10 years ago

It seems like the only way to do this right now is to transition to a color with a duration, but I want to turn the light on gradually using whatever the previous color was. Presumably, I could fetch the light first to get the color values and play it back with brightness=1.0 and brightness=0.0 but that's not so nice.

chendo commented 10 years ago

Any ideas what the API for that would look like?

bjeanes commented 10 years ago

Well the first thing I tried was PUT /lights/<identifier/off?duration=5s so... that?

chendo commented 10 years ago

I had a go at doing this, unfortunately by setting a color with brightness 0 and then powering off would mean when it's powered on, it'll still be 'off'. There's going to be a firmware update that'll add a message which would let me implement this properly, so I'll leave this issue open until I can.

https://github.com/LIFX/lifx-gem/issues/20