The Sonos for tinkerers
Ever wanted multiroom audio in perfect sync, wireless, open enough to support what ever source you throw at it, while being cheap and painless to use?
A product that lasts, and won’t be bricked or lose features over time as the manufactor feels it’s time for you to get a new one?
Ah, one could dream… Wait, it exists?
Below, an image of the box of speakers and other obsolete hifi equipment you have stored, just waiting, longing for this opportune time to be used.
Snapcast
Enter Snapcast, a fantastic project started by badaix.
“Snapcast is a multiroom client-server audio player, where all clients are time synchronized with the server to play perfectly synced audio. It’s not a standalone player, but an extension that turns your existing audio player into a Sonos-like multiroom solution.”.
Snapcast will be the main star in our setup here, and it consists of two parts. A Snapserver, and a Snapclient which will run on all of the places you want sound to play.
Both the server, and the client are able to run on all kinds of platforms, this includes smartphones, so here you might finally have a use for those dusty Android-phones you’ve horded over the decade. We will be using the Debian build here later.
Librespot (Spotify Connect), Airplay, PulseAudio, oh the possibilities…
The best thing about Snapcast is that it’s build to be extremely modular, allowing it to be configured to adapt to whatever usecase you’ll like to throw at it. The following figure from Snapcast’s readme does a good job in illustrating this:
We can use Spotify Connect to allow anyone within the household to play music on our device, Airplay for Apple users and use PulseAudio to stream audio for Linux users. This also supports anything that can play audio locally, so the possibilities for what you can play or stream to your speakers are virtually limitless.
My setup
I have Snapcast clients in four rooms of my apartment now, with two main sources to play from.
Red = Controllers, Green=Players, Yellow=Sources, Blue=Clients/Audio outputs
My Snapserver runs on Ubuntu Server 20.04 as a LXC container under Proxmox. The container is designated 15GB disk, 1 CPU (i5-2500k) core, 1GB memory and runs without a hitch.
The Snapclients all run different hardware, Hobby/Bed/Patio runs on a Raspberry Pi 2, 3 and 4 while the livingroom client runs alongside Kodi on a Intel NUC HTPC.
As for sound hardware, I used whatever I had in the room already. For the rooms that didn’t have any audio gear I invested in a HifiBerry AMP2.
HifiBerry AMP2
… and finally a use for the cheap yardsale speakers you got stashed somewhere, the ones you picked up years ago because you just could not let them go
The HifiBerry AMP2 is a audio amplifier HAT for the Raspberry Pi which allows you to connect speakers directly and adjust the amplified volume via Snapcast/ALSA.
I’ve been using the AMP2 for two of my Snapclient’s, and the experience with it has been excellent. Highly recommend it if you are looking for a amplifier to use with a small form factor, but still having enough power to fill a room with sound.
Installation
Got you convinced? Here’s some installation notes I made when configuring my own setup that might be of help: