Integration of the Plex Media Server in ioBroker (with or without Plex Pass). Furthermore, Tautulli integration.
Table of contents
For the basic setup it is only required to provide the IP address (and port) of your Plex installation. Once this is given, ioBroker.plex will retrieve all the basic data (incl. Servers, Libraries). See Channels & States for the full list of basic data.
If you are a Plex Pass user, you may setup a webhook in the Plex Settings to retrieve the current event / action from your Plex Media Server (play, pause, resume, stop, viewed and rated).
Navigate to your Plex Media Server and go to Settings
and Webhook
. Created a new webhook by clicking Add Webhook
and enter your ioBroker IP adress with the custom port specified in the ioBroker.plex settings and trailing /plex
path, e.g. http://192.168.178.29:41891/plex
:
Tautulli is a 3rd party application that you can run alongside your Plex Media Server to monitor activity and track various statistics. Most importantly, these statistics include what has been watched, who watched it, when and where they watched it, and how it was watched. All statistics are presented in a nice and clean interface with many tables and graphs, which makes it easy to brag about your server to everyone else. Check out Tautulli Preview and install it on your preferred system if you are interested.
This adapter connects to the Tautulli API and also receives webhook events from Tautulli.
Once Tautulli is installed, open the Settings page from Tautulli dashboard and navigate to Web Interface. Scroll down to the API section and make sure Enable API
is checked. Copy the API key
and enter it in the ioBroker.plex settings. Furthermore, add the Tautulli IP address and port to allow API communication.
To setup a webook using Tautulli, following the instrucutions below and make sure you have completed all 4 steps:
- Add Notification Agent
- Configure Webhook in Notification Agent
- Configurehh Triggers in Notification Agent
- Configure Data in Notification Agent
Once installed open the settings page from Tautulli dashboard and navigate to Notification Agents as seen below:
-
Click Add a new notification agent and Webhook.
-
Enter your ioBroker IP adress with the custom port specified in the ioBroker.plex settings and trailing
/tautulli
path, e.g.http://192.168.178.29:41891/tautulli
:Furthermore, choose
POST
for the Webhook Method and enter any description you like in Description. -
Next, go to the Triggers tab, select your desired (or simply all) options
-
Finally, most important fill in the respective data payload in the Data tab according to the Notification configuration found here. Copy the whole content into the first four notification agents (
Playback Start
,Playback Stop
,Playback Pause
andPlayback Resume
) as shown below forPlayback Start
:
Having both the basic and advanced setup configured, the following channels will appear (libraries, servers and users are only examples of course). See further below for full list of channels & states.
After sucessful basic setup the following channels and states will be created:
Channel / Folder | State | Description |
---|---|---|
libraries | - | Plex Libraries |
servers | - | Plex Servers |
settings | - | Plex Settings |
After sucessful advanced setup the following channels and states will additionally be created:
Channel / Folder | State | Description | Remark |
---|---|---|---|
_playing | - | Plex Media being played | with Plex Pass or Tautulli |
statistics | - | Plex Watch Statistics | only with Tautulli |
statistics.libraries | - | Plex Watch Statistics | only with Tautulli |
statistics.libraries.<libraryName> | - | Library Watch Statistics <libraryName> | only with Tautulli |
statistics.users | - | User Watch Statistics | only with Tautulli |
statistics.users.<userName> | (same states as in statistics.libraries) | User Watch Statistics <userName> | only with Tautulli |
users | - | Plex Users | only with Tautulli |
users.<userName> | - | Plex User <userName> | only with Tautulli |
- add Plex Pass Authentication by PIN (and removing current authentication with user / password)
- add playback control for players
- add support for all Tautulli triggers
- add state description for object tree
_playing
- add support / discovery in iobroker.discovery
- fixed @iobroker/adapter-core dependency
- get initial data from Plex API
- receive events from Plex Webhook (Plex Pass only)
- receive events from Tatulli (if used)
The MIT License (MIT)
Copyright (c) 2019 Zefau zefau@mailbox.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.