Python script to intgrate Philips Hue lights with Philips Ambilight TVs for a room wide Ambilight effect.
Install simplejson:
emerge -av simplejson # for Gentoo (python2_7-target must be set)
pacman -S python2-simplejson # for Arch or
yum install python-simplejson # for Fedora (python2 only)Make sure you have pip installed and use it to get the latest version of phue:
pip2 install phue # all distributionsTo never manually restart the script you can integrate it with systemd. systemd detects when the script exits because it lost connection to the TV or bridge and restarts it after a configured time period.
cp systemd/user/ambihue.service ~/.config/systemd/user/
# adjust path and restart-time in the service-file
systemctl --user enable ambihue
systemctl --user start ambihueNote, that you need to press the bridge-button before the first start of ambihue, regardless wether you want to integrate it with systemd.
Configuration can be done in the first lines of the ambihue-script itself:
- Configure IP adress of Ambilight TV
- Configure IP adress of HUE bridge
- assign HUE light numbers to zones of the Ambilight TV
- Press the connect button of the Hue bridge (only the first time you run this script) run
python2 ambihue.py