A python implementation for Lumiere (community-controlled lighting) integration with Lifx lights.
- Get code.
- Install dependencies:
pip install -r requirements.txt
Utilize environment variables to configure. Optionally put in a .env
file.
LUMIERE_API_DOMAIN
: URL of Lumiere API server to connect websocket to. Defaults tohttps://api.lumiere.lighting
.LUMIERE_LIFX_API_KEY
: Lifx API key to use.LUMIERE_LIFX_LIGHTS
: Lifx light selector to update specific lights; defaults toall
.LUMIERE_LIFX_BRIGHTNESS
: Brightness to set with lights; should be between 0 and 1; defaults to0.85
.LUMIERE_LIFX_DURATION
: Seconds on light transition time; defaults to1
.LOG_LEVEL
: Python logging level; defaults to30
.
Run with:
python lumiere-client-lifx/client.py
Install dependencies.
- (see above)
Install the startup/service script.
- Copy the
init.d
script with something like:sudo cp ./deploy/lumiere-client-lifx.init.d /etc/init.d/lumiere-client-lifx && sudo chmod +x /etc/init.d/lumiere-client-lifx
- Update the script as needed. Mostly this will just be updating the
dir
variable to point where the code is installed. - Install to be able to be run on startup.
sudo update-rc.d lumiere-client-lifx defaults