Integración domótica Jellyfin & Emby, gratuita y de código abierto

Controle sus reproductores Jellyfin y Emby, siga lo que se reproduce y reaccione en sus escenas.
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
Control the players of your Jellyfin or Emby server from Gladys, see what is being watched around the house, and run scenes when playback starts, pauses or stops — the classic "dim the lights when the movie starts".
Works with Jellyfin 10.9 and later (checked on 10.11 and 12.1) and with Emby (checked on 4.10). The integration detects which server it talks to.
Setup
- Create an API key for Gladys on your server:
- Jellyfin: Dashboard > API Keys > +, name it "Gladys";
- Emby: Settings > Advanced > API Keys > New API Key.
- In the Configuration tab of the integration, fill in:
- the server URL, port included (for example
http://192.168.1.20:8096). An https address behind a reverse proxy works too; you may paste the address from your browser,/web/...is removed automatically; - the API key created in step 1.
- the server URL, port included (for example
- Save, then click Test the connection.
- The devices show up in the Discovery tab.
A player (TV app, phone, browser) only shows up while it is connected to the server: open the app on the TV, then click Look for players. A player you added stays in Gladys even when it is off.
What you get
The server: number of active playbacks, number of transcoded playbacks (the ones that load the CPU), a "who watches what, where" summary, and one counter per library (plus episodes for TV shows and tracks for music). The counters can be turned off in the configuration.
Each player: play, pause, stop, previous, next, rewind, forward, volume, mute, playback state, now playing title, remaining time, and two "in intro" and "in credits" flags. The buttons work with the dashboard Music widget.
The intro and credits flags need the server to know those parts:
- Jellyfin (10.10 and later): install a media segment provider, for example the official Chapter Segments Provider plugin (it reads chapters named "Intro", "Credits"...) or the Intro Skipper plugin;
- Emby: Emby's intro and credits detection.
Without them, both flags stay at 0.
Scenes
Four triggers: Playback started, Playback paused, Playback
resumed, Playback stopped. Each one can be narrowed to one player and
to media types (movie, episode, music, live TV...). The title, name,
series_name, media_type, user and player_name variables are available
to the following actions.
Example: Playback started, player "Living room TV", type Movie → dim the living room; Playback paused on the same player → lights back on.
Two scene actions:
- Display a message on a player — for example "Someone is at the door" over the movie;
- Play a media on a player — searches the library for a title (movie, series, album, artist, playlist...) and plays it, shuffled if you like. The title played is available to the rest of the scene.
The player must be connected to the server to receive a message or a media.
Dashboard widgets
- Now playing: who watches what, where, with the posters.
- Player: the current playback as a remote — the artwork (or the movie fan art), title, state, remaining time, and the play/pause, stop and next buttons. Leave the "Player" setting empty to follow whatever is playing, or pick a player to follow that one only.
- Latest additions: posters of the movies, series or albums added lately, new episodes grouped by series.
Troubleshooting
- "The server refused the API key": the key was deleted or badly copied. Create a new one and save it. The integration deliberately stops calling the server while the key is refused: a reverse proxy running fail2ban could otherwise ban your address.
- A button does nothing: not every app accepts remote control. TV apps and the web client do; some mobile apps do not. "Next" and "Previous" on an episode play the neighbour episode, which works even on apps without a play queue (Swiftfin).
- The message does not show up: it depends on the app. Jellyfin Web and Jellyfin for Android TV show it; Swiftfin (Apple TV, iOS) does not handle it yet, and the official iOS app does not show it during video playback.
- The button does not change state right away: the buttons of the "Player" widget show the expected state as soon as the command is sent, then the app confirms it (some take a few seconds).
- Updates are slow: the integration follows playback in real time over a WebSocket. If your reverse proxy does not forward WebSockets, it falls back to polling every 15 seconds.
- The integration logs can be read from the Gladys interface.
Parámetros de configuración
Estos son los parámetros que Jellyfin & Emby te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Conexión a su servidor multimedia | section | No | Funciona con Jellyfin (10.9 y posteriores) y Emby. Introduzca la dirección del servidor (por ejemplo http://192.168.1.20:8096) y una clave de API creada para Gladys: en Jellyfin, Panel de control > Claves API; en Emby, Ajustes > Avanzado > Claves API. La integración detecta sola el tipo de servidor. |
| URL del servidor | string | Sí | Dirección del servidor, puerto incluido (8096 por defecto). También funciona una dirección https detrás de un proxy inverso. |
| Clave de API | secret | Sí | |
| Idioma de los nombres | select | No | Idioma de los nombres de las funcionalidades y de los textos. Los nombres se fijan al crear un dispositivo: para cambiarlos después de un cambio, elimine el dispositivo y vuelva a añadirlo. |
| Sensores de bibliotecas | boolean | No | Añade un sensor de número de elementos por biblioteca en el dispositivo servidor (más los episodios para las series y las pistas para la música). |
| Actualización de las bibliotecas (s) | number | No | Frecuencia de actualización del número de elementos de las bibliotecas, en segundos. Las reproducciones se siguen en tiempo real. |
| Aceptar un certificado autofirmado | boolean | No | Solo para direcciones https: acepta el certificado autofirmado del servidor. Déjelo desactivado para las direcciones http. |
Cómo instalar Jellyfin & Emby en Gladys
- En Gladys, abre Integraciones: Jellyfin & Emby aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
- Haz clic en Instalar. Gladys descarga la imagen Docker (
ghcr.io/guim31/gladys-jellyfin:0.3.3), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración). - Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
- También puedes instalarla directamente desde la URL de su repositorio: https://github.com/guim31/gladys-jellyfin.
Jellyfin & Emby 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
Jellyfin & Emby 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 guim31, no el equipo principal de Gladys.
- Explorar todas las integraciones, nativas y de la comunidad
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación