Skip to main content

Volumio smart home integration, free and open source

Volumio integration for Gladys Assistant

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. A dashboard widget shows what is playing, with its cover, 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.2.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​

  1. Install the integration from Integrations → Install from GitHub.
  2. Open the Discovery tab: the players found appear there. Add the ones you want with Add to Gladys.
  3. 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:

SettingWhat it does
Player addressesOptional IP addresses or host names, separated by commas. Port 3000 is used when none is given.
Real-time updatesOn 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 namesNames 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:

FeatureTypeWhat it does
Volumemusic volume, 0 to 100Reads and sets the volume of the player.
Playmusic play buttonPlays the queue.
Pausemusic pause buttonPauses. A web radio is stopped instead (a stream cannot be paused).
Previous trackmusic previous buttonPrevious track of the queue.
Next trackmusic next buttonNext track of the queue.
Playback statemusic playback state1 while playing, 0 when paused or stopped. Kept in the history.
Broadcast a notificationmusic play notificationPlays a sound or a spoken message, then resumes what was playing.

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.

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​

ActionWhat it does
Play a Volumio playlistPlays a playlist saved in Volumio, by its name (case and accents do not matter).
Play a favourite web radioPlays a radio of the Volumio favourites (Favourite radios or My web radios), by its name.
Play an addressPlays a stream or a sound file by its http(s) address, at a chosen volume, optionally resuming the music then.
Set shuffle and repeatTurns the shuffle and the repeat of the queue on or off, or leaves them unchanged.
Clear the queueEmpties 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. An unchanged value is sent again to Gladys every 6 hours.

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/getState opens 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 shows no cover: Gladys only accepts covers of 300 KB at most; larger ones are not shown.
  • Set LOG_LEVEL=debug on 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, not a real Volumio.
  • Gladys has no music feature for mute, shuffle, repeat or the title: they live in the widget and in the scene actions.
  • 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.

SettingTypeRequiredDescription
Finding your playerssectionNoVolumio 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 addressesstringNoOptional, separated by commas. Port 3000 is used when none is given.
Real-time updatesbooleanNoListen 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 (%)numberNoVolume of the notifications played by Gladys (text to speech, sounds), then the volume goes back. 0: keep the current volume.
Notification length limit (s)numberNoA notification longer than this is stopped and the music resumes (a stream never ends on its own).
Language of the feature namesselectNoNames given to the features of new devices, and language of the messages of the scene actions.

How to install Volumio in Gladys​

  1. In Gladys, open Integrations: Volumio appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-volumio:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-volumio.

Volumio requires Gladys >=5.2.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.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