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

Link Gladys with a Subsonic-compatible music server: Navidrome, Airsonic, Gonic...
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
This integration links Gladys Assistant with any music server implementing the Subsonic API: Navidrome, Airsonic-Advanced, Gonic, LMS, Subsonic… It was designed and tested first against Navidrome.
What you get
- A Subsonic server device with five periodically refreshed sensors,
usable in your scenes and on your dashboard:
- Now playing: the track being played right now, as
Artist — Title (listener). Gladys fires its scene triggers when this value changes, so you can react to every new track; - Active streams: how many songs are being played right now (handy for a "don't cut the sound while someone is listening" scene);
- Album cover: the artwork of the album being played. It travels on the Gladys image channel, so it shows up in the dashboard Camera widget (pick the "Subsonic server" device). When playback stops the last cover stays on screen; until anything has ever been played, a neutral placeholder takes its place;
- Songs, Artists and Albums counted in the library.
- Now playing: the track being played right now, as
- An optional Subsonic jukebox device to control server-side playback: play/pause, previous/next, volume and playback state.
- Buttons in the Configuration screen: test the connection, start a library scan, play random songs or a playlist on the jukebox.
- Three dashboard widgets (Gladys 5.1 or later): Now playing, Jukebox and Library — see below.
Configuration
- Open the Configuration tab of the integration.
- Fill in:
- Server URL: the root of your server, without
/rest— for examplehttps://music.mydomain.comorhttp://192.168.1.10:4533(Navidrome's default port); - Username and Password: an account on your server. Prefer a dedicated account for Gladys;
- Authentication method: keep Token (the password never transits, only a salted md5 hash is sent). Switch to Legacy only for very old servers (API < 1.13) or LDAP accounts that reject tokens (error 41);
- Refresh interval: how often the sensors are polled (60 s by default).
- Server URL: the root of your server, without
- Save, then click Test the connection: the server answers with its name
and version (for example
navidrome 0.52). - The devices show up in the Discovery tab, ready to be added.
The jukebox (server-side playback)
Jukebox mode plays the music on the machine hosting the server (the one
wired to your speakers), through the jukeboxControl API endpoint. It must
be enabled on both sides:
-
Server side. For Navidrome, in
navidrome.toml:[Jukebox]Enabled = trueor with the
ND_JUKEBOX_ENABLED=trueenvironment variable. The host needs a working audio output (see the Navidrome jukebox mode documentation). -
Gladys side. Turn on Enable the jukebox device in the integration configuration: the "Subsonic jukebox" device then appears in discovery.
From your scenes or the dashboard you can then: play/pause, skip to the next or previous track, set the volume, and trigger the Play random songs (N random tracks) or Play a playlist (by exact name, case-insensitive) buttons.
Dashboard widgets
With Gladys 5.1 or later, the integration offers three widgets (Edit the dashboard → Add a widget). They have no settings: each one follows the configured server. The number tiles are bound to the sensors of the "Subsonic server" device: add it to Gladys for them to show a value.
- Now playing — the number of streams in progress (the tile follows the sensor live) and one row per session the server lists: title, artist · album, the cover, and as a badge the player or listener name, green when the session really plays, grey when it is paused or stopped (the server keeps a session listed for a while after it stops). Eight rows at most, the active streams first. Nothing playing: "Nothing is playing right now." Refreshed every 30 seconds; the list read by the periodic poll is reused while it is less than 30 seconds old.
- Jukebox — the server-side playback as a remote: the cover and the title of the current track, artist · album, then the state (Playing / Stopped), the volume and the position in the queue ("2 / 20"), and four buttons: Pause or Play depending on the state, Previous, Next and Shuffle (20 random songs, like the configuration button). An empty queue only offers Shuffle. Until the jukebox device is enabled in the configuration, the widget says so. Refreshed every 30 seconds, and as soon as a button acted. The buttons work even if the "Subsonic jukebox" device was not added to Gladys; the playback state published to Gladys follows every command.
- Library — three live tiles (Songs, Artists, Albums), the
server identity (type and version returned by the ping, for example
navidrome 0.53.3), the scan status ("Running · n" or "Done · n songs"; "Unavailable" when the server refusesgetScanStatusto this account) and a Scan button. Refreshed every 15 minutes, every 10 seconds during a scan. The button is subject to the same rights as the configuration one: Navidrome reserves scans to administrators.
The widget covers are served by the integration (asked to the server at 300 px) and cached one hour by Gladys. A track without a cover shows without an image.
Troubleshooting
- "Wrong username or password" (error 40): double-check the credentials by logging into the server's web interface.
- Error 41: your account (often LDAP) does not accept token authentication — switch the method to Legacy.
- "Cannot reach the Subsonic server": make sure the URL is reachable from Gladys (same machine/network as the integration container), not only from your browser.
- The jukebox makes no sound: the audio comes out of the server host, not
the device running Gladys. Check
Jukebox.Enabledand the host's audio output (audio device access for a Docker container, if applicable). - The sensors show "no recent value": they have never been polled yet. After updating the integration, go back to the Discovery tab and click the device again: this re-applies its definition (including the periodic polling flag) to the already created device. The first value lands on the next poll (60 s by default).
- "The server refuses a scan from this account": starting a scan is reserved to administrators (Navidrome does so). It does not matter: the button is only a shortcut, the server scans on its own schedule and the sensors follow. Make the account an administrator if you want the button — nothing else in the integration needs those rights.
- A track stays on screen although playback stopped: the server keeps the session in its "now playing" list for a while after the music stops. The integration only counts sessions whose reported state is really playing, but a player that simply goes silent without telling the server (the classic Subsonic protocol has no notion of stopping) stays listed until the track would have ended.
- The sensors never change: the artist/album counters only move after a library scan — use the Scan the music library button.
Parámetros de configuración
Estos son los parámetros que Subsonic te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Server connection | section | No | Works with any server implementing the Subsonic API (Navidrome, Airsonic-Advanced, Gonic...). Use a dedicated user account if you can. The URL is the root of the server, e.g. https://music.example.com or http://192.168.1.10:4533. |
| Server URL | string | Sí | Root URL of the Subsonic server, without /rest. |
| Username | string | Sí | |
| Password | secret | Sí | |
| Authentication method | select | No | Token (md5 + salt) is supported by every modern server. Use legacy only for pre-1.13 servers or LDAP users. |
| Refresh interval (s) | number | No | How often the server sensors are polled, in seconds. Gladys only supports 10, 15, 30 or 60 s: the value is snapped to the closest one. |
| Jukebox (server-side playback) | section | No | The jukebox plays music on the machine hosting the server. It must also be enabled server-side: in Navidrome, set Jukebox.Enabled = true (ND_JUKEBOX_ENABLED=true) and make sure the host has an audio output. |
| Enable the jukebox device | boolean | No |
Cómo instalar Subsonic en Gladys
- En Gladys, abre Integraciones: Subsonic 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-subsonic:1.1.0), 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-subsonic.
Subsonic 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
Subsonic 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 externas
- Descubrir las integraciones nativas incluidas en Gladys
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación