All Projects → mpbzh → homebridge-plex

mpbzh / homebridge-plex

Licence: MIT license
Plex plugin for homebridge: https://github.com/nfarina/homebridge

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to homebridge-plex

homebridge-automation-switches
A flexible automation switch for Homebridge: https://github.com/nfarina/homebridge
Stars: ✭ 96 (+65.52%)
Mutual labels:  home-automation, homebridge, homebridge-plugin
homebridge-wink3
Homebridge plugin for wink.com
Stars: ✭ 53 (-8.62%)
Mutual labels:  home-automation, homebridge, homebridge-plugin
homebridge-telegram
HomeKit/Homebridge driven notifications via Telegram
Stars: ✭ 47 (-18.97%)
Mutual labels:  home-automation, homebridge, homebridge-plugin
Homebridge Dacp
Remotely control Apple TV and iTunes via HomeKit.
Stars: ✭ 128 (+120.69%)
Mutual labels:  home-automation, homebridge, homebridge-plugin
homebridge-adb
Homebridge script to control remote ADB enabled Android device
Stars: ✭ 56 (-3.45%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-pilight
Accessory plugin for Homebridge allowing to manage and control pilight devices
Stars: ✭ 16 (-72.41%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-magichome-platform
Homebridge Plugin for MagicHome LED Strips with Preset Scene Automation Support (Cycle Color/Fade/Strobe)
Stars: ✭ 46 (-20.69%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-nature-remo-cloud-aircon
Homebridge Plug-in for Air Conditioner Managed by Nature Remo
Stars: ✭ 28 (-51.72%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-homee
use your homee with homebridge
Stars: ✭ 14 (-75.86%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-open-sesame
Homebridge plugin for SESAME3 and SESAME4
Stars: ✭ 14 (-75.86%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-messenger
Send HomeKit messages with HomeBridge (Pushover / IFTTT / Email)
Stars: ✭ 74 (+27.59%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-unifi-occupancy-sensor
An occupancy sensor for Homebridge and UniFi
Stars: ✭ 71 (+22.41%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-keylights
Yet another Homebridge plugin for Elgato Key Light and Key Light Air. https://homebridge.io
Stars: ✭ 40 (-31.03%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-callmonitor
Signals incoming and outgoing calls using the call monitor facility in Fritz!Box devices via HomeKit
Stars: ✭ 25 (-56.9%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-panasonic
A Homebridge plugin for Panasonic Viera TV's. Written to support the new Homekit TV accessory.
Stars: ✭ 18 (-68.97%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-vieramatic
Homebridge plugin for Panasonic™ Viera™ TVs (includes support for 2018 and later models)
Stars: ✭ 39 (-32.76%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-vsx
📻 A VSX and SC Plugin for homebridge
Stars: ✭ 12 (-79.31%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-mijia-camera
Homebridge plugin for the Xiaomi Mijia 1080P Smart IP Camera, also known as Mi Home Security Camera.
Stars: ✭ 35 (-39.66%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-pi-thermostat
Homebridge Plugin to make Raspberry Pi into Thermostat
Stars: ✭ 33 (-43.1%)
Mutual labels:  homebridge, homebridge-plugin
homebridge-nremo
Nature Remo Plugin for homebridge
Stars: ✭ 17 (-70.69%)
Mutual labels:  homebridge, homebridge-plugin

Plex Plugin for Homebridge

npm npm

Use the active sessions on your Plex server as a sensor in Homebridge. Enable your cozy cinema light scene when Plex starts playing and go back to your normal lighting when playback stops.

Installation

You install the plugin the same way you installed Homebridge - as a global NPM module:

sudo npm install -g homebridge-plex

If you don't have a Homebridge installation yet, head over to the project documetation for more information.

Configuration

The plugin uses the following config values:

Variable Description
accessory Must be Plex
name Whatever you want the accessory to be named in Homekit
plex_token The X-Plex-Token used to access your Plex server API. See Finding an authentication token / X-Plex-Token
host The hostname / IP address of your Plex server. Defaults to localhost, can be omitted if Homebridge runs on the same server as your Plex.
port The port of your Plex server. Defaults to 32400
filter  An array of filter rules. See filtering sessions
polling_interval Interval in seconds in which the play state is checked. Default is 3, lower values are discuraged.
debug Set this to true to receive detailed debug information about active sessions and filtering. This is not recommended for permanent installations as it fills up your log files pretty quickly.

Typical config example:

{
  "accessories": [
    {
      "accessory": "Plex",
      "name": "Plex",
      "plex_token": "...",
      "filter": [
        {
            "user": "your-plex-username",
            "player": "your-favorite-player"
        }
      ]
    }
  ]
}

Filtering Sessions

Plex will show up in your Home app as an "Occupancy Sensor". You can use this sensor in any automation you like.

Let's assume you have a home cinema with an Apple TV and the Plex app installed. You want to switch to your cinema light scene when you start watching a movie, so that all the lights dim down. Now you probably also have a smartphone or a tablet from which you occasionally stream a movie. To avoid these devices or even other users triggering the light scene in your home cinema, you can configure your sensor ignore everything other than the Apple TV.

You can configure an array of objects (we'll call that object a "filter rule"), each containing either a user or a player key or both. If any of the filter rules match an active session on your Plex server, the sensor in your Homekit will trigger and keep being triggered until you pause or stop the playback. So you can attach a scene to the "occupancy detected" event as well as the "occupancy stopped being detected" event.

If you define a filter rule only containing a user value, any device of that user will trigger the sensor. If you only define a player (e.g. my-apple-tv), then any player with that name will trigger the sensor, regardless of the user (This makes sense if multiple users use the same Apple TV).

Finding your user and player name

Just start a movie on the device you want to trigger the sensor and head over to the Plex web app. Navigate to Status -> Dashoard -> Current playback. Toggle "show details" on the top right and find the player name here:

Now Playing in the Plex web app

The player is in the upper left corner (in this example it's "TVBox") and the name is next to your profile picture in the bottom (not depicted).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].