Program to integrate Plex with the Philips Hue.
This program is meant to sync your Philip Hue lightbulbs with your Plex playback. It does the following:
- Slowly dims your lights until they are off whenever a movie starts.
- Brings your lights to half-brightness when a movie is paused.
- Slowly brightens your lights when a movie is stopped until it is at full brightness.
Video: https://www.youtube.com/watch?v=W3FJ6tHxiDg
- Ruby installed (at least version 1.9.3) and ruby-dev.
- Your Philip Hue Hub up and configured.
- A PlexPass membership (Sorry about this, but the API to see when something is played is a PlexPass feature :( )
-
Change to the
/opt
directory. -
Clone this repo on your server:
git clone https://github.com/bstascavage/plexHue.git
-
Change to the plexHue directory
-
Install the blunder gem (http://bundler.io/)
gem install bundler
-
Install the gem dependecies:
bundle install
-
Copy the init script to your init.d directory:
cp debian/init/plexHue /etc/init.d/plexHue
-
Setup your config file (see below for details on parameters)
-
Press the HOME button on your Philips Hue Hub
-
Start the plexHue service
service plexHue start
-
Check the plexHue log to ensure that the program paired with your hub:
`tail -f plexHue.log`
server
- IP address of your Plex server. Defaults to localhost
. Optional.
machineIdentifier
- Unique identifier of your Plex client. You can find this by starting up a video on your device and then running bin/getMachineID.rb
and finding your device in the output. Required.
api_key
- Your Plex API key. This can be found by searching for your device here (it is the 'token' field): https://plex.tv/devices.xml. Required.
hub_ip
- IP addres of your Philips Hue Hub. You can get this by visiting http://www.meethue.com/api/nupnp while on the same network as your hub. Required.
starttransitiontime
- How long it takes to dim the lights when starting a video, in multiples of 100ms. Defaults to 3 seconds. Optional.
pausedtransitiontime
- How long it takes to brighten the lights when pausing a video, in multiples of 100ms. Defaults to 3 seconds. Optional.
stoptransitiontime
- How long it takes to brighten the lights when stopping a video, in multiples of 100ms. Defaults to 3 seconds. Optional.
lights
- Array of names of the lights you want to use, in the format: ["light1", "light2", "light3"]. Required.
- This software is still in alpha. There are plenty of features and options that I plan on implementing, plus more streamlined support for different OSes. Bug fixes take priority over features. If you have any issues, or anything you'd like added, please open a Github issue.
- This program is developed with the Hue Lux bulbs, though regular Hue bulbs should work just fine. Because of that, there is no support for color at the moment. This might change down the road, but not anytime soon.