Volumio smart home integration, free and open source

Volumio network music players: playback, volume, notifications, playlists, web radios.
Overview
This integration brings your Volumio network music players into Gladys: a Raspberry Pi with Volumio plugged into an amplifier or a DAC, a Volumio Primo, Rivo or Motivo. Each player becomes a Gladys music device: play, pause, previous and next track, volume, playback state, and "Broadcast a notification" for the text to speech and the sounds of your scenes. With Gladys 5.3, the Music box of the dashboard becomes a full player for it: cover, title, progress bar, shuffle, repeat, mute, the queue, and the search and browsing of the whole Volumio library. A dashboard widget shows what is playing, and scene actions play a Volumio playlist, a favourite web radio or any stream address.
Everything stays on your local network: the integration talks to the Volumio REST API and listens to the real-time updates Volumio sends to its own web interface. No account, no cloud.
Developed without the hardware: feedback welcome. This integration was written from the Volumio documentation and source code, without a real player at hand. Tell us how it works for you in the issues.
This integration is not affiliated with Volumio.
Requirements
- Gladys Assistant 5.3.0 or later.
- A Volumio player (Volumio 2 or 3) on the same local network as Gladys, reachable on its port 3000 (the default one).
Configuration
- Install the integration from Integrations → Install from GitHub.
- Open the Discovery tab: the players found appear there. Add the ones you want with Add to Gladys.
- If no player shows up, open the Configuration tab and enter the IP address of one player in Player addresses (shown in Volumio under Settings, Network). The other players are then found through it: Volumio players know each other.
Settings:
| Setting | What it does |
|---|---|
| Player addresses | Optional IP addresses or host names, separated by commas. Port 3000 is used when none is given. |
| Real-time updates | On by default: the integration listens to the changes Volumio announces. Off: it reads the players instead. |
| Notification volume (%) | Volume of the notifications played by Gladys. 0 keeps the current volume. |
| Notification length limit (s) | A notification longer than this is stopped and the music resumes (60 s by default). |
| Language of the feature names | Names given to the features of new devices, and language of the scene action messages (French by default). |
Two buttons help: Search for players searches again and lists every player with its state, and List playlists and favourite radios shows the exact names to type in the scene actions.
Devices
Each Volumio player is one device, named as in Volumio, with these features:
| Feature | Type | What it does |
|---|---|---|
| Volume | music volume, 0 to 100 | Reads and sets the volume of the player. |
| Play | music play button | Plays the queue. |
| Pause | music pause button | Pauses. A web radio is stopped instead (a stream cannot be paused). |
| Previous track | music previous button | Previous track of the queue. |
| Next track | music next button | Next track of the queue. |
| Playback state | music playback state | 1 playing, 0 paused, 2 stopped. Writing it plays, pauses or stops. |
| Broadcast a notification | music play notification | Plays a sound or a spoken message, then resumes what was playing. |
| Title | music title | Title of the track (or what a web radio announces). |
| Artist | music artist | Artist of the track. |
| Album | music album | Album of the track. |
| Artwork | music artwork | The cover, shown by the Music box. |
| Duration | music duration (s) | Length of the track, 0 for a web radio. |
| Position | music position (s) | Where the track is; writing it seeks. |
| Shuffle | music shuffle | Random play of the queue, on or off. |
| Repeat | music repeat | 0 off, 1 the whole queue, 2 the current track. |
| Mute | music mute | Mutes the player, keeping its volume. |
With these features, the player works with the Music box of the Gladys dashboard, and with the Gladys scene action that speaks a text on a speaker. A notification remembers the queue, the track, the position, the volume and the repeat mode, plays the sound at the notification volume, then puts everything back.
The features are named in the language chosen in the configuration, when the device is added.
Gladys 5.3 music player
Since Gladys 5.3, the Music box of the dashboard is a real player, and Volumio fills all of it:
- the cover, the title, the artist and the album, a progress bar you can drag to seek, play and pause, previous, next, shuffle, repeat (off, the queue, one track), mute and the volume;
- the queue (list button): the tracks of the Volumio queue, the current one highlighted; a tap plays another one;
- search and browse (magnifier button): the search asks Volumio, which looks everywhere it can (music library, web radios, the streaming plugins you installed); browsing starts with the sources of Volumio (Music Library, Artists, Albums, Genres, Playlists, Web Radio, Favorites, Media Servers, your plugins). A tap plays the item in place of the queue; the secondary gesture adds it after the current track or at the end of the queue. An album, an artist or a playlist plays whole; a folder is opened, not played.
The Play music on a speaker scene action of Gladys picks a playlist, an album, an artist, a web radio or a track in the same panel, and plays it when the scene runs.
A device added before version 1.1.0 keeps working as before, without the new features: open the Discover tab of the integration and click Update on the player (Gladys offers it because the features changed). The new features are added; the existing ones keep their scenes and dashboards. Playback state changes: it reads 2 instead of 0 when Volumio is stopped, and it is no longer kept in the history (Gladys keeps no history of music features).
Covers come from Volumio (/albumart): the cover file of the album folder, or one found on the Internet by
Volumio, or the logo of a web radio. Volumio sends a local cover as it is on disk (up to 5 MB) and Gladys shows
a cover of 300 KB at most: the integration makes a larger one smaller (a JPEG of 400 pixels at most). A
track without cover shows the Volumio logo, as in Volumio.
Two commands are not in the REST API of Volumio and go through its real-time channel (socket.io), opened for the command when Real-time updates is off: repeat one track, and play next (the items are added at the end of the queue, then moved after the current track).
Dashboard widget
The Volumio now playing widget shows the title, the artist and the album, the cover when Volumio serves one Gladys accepts, the player, its state, the source (music library, web radio, Spotify, AirPlay...), the volume, shuffle and repeat. Choose the player in the widget settings, or leave it empty for the first player added.
Its buttons:
- Play / Pause;
- Next;
- Volume: a small form to type the volume and mute or unmute the player;
- Playlist: a list of the Volumio playlists, to start one. Without any playlist, or when Volumio does not control the volume, a Previous button takes the free place.
Scene trigger
A new track is playing: a player started a track with another title or artist, including a new song on a web radio that announces it. You can pick the player. Variables: title, artist, album and source, to send "Now playing" to your phone or show it on a screen. The notifications played by Gladys never fire it.
Scene actions
| Action | What it does |
|---|---|
| Play a Volumio playlist | Plays a playlist saved in Volumio, by its name (case and accents do not matter). |
| Play a favourite web radio | Plays a radio of the Volumio favourites (Favourite radios or My web radios), by its name. |
| Play an address | Plays a stream or a sound file by its http(s) address, at a chosen volume, optionally resuming the music then. |
| Set shuffle and repeat | Turns the shuffle and the repeat of the queue on or off, or leaves them unchanged. |
| Clear the queue | Empties the queue of the player (the music stops). |
A web radio found with the Radio Browser integration of Gladys can be played with Play an address.
Scene examples
- Wake up: every weekday at 7:00, Play a Volumio playlist "Morning" in the bedroom, then raise the volume step by step with the Volume feature.
- Doorbell: when the doorbell rings, Play an address with the sound of a bell, at 70 %, with "Then resume what was playing" checked; or have Gladys say "Someone is at the door" on the player.
- Leaving home: when the last person leaves, control the player's Pause feature, or Clear the queue.
- Now playing on the TV: on A new track is playing, send a message with the title and the artist.
Real-time updates and polling
Volumio has no account and no quota: everything goes over the local network. The integration listens to the socket.io channel of Volumio (the one of its web interface) and reads the player once every 5 minutes as a safety net. When that channel is not available, it reads the player every 10 seconds while it plays and every minute otherwise. A player that does not answer is tried again after 15 seconds, then every minute. Only the players added to Gladys are read. Only changes are sent to Gladys: the position of the track is sent when it starts, pauses or jumps, and the Music box moves the progress bar on its own.
Troubleshooting
- No player in the Discovery tab: enter the IP address of one player in the configuration, then press Search for players. The automatic discovery (mDNS) of Gladys 5.2 may not find Volumio, which announces itself with capital letters the core does not match.
- "Salon: does not answer": the player is off, or its address changed. Check that
http://<address>:3000/api/v1/getStateopens in a browser of the same network. - A scene action says the playlist is not found: press List playlists and favourite radios and copy the name shown.
- The widget or the Music box shows no cover: the cover is not a PNG, JPEG or WebP image (an SVG icon of Volumio), or it is larger than 10 MB.
- "Added at the end of the queue" after play next: the player did not move the items after the current track (real-time channel lost meanwhile); they stay at the end.
- The Music box has no new controls on an older device: click Update on the player in the Discover tab (see "Gladys 5.3 music player").
- Set
LOG_LEVEL=debugon the integration to see every read in its logs.
Limitations
- Developed without the hardware: the real-time channel (socket.io), the notifications and the resume are tested against a simulated player; the music player of Gladys 5.3 (browse, search, queue, play next, repeat one, covers) against a real Volumio 2 running in Docker (x86 image, no sound card), not against Volumio 3 nor a real device.
- Play next while shuffle is on: Volumio picks the next track at random, the added items may not come next.
- Playing an item that no longer exists (a scene kept for months, a file removed) empties the queue: Volumio clears it before it finds out. Gladys reports it.
- A seek right at the start of a track can be ignored by Volumio 2 (seen on a test bench).
- Gladys 5.2 does not pass the volume of its "play a notification" scene action to external integrations: the notification volume of the configuration applies.
- After a notification, a queue that was paused comes back without playing, from its first track.
- The notification sound is played by Volumio itself: it must reach the address (Gladys Plus for the text to speech).
- A queue of a streaming service (Spotify Connect, AirPlay) cannot be resumed after a notification.
Configuration settings
These are the settings Volumio asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Finding your players | section | No | Volumio players are searched for automatically: open the Discovery tab. If none shows up, enter the IP address of one player below (shown in Volumio, under Settings, Network): the others are found through it. |
| Player addresses | string | No | Optional, separated by commas. Port 3000 is used when none is given. |
| Real-time updates | boolean | No | Listen to the changes Volumio announces, like its web interface does. Off: the players are read every 10 s while playing, every minute otherwise. |
| Notification volume (%) | number | No | Volume of the notifications played by Gladys (text to speech, sounds), then the volume goes back. 0: keep the current volume. |
| Notification length limit (s) | number | No | A notification longer than this is stopped and the music resumes (a stream never ends on its own). |
| Language of the feature names | select | No | Names given to the features of new devices, and language of the messages of the scene actions. |
How to install Volumio in Gladys
- In Gladys, open Integrations: Volumio appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/guim31/gladys-volumio:1.1.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/guim31/gladys-volumio.
Volumio requires Gladys >=5.3.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
Volumio is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation