Skip to content

iobroker-community-adapters/ioBroker.plex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

ioBroker.plex

Integration of the Plex Media Server in ioBroker (with or without Plex Pass). Furthermore, Tautulli integration.

Number of Installations Stable Version NPM Version Commits since last release Downloads Translation status

Table of contents

  1. Features
  2. Setup instructions
    1. Basic setup
    2. Advanced Setup
  3. Channels & States
    1. with Basic Setup
    2. with Advanced Setup
  4. Changelog
  5. Licence

1. Features

  • Receive detailed media information about the current played media item (such as video bitrate, codec, subtitle information, audio; see Advanced setup for a full list)
  • Receive events from Plex (via Plex Webhook and Plex Notifications using Plex Pass or via Tautulli, see setup!)
  • Playback control for players
  • Retrieve servers
  • Retrieve libraries
  • Retrieve all items within a library
  • Retrieve users (only with Tautulli)
  • Retrieve statistics (only with Tautulli)
  • Retrieve playlists
  • Retrieve settings
  • Retrieve all data from controllable clients
  • Web Interface that shows the recent events from Plex: Plex Web Interface

2. Setup instructions

2.1. Basic Setup

For the basic setup it is required to provide the IP address (and port) of your Plex installation. Furthermore, you have to retrieve a dedicated token for the adapter to retrieve data from Plex.

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.

2.2. Advanced Setup (Plex Pass or Tautulli)

2.2.1. Plex Pass

Webhook

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:

Plex Webhook

Events

For information regarding the Plex Notifications, please see the official documentation. To turn on Notifications on your Plex Media Server, go to Settings > Server > General and then enable the Push Notifications preference.

2.2.2.Tautulli

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.

2.2.2.1. API

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.

2.2.2.2. Webhook
Overview

To setup a webook using Tautulli, following the instrucutions below and make sure you have completed all 4 steps:

  1. Add Notification Agent
  2. Configure Webhook in Notification Agent
  3. Configure Triggers in Notification Agent
  4. Configure Data in Notification Agent
  5. Configure Notification options
Description

Once installed open the settings page from Tautulli dashboard and navigate to Notification Agents as seen below:

Tautulli Settings

  1. Click Add a new notification agent and Webhook.

  2. 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:

    Tautulli Webhook Furthermore, choose POST for the Webhook Method and enter any description you like in Description.

  3. Next, go to the Triggers tab, select your desired (or simply all) notification agents. An enabled notification agent will trigger an event which will then be sent to ioBroker. Make sure to provide the necessary data for each of the enabled notification agent in the next step!

  4. Now, most importantly, fill in the respective data payload in the Data tab according to the Notification configuration found here. Copy the notification configuration of the relevant notification agents from the previous step (e.g. Playback Start, Playback Stop, Playback Pause and Playback Resume) in each of the text boxes as shown below for Playback Start:

    Tautulli Notification

  5. Finally, check the option Allow Consecutive Notifications to enable to allow sending of consecutive notifications (e.g. both watched & stopped notifications):

    Tautulli Notification Settings

3. Channels & States

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.

Channels & States Exeample

3.1. With Basis Setup

After sucessful basic setup the channels according to the following table will be created. For a list of all states which will be created, please see dedicated list of states.

Channel / Folder Description
libraries Plex Libraries
servers Plex Servers
settings Plex Settings

3.2. With Advanced Setup

After sucessful advanced setup the following channels will additionally be created. For a list of all states which will be created, please see dedicated list of states.

Channel / Folder Description Remark
_playing Plex Media being played with Plex Pass or Tautulli
statistics Plex Watch Statistics only with Tautulli
users Plex Users only with Tautulli

Credits

