blink hue lights and show desktop notification
I tend to forget making breaks, so I created this little script to remind me ever hour to make a break by blinking my lights and showing a desktop notification.
- huePyApi (Github)
- made for MacOS
python3 -m pip install git+https://github.com/Felix-Pi/huePyApi
Configuration is pretty easy. config.py
contains ip
and api_key
of the philips hue bridge.
hueStudyBreakTimer.py
contains the timers parameter
hueStudyBreakTimer.sh
contains path to hueStudyBreakTimer.py
Creation of api_key is not part of this script (More information: Hue API)
Change path
ip = '' #hue bridge ip address
api_key = '' #hue bridge api key
hue = Hue(ip=ip, api_key=api_key, notification=True) #notification can be turned on/off
hue.timer(room_id=1, planned_runtime_in_hours=10, learn_perioud_in_min=60, break_perioud_in_min=5)
Usage: hueStudyBreakTimer.sh [OPTIONS]
starts hueStudyBreakTimer
Options:
stop stops hueStudyBreakTimer
Action > execute shell script
sh PATH/hueStudyBreakTimer.sh &>/dev/null &
sh PATH/hueStudyBreakTimer.sh stop