Skip to content

PHT is a Theater Mode for Plex to switch your light(s) ON or OFF when you play or stop your movie.

License

Notifications You must be signed in to change notification settings

thboehi/Plex-Home-Theater

Repository files navigation

Logo

Plex Home Theater

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.

Installation

You can install the project using git clone and the follow these steps

  1. Get a token/username from your Hue Bridge
  2. Go to credentials_example.js and edit it with your Bridge Ip and token/username. After that, rename the file to credentials.js
  3. Run npm install on the root to download node modules
  4. Run node app.js to start the server or pm2 start app.js if you use PM2 (recommended)
  5. 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)

Configs

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.

Screenshots

App on Homescreen Web page default mode Webpage with debug mode activated

Changelog

See the list of changes that have been made to the project

[1.0.2] 31.07.2023

  • Added console to the website when debug mode is activated.

[1.0.1] 30.07.2023

  • Added logs file to keep track

[1.1.0] 10.11.2023

  • Added time to prevent the app being active in the afternoon for example.

[1.1.2] 15.11.2023

  • Final version (yes i skipped 1.1.1)

About

PHT is a Theater Mode for Plex to switch your light(s) ON or OFF when you play or stop your movie.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published