This adapter would not have been possible without the great work of @Zefau (https://github.com/Zefau), who create and maintained it until 2021 .

Changelog

1.1.5 (2024-12-11)

  • (ticaki) State _playing.*.Metadata.viewOffset is created.
  • (ticaki) Dependencies updated
  • (mcm1957) Adapter requires nodejs >= 18 now

1.1.4 (2023-11-06)

  • (ticaki) move logmessage into debug

1.1.3 (2023-10-05)

  • (ticaki) fixed: bug in readable offset

1.1.2 (2023-09-16)

  • (ticaki) prevent Plex from crashing due to incorrect tautulli configuration

1.1.1 (2023-09-16)

  • (ticaki) Fixed: State common.name english/german
  • (ticaki) some minor improvements

1.1.0 (2023-09-11)

  • (ticaki) Added: Lyrics are written as link and text in _playing.device.Metadata.Music.Lyric
  • (ticaki) Added: Connection to players with refresh of playerdetail
  • (ticaki) Added: New states with player data.
  • (ticaki) Added: Refresh of player can be activate by set _Controls.timeline.refreshDetails to true

1.0.5 (2023-08-31)

  • (ticaki) Fixed: Control did not work with Plexamp.
  • (ticaki) some minor improvements.

1.0.4 (2023-08-27)

  • (ticaki) Fixed: #184

1.0.3 (2023-08-25)

  • (ticaki) Fixed: Don't add empty notifications to history #183
  • (ticaki) Fixed: prevent the creation of duplicate history entries in most cases

1.0.2 (2023-08-23)

  • (ticaki) Added: a play/pause switch for mediaplayer
  • (ticaki) Added: links to artworks (ready to use)
  • (ticaki) Added: state viewOffsetSeconds refresh every second while playing media(internal counter)

1.0.1 (2023-08-21)

  • (ticaki) Xmlparser call fixed

1.0.0 (2023-08-20)

  • (ticaki) fixed: several minor issues have been fixed

1.0.0-alpha.3 (2023-08-16)

  • (ticaki) fixed: common.type warnings have been fixed and missing state definitions have been added #114 #101 #100
  • (ticaki) fixed: player controls
  • (ticaki) fixed: history page has been fixed
  • (ticaki) fixed: translation error has been fixed #108

0.9.0 (2020-05-23)

  • (Zefau) added option for webhook IP address in case Plex is running in a Docker environment (see #53)
  • (Zefau) updated dependencies

0.8.11 (2020-02-26)

  • (Zefau) fixed error with state retrieval on startup when no states are given
  • (Zefau) updated dependencies

0.8.10 (2020-02-16)

  • (Zefau) fixed error with state retrieval on startup when no states are given
  • (Zfeau) fixed incorrect handling of certificates when using secure connection
  • (Zefau) updated dependencies

0.8.9 (2019-12-14)

  • (Zefau) updated dependencies
  • (Zefau) fixed missing spaces in events (and thus Adapter Web View)
  • (Zefau) fixed using username instead of email for statistics (see #17)

0.8.8 (2019-12-05)

  • (Zefau) fixed player controls

0.8.7 (2019-12-02)

  • (Zefau) fixed error with http / https settings

0.8.6 (2019-12-02)

  • (Zefau) added further states to Tautulli Notification (see README-tautulli.md)
  • (Zefau) fixed design issue with select-box in the adapter settings
  • (Zefau) fixed not showing thumbnails in adapter web view (when not using a secure connection)

0.8.5 (2019-12-01)

  • (Zefau) fixed missing user / library statistics
  • (Zefau) fixed using username instead of email for statistics (see #17)

0.8.4 (2019-11-07)

  • (Zefau) added support for remote player control via cloud / iot adapter
  • (Zefau) added thumbnail to notifications as well as web interface of adapter
  • (Zefau) fixed icons within the web interface of adapter

0.8.3 (2019-11-06)

  • (Zefau) fixed player controls (error when triggering start, stop, etc.)
  • (Zefau) added additional states to event channel

0.8.1 (2019-11-02)

  • (Zefau) fixed error Cannot read property 'forEach' of undefined

0.8.0 (2019-10-28)

  • (Zefau) added support for Plex Notifications including customization in adapter settings
  • (Zefau) added count of streams (see #14)
  • (Zefau) reworked cleaning up states when new webhook is received (see #11)

0.7.0 (2019-10-17)

  • (Zefau) reworked duty cycle (clean up of outdated / old states)
  • (Zefau) fixed incorrect states (see #15)

0.6.0 (2019-08-19)

  • (Zefau) replaced password with token authentication

0.5.0 (2019-08-18)

  • (Zefau) added support for Plex Notifications (see #9)
  • (Zefau) added support for all Tautulli triggers
  • (Zefau) added Adapter Web Interface that shows the recent events

0.4.3 (2019-08-11)

  • (Zefau) Performance improvements (dutyCycleRun and state comparison)
  • (Zefau) added refresh button (to scan library files) to libraries

0.4.1 / 0.4.2 (2019-08-03)

  • (Zefau) fixed newly introduced playback control not working for certain players
  • (Zefau) removed unnecessary dependencies

0.4.0 (2019-08-01)

  • (Zefau) added playback control for players
  • (Zefau) added configuration options to only retrieve specific objects from Plex

0.3.2 / 0.3.3 (2019-07-25)

  • (Zefau) added file, streaming and transcoding information to Tautulli event
  • (Zefau) fixed bug when no playlists exist
  • (Zefau) fixed missing EVENTS.json

0.3.1 (2019-07-20)

  • (Zefau) updated dependencies to fix security vulnerabilities in depending packages

0.3.0 (2019-05-16)

  • (@Apollon77) updated testing for Node.js v12 (see #6)
  • (Zefau) added support / discovery in iobroker.discovery (see #62)
  • (Zefau) added playlists to states
  • (Zefau) added state description for object tree _playing
  • (Zefau) updated German translation (instead of generating it from English)

0.2.0 (2019-05-14)

  • (Zefau) added authentication method (using Plex user and Plex password)
  • (Zefau) fixed @iobroker/adapter-core dependency

0.1.0 (2019-04-26)

  • (Zefau) get initial data from Plex API
  • (Zefau) receive events from Plex Webhook (Plex Pass only)
  • (Zefau) receive events from Tatulli (if used)

License

The MIT License (MIT)

Copyright (c) 2023-2024 iobroker-community-adapters Copyright (c) 2019-2020 Zefau [email protected]

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.