A Rust command line program for controlling a LIFX light bulb.
git clone https://github.com/russmack/lifxcmd.git
cargo build
./lifxcmd -h
USAGE:
lifxcmd [FLAGS] [OPTIONS]
FLAGS:
-e, --echo Display the current state of the device
--help Prints help information
-V, --version Prints version information
OPTIONS:
-a, --address <HOST ADDRESS> Specifies the address of the target device
-b, --brightness <BRIGHTNESS> Set the brightness of the device
-c, --colour <COLOUR NAME> Changes the colour
-d, --duration <TRANSITION DURATION> The duration of the colour transition
-f, --flash <FLASH COLOUR NAME> Specifies the name of the colour to flash
-h, --hue <HUE> Set the hue of the device
-i, --interval <FLASH INTERVAL> The length of the flash
-p, --power <POWER LEVEL> Changes the power level on/off
-s, --saturation <SATURATION> Set the saturation of the device
-n, --subnet <SUBNET> Specify the device subnet
Examples
Turn light on, with optional subnet.
./lifxcmd -p on -n 192.168.1.255
Change colour to slate_gray instantly, by colour name:
./lifxcmd -c slate_gray
Change colour to green instantly by hue, saturation, brightness:
./lifxcmd -h 140 -s 100 -b 100
A three second flash to coral:
./lifxcmd -f coral -i 3000
Turn light off.
./lifxcmd -p off
- Locate device
- Specify device
- Power on device
- Power off device
- Change device colour
- Specify duration of colour transition
- Flash another colour
- Specify length of flash interval
- Print current state of device
- Use HSB to specify colours
- List supported colour names
BSD 3-Clause: LICENSE.txt