lifx client
Control your lifx system through the command line.
Install
npm install -g lifx-client
Usage
turn all lights on;
lifx -1
turn all lights off:
lifx -0
turn group:Room on:
lifx -g 'Room' -1
turn group:Room to the color blue:
lifx -g 'Room' -C blue
turn group:Room to the color limegreen with a brightness of 20% and saturation of 42%:
lifx -g 'Room' -C limegreen -B 20 -S 42
pulse group:Room to the color limegreen from the color red with a brightness of 20% and saturation of 42%:
lifx -g 'Room' -p -C limegreen -f red -B 20 -S 42
Try using aliases:
alias room="lifxcli -g 'Room'"
Configuration
This client uses rc-yaml
to grab config options. you can use rc
files for
specifying default cli arguments. rc
will look for rc files with the name
.lifxrc
, so for instance you can store your lifx config in ~/.lifxrc
.
More info on where rc
looks is available here.
( I'd suggest saving your token
here )
token: [LIFX_API_TOKEN]duration: 2 // default the duration to 2 seconds
command line args
Usage: node lifx -k, --token=STRING the token in plainText -T, --toggle toggle the power of the bulbs -1, --on turn on the lights -0, --off turn off the lights -C, --color=STRING set color -H, --hue=FLOAT set color using hue -K, --kelvin=FLOAT set kelvin -B, --brightness=FLOAT set brightness -S, --saturation=FLOAT set saturation -I, --infrared=FLOAT set infrared -i, --id=STRING