Version 1.1.2
Plex Home Theater turns off your light as soon as you start a movie and turn on your lights as soon as you stop it.
This is a small app coded in JavaScript that runs on NodeJS.
You can install the project using git clone and the follow these steps
- Get a token/username from your Hue Bridge
- Go to credentials_example.js and edit it with your Bridge Ip and token/username. After that, rename the file to credentials.js
- Run
npm install
on the root to download node modules - Run
node app.js
to start the server orpm2 start app.js
if you use PM2 (recommended) - Go to app.plex.tv/webhook and add a webhook to your machine, for example (if on the same machine)
http://localhost/webhook
You can go to yourmachineip:80 with your web browser to edit the configs or directly from config.json (needs a restart if changed from file)
Player Name will be the name of your TV. If you don't know it, just activate the debug mode and it will show when you play, pause or resume a movie.
Users The actions will be performed if the user is one of the two that are configured. Like for the player, just try with debug mode to see your username. If you live alone, just leave the second user empty or put your username twice.
Light number will be the ID number of your Philips Hue light. For the moment, only one can be controlled. To find the number of your light, just go to http://<bridge_ip_address>/api/<username>/lights
and all your lights will be listed.
Username = token
Debug mode will turn on console logs and in the web interface, a console will be shown.
See the list of changes that have been made to the project
- Added console to the website when debug mode is activated.
- Added logs file to keep track
- Added time to prevent the app being active in the afternoon for example.
- Final version (yes i skipped 1.1.1)