https://github.com/codingchili/lifx-circadian
Control LIFX lamps using cron expressions with the LAN protocol for polyphasic sleep
https://github.com/codingchili/lifx-circadian
lifx lifx-lan-protocol polyphasic python web-components
Last synced: 4 months ago
JSON representation
Control LIFX lamps using cron expressions with the LAN protocol for polyphasic sleep
- Host: GitHub
- URL: https://github.com/codingchili/lifx-circadian
- Owner: codingchili
- License: mit
- Created: 2019-11-18T18:59:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-03T12:35:24.000Z (almost 6 years ago)
- Last Synced: 2025-04-07T17:31:26.334Z (about 1 year ago)
- Topics: lifx, lifx-lan-protocol, polyphasic, python, web-components
- Language: JavaScript
- Size: 99.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lifx-circadian
Small python script to control on/off for LIFX lamps using the LAN protocol. The LIFX application has support for configuring day/nighttime cycles but does only support monophasic sleep, how traditional.
More information on alternatives to monophasic sleep here: [polyphasic.net](https://polyphasic.net/)

_Web interface in progress._
### Installation
Requires python 3.6.3+ for asyncio.
```console
pip install aiocron, lifxlan, pyyaml
cd web
npm install && polymer build
cd ..
python main.py
```
### Configuration
This is the sample configuration
```yaml
---
lamps:
- name: "Candy"
schema:
- power: False
transition: 180
cron: "25 21 * * * 0"
- power: True
transition: 60
cron: "15 1 * * * 0"
- power: False
transition: 180
cron: "45 3 * * * 0"
- power: True
transition: 60
cron: "40 7 * * * 0"
- name: "LIFX Flory"
schema:
- power: True
brightness: 0.5
saturation: 1.0
transition: 60
color: '#ff00cc'
cron: "49 19 * * * 0""
```
Replace lamp name with the label of the discovered lamps.
Lamps will start to power up/down when the expression triggers over time, as defined by the transition configuration.
# Gaming mode
Supports League of Legends integration, uses a lifx lamp to show the health of the active player.
Run with
```
python main.py --lol
```
Requires a League of Legends match to be running.