Ditching Sonos for Music Assistant ★
My general advice for life is: be a good person, and care for the people around you. And follow this one very specific rule: avoid vendor lock-in.
I’ve always wondered how to setup a sound systems around the house that you can control from your devices, such as your phone. To get a working setup it seemed you had to embrace vendor lock-in; either by committing to an entire ecosystem such as Sonos, or by relying on a service like Spotify and buying amplifiers that supports their particular integration (such as Spotify Connect).
When I wanted to replace and upgrade our old Sonos speaker I did som research and I found a promising alternative: it’s called Music Assistant and it’s great.

The woes of Sonos
We’ve had a Sonos speaker in our kitchen for more than a decade. At first I was very happy with it; the speaker was easy to use, it integrated well with Spotify, and despite being a single fairly cheap speaker the sound was pretty good.
But gradually the experience got worse:
- The speaker sometimes refused to play songs via Spotify.
- We couldn’t connect to the speaker via the Sonos app (having to unplug the speaker and pray to the Sonos god that it would be enough to fix it).
- Playback randomly paused.
- The speaker lost WIFI connection, reconnecting after a while.
- Finally, the radio integration stopped working altogether (this is critical for my girlfriend who always listens to the radio).
It could be worse—at least our speaker wasn’t bricked and we (supposedly) dodged a bunch of other issues by never upgrading to the new app.
The new setup
-
Use Music Assistant as the central controller for streaming music and radio to different players and speakers.
-
Setup an Arylic A50+ amplifier that Music Assistant can control.
Together with a pair of speakers it replaces the Sonos in the kitchen.
-
Connect Music Assistant with Home Assistant to control playback via our smart-home dashboard and automations.
-
Setup more players for Music Assistant to control.
What is Music Assistant and why is it awesome?
Music Assistant is a service that acts as a hub that connects different providers and players, letting you control the sound in your home from one central location.

So you could have this kind of setup and let Music Assistant connect them together in whatever way you wish, including multi-room setups (if the players are from the same ecosystem, such as Airplay or Squeezebox):
Provider | Player | |
---|---|---|
Spotify | Sonos | |
Audible | Chromecast | |
Radio | → | Media player in Home Assistant |
Plex | Streaming amplifier (Squeezebox) | |
Local storage | Computer with Linux (Squeezebox) |
Here’s a few reasons why I think Music Assistant is awesome:
- Freedom from the limitations of one ecosystem.
- Can mix and match music from local storage and Spotify in the same playlist.
- One place to control all your speakers of varying types and connections.
- Integrates well with Home Assistant.
How to set it up
-
I host my homelab things using docker compose and it was as simple as:
services:music-assistant-server:image: ghcr.io/music-assistant/server:latestcontainer_name: music-assistant-serverrestart: unless-stopped# Network mode must be set to host for MA to work correctlynetwork_mode: hostvolumes:- ./music-assistant-server/data:/data/# privileged caps (and security-opt) needed to mount# smb folders within the containercap_add:- SYS_ADMIN- DAC_READ_SEARCHsecurity_opt:- apparmor:unconfinedenvironment:- LOG_LEVEL=info# And home assistant and other things. -
Add providers
A provider is a source of music. There’s a bunch of them but at the moment I only use a few:
The Spotify provider for example should automatically sync all Spotify playlists into Music Assistant and allows you to search and play any song on Spotify.
-
Add players
We need players to play our music, here’s what I currently use:
The players should be automatically added as long as they have a matching provider enabled.
Open-source music management—particularly on Linux—has a reputation of being notoriously troublesome. But I’ve gotta say, Music Assistant was simple to setup and it works well (except issues with some players that I’ll get to shortly).
Trying out different players
I was fairly lost in what kind of amplifier and music player I should get.
There’s a lot of options out there but I was worried about paying a lot of money for something I wasn’t sure it would integrate well into my smart home setup. Here’s a few options I’ve tried:
Sonos

It’s pretty funny, the Sonos speaker works better with Music Assistant than with the Sonos app. The radio completely stopped working via the Sonos app, while I can use Music Assistant to play the radio on the Sonos speaker.
The speaker might still disconnect or stop playback at odd times but it’s good enough to raise the mood in the washing room.
Squeezelite on Linux

