Requirements
This app is the standalone equivalent of the HelloHue.bundle Plex Plugin. This is not a Plex Plugin, as Plugins will be deprecated soon.
This application detects when a media is playing, paused or stopped on your Plex Clients. Then it checks the client name, and the user who owns the stream. If it matches your criteria, it triggers your lights with the actions you have set up.
git clone https://github.com/ledge74/HelloHue.git
cd HelloHue
npm i
npm start
Plex needs to send webhooks to HelloHue in order for the channel to work. For example, if HelloHue uses the default port and is on the same machine as your Plex Media Server, the webhook url will be :
http://127.0.0.1:4568/
Read this support article in order to learn how to create a Plex webhook
http://127.0.0.1:4568/
if you are on the machine that runs HelloHue.
Plex Player name
you can find your Plex Players in your Plex Media Server -> settings -> Authorized devices. Only put ONE client per room. If your have two clients in the same room, activate an other room and fill the settings with the other clients name and the same lights names.Plex Users names
you can find the list of users in Plex Media Server -> settings -> home users. You can put multiple users (comma separated values, case sensitive).Activate this room
in order for light actions to get triggered.Three endpoints are available. You may use them to integrate with homebridge or home-assistant for example :
GET /api/start
GET /api/stop
GET /api/status
1
if HelloHue is started0
if HelloHue is stoppedHelloHue is also available as a Docker image
version: "3"
services:
hellohue:
container_name: hellohue
volumes:
- ./hellohue:/app/db
ports:
- "4568:4568"
environment:
- TZ=Europe/Paris
network_mode: host
restart: unless-stopped
Integrate with homebridge and homebridge-http
{
"accessory": "Http",
"name": "HelloHue",
"switchHandling": "yes",
"http_method": "GET",
"on_url": "http://127.0.0.1:4568/api/start",
"off_url": "http://127.0.0.1:4568/api/stop",
"status_url": "http://127.0.0.1:4568/api/status",
"service": "Switch",
"brightnessHandling": "no",
"brightness_url": "http://localhost/controller/1707/%b",
"brightnesslvl_url": "http://localhost/status/100054",
"sendimmediately": "",
"username" : "",
"password" : ""
},
- platform: command_line
switches:
hellohue:
command_on: "/usr/bin/curl -X GET http://127.0.0.1:4568/api/start"
command_off: "/usr/bin/curl -X GET http://127.0.0.1:4568/api/stop"
command_state: "/usr/bin/curl -X GET http://127.0.0.1:4568/api/status"
value_template: '{{ value == "1" }}'
friendly_name: HelloHue
I've developed HelloHue on my free time, so if you like it please think about buying me a beer!