The Unofficial LIFX CLI
Project description
The Unofficial LIFX CLI
This is a work in progress to create a feature-rich LIFX CLI.
This project is not affiliated with or endorsed by LIFX.
Installation
pip3 install lifx-cli
Authentication
Authentication is done using your token stored in ~/.keys. This can be configured manually or by running lifx --configure.
Example ~/.keys ini file:
[lifx]
token = FAKE_TOKEN
Alternatively, you can override this value by setting the LIFX environment variable:
export LIFX=FAKE_TOKEN
Refer to the documentation in order to generate your own token.
Targeting Lights
The LIFX CLI primary uses device/group/scene IDs to operate, however LIFX does provide multiple options for the light 'selectors'. While not yet officially available via the CLI, you can tap into these options by prefacing your light ID accordingly (if there are spaces in the name, simply enclose in ").
lifx lights --toggle all
lifx lights --toggle "label:Left Lamp"
lifx lights --toggle "group: Upstairs Lights"
lifx lights --toggle "location_id:1d6fe8ef0fde4c6d77b0012dc736662c"
lifx lights --toggle "location:Home"
Finding the Proper ID
In order to get a listing of device and group IDs, simply run --list with the lights sub-command.
lifx lights --list
In order to get a listing of scene IDs, run the same command for scenes.
lifx scenes --list
Setting colors
Colors can be set by name, e.g. red, yellow, but the CLI also supports all methods to set the color that the API supports.
In order to see a full list of supported methods run lifx colors --list. You can also validate a color's HSBK (hue, saturation, brightness, and kelvin) via lifx colors --color red.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lifx_cli-2.4.3.tar.gz.
File metadata
- Download URL: lifx_cli-2.4.3.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c0315ac43810fc0ac750b59c9a3f9231fd3b43f07a2a61470953d1fa53ea112
|
|
| MD5 |
896729af8dc092df8a139bea5b245775
|
|
| BLAKE2b-256 |
5a1161dbeceb4a5aabaf32c8fbcf5d50621755b92cea4549768f2e76ff467091
|
File details
Details for the file lifx_cli-2.4.3-py3-none-any.whl.
File metadata
- Download URL: lifx_cli-2.4.3-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c40633c8595bcd9abffee559bf15d3dc3fbf248da0ee3cc824ad4111ac4ef1d
|
|
| MD5 |
1eca10cf16c8f89743e5b9069720fe11
|
|
| BLAKE2b-256 |
40c029dbac9b91c0f3e7b74227e35082408694ded9e4bde4b9b6782a099f438a
|