konsumer / tplink-lightbulb

Control TP-Link smart lightbulbs from nodejs
MIT License
191 stars 32 forks source link

Can you dim the light with this library? #39

Closed mscheel closed 5 years ago

mscheel commented 5 years ago

I would like to set the light to 50% brightness (dim, not fully lit), is that possible?

I see brightness within the hsb command but I think that is a different brightness than what is in the Kasa app and changes how bright the bulb is lit. At least that is what my tests have found.

Thank you, this is a great library for turning on and off and changing color.

konsumer commented 5 years ago

Use the -b (or --brightness) flag for on:

tplight on -b 50 <IP>

You can also set transition time if you want a silky-slow dim:

tplight on -b 50 -t 5000 <IP>

See tplight on --help for more info.

The brightness in hsb is for color bulbs, so you can set a HSB color. it works similarly, but a bit different, and only for color bulbs. using HSB-colors, you can do interesting stuff, like scrolling through a brightness of blue, for example.

konsumer commented 5 years ago

Closing, but feel free to comment, if you have more questions related to this.