MariusRumpf / node-lifx

Node.js implementation of the LIFX LAN protocol :bulb:
MIT License
144 stars 28 forks source link

Callback for light.on + light.off? #20

Closed lukehorvat closed 9 years ago

lukehorvat commented 9 years ago

Hi. I've started building a CLI for LIFX bulbs, utilizing your package because it has a nice API. So thanks.

I'm just wondering, would it be possible for light.on and light.off to have a callback for when the operation completes? Maybe along with a timeout as well? I'm currently using a polling approach, but it's a bit messy.

MariusRumpf commented 9 years ago

Hi, cool to hear about your cli project. The LIFX protocol supports to send a confirmation package when requested in header (ackRequired). I have not come to implement this now #14 . If you wanna give it a try you could have a look at the fork https://github.com/WigWagCo/node-lifx which did some work already, didn't check it myself.