Saltar al contenido principal

Integración domótica Tautulli, gratuita y de código abierto

Integración Tautulli para Gladys Assistant

Your Plex server through Tautulli: streams, transcoding, bandwidth, who plays what.

info

La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.

Follow your Plex server in Gladys through Tautulli: streams in progress, transcoding, bandwidth, who plays what, and scenes that start when a playback starts, pauses, resumes or stops.

Unofficial integration, not affiliated with Tautulli nor Plex. It has never been tested against a real Tautulli yet: it was built from the API reference of Tautulli and the pytautulli library. Feedback is welcome.

The integration only reads: it never stops a stream nor changes anything in Tautulli or Plex.

What you need​

  • Tautulli v2 reachable from Gladys (same network), with its API enabled.
  • Its API key: in Tautulli, Settings → Web Interface → API, tick Enable API, then copy the API key (32 characters).

Setup​

  1. Install the integration from the store.
  2. Tautulli address: 192.168.1.10:8181 (a bare address is read as http:// on port 8181, Tautulli's own). With http:// or https:// and no port, port 80 or 443 is used (Tautulli behind a reverse proxy; a path such as /tautulli is kept). Do not paste ?apikey=…: the key has its own field.
  3. API key: paste it. It is kept by Gladys in its database (masked in the interface, not encrypted), never shown again, and sent only to Tautulli.
  4. Users to follow (optional): Plex user names, friendly names or user ids, separated by commas (10 at most). Each becomes a device.
  5. Save, then press Test the connection.
  6. In the Discovery tab, create the devices you want.

Devices​

Plex (Tautulli), one per integration:

FeatureTypeMeaning
Streamscounterstreams in progress
Streams transcodingcounterstreams Plex transcodes
Streams in direct playcounterstreams played as they are
Streams in direct streamcounterstreams remuxed (container changed only)
Bandwidth, LAN, WANdata rate, kbit/sas Tautulli computes it
Plex reachablebinary (read only)1: Tautulli read the activity of Plex; 0: it could not

Plex: <user>, one per followed user: Streams (counter) and Now playing (text: the title, "(+1)" when several, "—" when nothing plays).

Scene trigger​

Plex playback started, paused, resumed or stopped, with two optional filters: the event, and a followed user. The variables event, user_name, title, media_type and player can be used in the actions (a message, for example).

The activity is read at the chosen pace (30 s by default): a scene starts up to one interval after the event, and a pause or a stop shorter than the interval may not be seen. Nothing fires for the streams already running when the integration starts or when Tautulli comes back after an outage.

Certificate (https only)​

By default an https address needs a certificate from a known authority. For a self-signed certificate:

  • tick Accept the self-signed certificate: the certificate seen at the first connection is remembered; the API key goes to whoever answers that first connection. A different certificate later is refused until you press Trust the new certificate;
  • or, safer, type its SHA-256 fingerprint: openssl s_client -connect 192.168.1.10:8181 </dev/null | openssl x509 -noout -fingerprint -sha256.

Security and privacy​

  • The integration sends the key in the URL of each request (?apikey=): the one method every version of Tautulli accepts (the X-Api-Key header exists only since Tautulli 2.18.0; using it is planned). The integration never writes a URL, the key nor a message of Tautulli in its logs, but a reverse proxy in front of Tautulli may log the URLs, key included: reach Tautulli directly, or turn off the proxy's access logs for /api/v2. Over http:// the key crosses your network in clear: keep Tautulli on your local network, or use https.
  • The key gives full access to the API of Tautulli (which can also terminate streams): the integration only uses get_activity and get_users.
  • Titles and user names go to Gladys (devices, scene variables): only for the users you follow on the devices; the trigger carries the name of any user.

Errors and limits​

  • Key refused (wrong or regenerated): Gladys stops and never retries by itself; paste the current key and save, or press Test the connection.
  • API off: enable it in Tautulli; Gladys retries (30 s to 10 min).
  • HTTP 429 or a server error (5xx): every request pauses (1 min to 6 h, Retry-After honoured), even across a restart; Test the connection lifts the pause.
  • Tautulli unreachable: retried after 30 s, doubling up to 10 min, never sooner than the chosen interval.
  • Plex not read (Plex stopped or unreachable from Tautulli): "Plex reachable" goes to 0, the other figures keep their last value.
  • The list of the users is read every 10 minutes (2 minutes after a failure); a followed user who plays something is found at once.
  • One Tautulli per integration; 10 followed users at most.
  • Not in this version: terminating a stream, the libraries, the history and the statistics of Tautulli.

Parámetros de configuración​

Estos son los parámetros que Tautulli te pide en su pantalla de configuración en Gladys.

ParámetroTipoObligatorioDescripción
How it workssectionNoGladys reads the activity of your Plex server through the API of Tautulli, with its API key, and only reads: it never stops a stream. The server becomes a Gladys device (Discovery tab): streams in progress, transcoding, direct play, direct stream, bandwidth (total, LAN, WAN) and whether Tautulli reaches Plex. Up to 10 Plex users can be followed, one device each (streams, title playing). Unofficial integration, not affiliated with Tautulli nor Plex.
Tautulli addressstringSíThe address of Tautulli on your network. A bare address (no http://) is read as http on port 8181, Tautulli's own; with http:// or https:// and no port, port 80 or 443 (a reverse proxy, a path is kept). Over http the API key crosses your network in clear: prefer https if Tautulli is reached through another network.
API keysecretSíIn Tautulli: Settings, Web Interface, API (tick "Enable API"). Kept by Gladys in its database, never shown again, sent only to Tautulli, in the query of each request (the one method every Tautulli version accepts; the X-Api-Key header exists only since 2.18.0); never written in a log of Gladys, but a reverse proxy in front of Tautulli may log URLs.
Certificate (https only)sectionNoWith https, the certificate of Tautulli must come from a known authority by default. For a self-signed one: either tick the box below (the certificate seen at the first connection is remembered: the API key goes to whoever answers that first connection), or type its SHA-256 fingerprint (safer: nothing else is ever accepted, not even the first time). A different certificate later is refused before the API key is sent.
Accept the self-signed certificatebooleanNoOn: the certificate seen at the first connection is trusted and remembered; a different one later is refused until you press "Trust the new certificate".
Certificate fingerprint (SHA-256, optional)stringNoPins this certificate: Tautulli must present exactly it. The fingerprint is shown by your browser (certificate details) or by openssl (see the documentation).
Users and refreshsectionNoGladys reads the activity at the pace below (30 seconds by default). A start, pause or stop shorter than this interval may not be seen by the scene trigger.
Users to follow (optional)stringNoPlex user names, friendly names or user ids, separated by commas: one device each (10 at most). Empty: none, only the server device.
RefreshselectSí

Cómo instalar Tautulli en Gladys​

  1. En Gladys, abre Integraciones: Tautulli aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
  2. Haz clic en Instalar. Gladys descarga la imagen Docker (ghcr.io/lm1lc3n7/gladys-tautulli:0.1.1), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración).
  3. Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
  4. También puedes instalarla directamente desde la URL de su repositorio: https://github.com/LM1LC3N7/gladys-tautulli.

Tautulli requiere Gladys >=5.1.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.

¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.

Sobre las integraciones externas​

Tautulli es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene LM1LC3N7, no el equipo principal de Gladys.

Suscríbete a la newsletter de Gladys Assistant

Unos pocos correos al mes sobre nuevas versiones y novedades del proyecto. Enviados por Pierre-Gilles Leymarie, fundador del proyecto. Puedes darte de baja cuando quieras 🙂