I hate modern smart TVs with a passion so to stream we use a computer running Linux, connected to a dumb amplifier with some speakers. It works well but it makes it a bit more cumbersome to play music.
By installing Squeezelite the computer acts as a squeezebox client, effectively transforming it into a smart player for Music Assistant and Home Assistant to stream music to.
A HifiBerry player

As I had a Raspberry Pi lying around it made sense to try the HifiBerry AMP2 that transforms the Pi into a surprisingly capable amplifier and smart music controller. For simplicity I decided to start with their operating system HifiBerryOS that hopefully should “just work” and be open enough for me to manually fix things if needed.
While it works very well as a Spotify Connect device or to play over Bluetooth I had issues with it acting as a Squeezelite or Airplay client as the volume was super low when I tried to stream to it from Music Assistant.
It might be a software issue with HifiBerryOS but I haven’t had the energy to debug it or try other OS versions. Maybe I’ll revisit it when I want to outfit another room with speakers.
Arylic A50+

I was planning to use the HifiBerry to power two new speakers in the ceiling in the kitchen to replace the Sonos. But I got stressed out by the HifiBerry not working properly and the kitchen renovation was looming ever closer so I bought the Arylic A50+, hoping that it would work better with Music Assistant.
The device supports both Airplay and Squeezebox like the HifiBerry but again there were some issue with the volume being very low. I don’t know if both devices just happen to have similar bugs, if there’s a bug with Music Assistant, or if it’s some weird compatibility issue.
Sigh.
But there’s another way to make it work; the Arylic has an excellent Home Assistant integration and if you go that way then Music Assistant can use the Arylic as a player properly. You need the LinkPlay integration in Home Assistant and then enable the Home Assistant integration in Music Assistant.
(I tried the same with the HifiBerry integration but for some reason the HifiBerry media player exposed from Home Assistant didn’t show up in Music Assistant.)
Home Assistant integration
Music Assistant integrates well with Home Assistant. Setup is straightforward:
-
Add the Music Assistant integration in Home Assistant:
This will expose all players in Music Assistant to Home Assistant (such as the Squeezebox players running on Linux).
-
Enable the Home Assistant plugin in Music Assistant:
This will expose all media players in Home Assistant to Music Assistant (such as the Arylic or the Home Assistant Voice Preview Edition).
With this setup you can setup Home Assistant actions to start a particular radio station, add a media player card to start/stop playback, or simply give Music Assistant access to more players.
In Home Assistant how do you…
-
Play the
P4 Norrbotten
radio station?action: music_assistant.play_mediatarget:entity_id: media_player.kitchendata:media_id: P4 Norrbotten -
Play the
To Hell and Back
track?action: music_assistant.play_mediatarget:entity_id: media_player.kitchendata:media_id: To Hell and Backmedia_type: track -
Play the
kpop
playlist?action: music_assistant.play_mediatarget:entity_id: media_player.kitchendata:media_id: kpopmedia_type: playlist -
Play the
kpop
playlist randomized?action: media_player.shuffle_settarget:entity_id:- media_player.kitchendata:shuffle: trueaction: music_assistant.play_mediatarget:entity_id: media_player.kitchendata:media_id: kpopmedia_type: playlistenqueue: replace
You get the new music_assistant.play_media
action but otherwise you control the media players just as the other media player entities in Home Assistant.
It’s not perfect
Music Assistant is a fairly young open source project so minor bugs are to be expected. There are also two larger feature that I miss:
-
I’d like to have access to my library even when I’m away from home. Maybe an Android app with native volume controls, notifications, and support for offline listening?
-
A better widget for Home Assistant.
The mini media player card. For basic sound controls in the kitchen I use the Mini Media Player card but I’d like a better way to filter through playlists and music via the Home Assistant Lovelace UI. I currently embed the Music Assistant dashboard itself via an iframe but the UI is a bit too clunky for the size of my tablet.
What’s next?
Still, I must admit, I’m stoked about finding a smarter way to control music throughout our house and I’m searching for an excuse to expand the setup in the future. Here are some ideas I have:
- Speakers in the kid’s room to play music or audio books before they go to sleep.
- More music in my exercise space (it kind of works if I increase the volume of my office speakers, but it’s not ideal).
- A proper Hi Fi setup for true music enjoyment somewhere in the house.
Despite some integration issues and us not using Music Assistant to it’s fullest potential it has still improved our setup in a major way.