This project allows you to control LIFX lights through Plex webhooks. It listens for events from Plex and adjusts the lighting based on the event type (play, pause, stop) and the device that triggered the event.
- Clone this repository to your local machine.
- Navigate to the project directory.
- Run
npm install
to install all the necessary dependencies.
- Run
npm run setup
to start the setup process. - You will be prompted to enter your Plex server URL, Plex Authentication Token, and LIFX Authentication Token. Enter these details as prompted.
- Next, you will be asked to enter a series of device pairings. For each pairing, you will need to enter a Plex Device UUID, a LIFX Group ID, and a light action on stop (either 'on' or 'off').
- Once you have entered all your pairings, type 'done' to finish the setup process. A
config.json
file will be created with your entered details.
- Run
npm start
to start the application. - The application will now listen for Plex webhook events and adjust your LIFX lights accordingly.
The UuidHelper.js
script can be used to log the UUID of any device that triggers a Plex webhook event. This can be useful for finding the UUID of a device to use in the setup process. To use this script, run node UuidHelper.js
and trigger a Plex webhook event from the device you want to find the UUID of.
See this page for instuctions on retrieving your Plex Auth token: https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/
See this page for details on setting up Plex Webhooks. The Plex URL used in this application is the full URL and port of your Plex instance (e.g. http://192.168.1.10:32400
). Plex Webhooks should be setup according to where the plexWebhooks.js is accessible by Plex and the port plexWebhooks is running on, which is set to 3101.
Kevin Stock - kevin@kevinstock.net - http://www.kevinstock.net
This project is licensed under the MIT License.