# Prerequisits 1. *nix machine 2. **[Phue](https://github.com/studioimaginaire/phue)** python library. Install using pip
pip install phue3. A CyberPower UPS device connected to your machine 4. 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 for 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