This release is a pre-release and may not be stable for production use.
licht is a command-line program (including a GTK applet) which
fetches info from a local Philips Hue bridge in your network and
enables you to apply basic operations, such turning lights on/off,
dimming, color-temperature changing, etc.
I was looking for a lightweight program for Philips Hue, but unfortunately most don't run (stable) on Arch linux, so I decided to write it myself.
Prerequisites
This program mainly uses following python3 modules
- requests
- pyyaml
- pycairo
- PyGObject
The PyGObject dependencies additionally require some packages to be installed on your distribution. For a detailed overview see https://pygobject.readthedocs.io/en/latest/gettingstarted.html.
For Arch linux use:
sudo pacman -S python cairo pkgconf gobject-introspection gtk3
Install
pip install licht
For installing from source, clone the repository, and run
cd licht
python setup.py install --user
or create a virtual environment with
pipenv install
pipenv install -e .
To activate the virtual environment run
pipenv shell
or start every command with pipenv run.
Usage
To start a daemon, run licht --daemon.
usage: licht [-h] [-d] [-a] [--lights] [--groups] [--scenes] [-l <light-id>] [-g <group-id>] [-s <scene-id>]
[-p <subpath>] [-o {true,false,1,0,yes,no,y,n}] [-b <bri-value>] [-t <color-temp-value>] [-u <json-string>]
[--register] [-c <path>] [--section <section>] [--dark-icon] [--output <path>] [-v]
options:
-h, --help show this help message and exit
-d, --daemon Run the Licht applet as a daemon process
-a, --app, --applet Run the Licht applet
--lights, --list-lights
List the index of lights in the network
--groups, --list-groups
List the index of groups in the network
--scenes, --list-scenes
List the index of groups in the network
-l <light-id>, --light <light-id>, --light-id <light-id>
Light-id for state change
-g <group-id>, --group <group-id>, --group-id <group-id>
Group-id for state change
-s <scene-id>, --scene <scene-id>, --scene-id <scene-id>
Scene-id for state change
-p <subpath>, --subpath <subpath>
Subpath for state change
-o {true,false,1,0,yes,no,y,n}, --on {true,false,1,0,yes,no,y,n}
Toggle lights on
-b <bri-value>, --bri <bri-value>
Update for the brightness value [0-255]
-t <color-temp-value>, --ct <color-temp-value>
Update for the color temperature value [0-65535]
-u <json-string>, --update <json-string>
Update body for the PUT request
--register Authenticate licht and receive a username from bridge
-c <path>, --config <path>
Path to the config file
--section <section> Section in the yaml file to be parsed
--dark-icon Use a dark icon on systray (for light themes)
--output <path> Set the path of the output log-file
-v, --verbose Run program in verbose mode
Configuration
licht works with both command-line arguments as well as YAML
configuration files (the first takes precedence over the latter). To
set your desired defaults, edit the configuration file
licht_example.yml and place it in either
~/.config/licht/licht.yml~/.config/.licht.yml~/.licht/licht.yml~/.licht.yml
Metadata
Release files for licht 0.1.dev1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| licht-0.1.dev1.tar.gz | 14.7 kB | Without provenance | Details for licht-0.1.dev1.tar.gz |
Release files / licht-0.1.dev1.tar.gz
| Download URL | licht-0.1.dev1.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
401e894171a202f1eb7da156dfd75e72bf8431e74ceb9f64acaa62e2bd10496c
|
|
BLAKE2b-256 checksum How to use checksums |
2000c8481c2984570272bb767e3d13b071c861586277f0427115876abe71f107
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for licht 0.1.dev1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.