From 8c102828adbcd97f7ee1de53ddc8c2f4d14afe1e Mon Sep 17 00:00:00 2001 From: Rich Date: Sat, 9 Apr 2016 20:28:22 -0400 Subject: [PATCH] Big update to this readme file thing... --- README.md | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0a2f5f4..faabe1c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,32 @@ -

Prerequisits:


-1. "Phue" python library, install by running +# Prerequisits +1. **Phue** python library. Install using pip
pip install phue
2. A CyberPower UPS device connected to your machine -3. CyberPower's pwrstatd daemon \ No newline at end of file +3. CyberPower's pwrstatd daemon (PowerPanel) + * Download here: http://www.cyberpower-eu.com/products/software/pp_linux.htm + +# Description + This program uses CyberPower's pwrstatd daemon and the Phue Python library to turn + off your Hue lights after a brief power outage. + + The program routinely query's your Hue bridge to a list of lights and stores the ones + that are currently off. It also queries pwrstat to determine if we are running on + MAINS or BATTERY power. When it detects that we are running on BATTERY power, it + waits for MAINS power to return, then turns off the Hue lights that were off prior + to the outage. + +# Usage +**Example #1:** Show help +``` +# hue_off.py -h +Options Usage: +-b, --bridge | IP address of your Hue Bridge
+-c, --createuser | Create a new user on your Hue Bridge
+-i, --interval | Set how often (in seconds) to check the pwrstatd log. Defaults to 60 +``` + +**Example #2:** Start and connect to Hue Bridge at IP 192.168.1.101 +``` +# hue_off.py -b 192.168.1.101 +``` +