MultiRoom Airplay

I was just introduced to Vaolumio about a week and a half ago, so I’m no expert. First off, my apologies if this has already been covered but after days of research, I wasn’t able to find a definitive guide on how to set up Airplay with SnapCast. I did find many posts dated a year ago about how it wouldn’t work with the current build but nothing more recent. SO… here we go. This is based on a lot of other people’s work and a bunch of poking around and resetting to “factory” defaults.

Before doing anything open Volumio in the web browser and enable ssh (adding “\dev” after the URL)

Open us a SSH session in your favorite console
Remove the current shairport-sync install

sudo rm /usr/local/bin/shairport-sync

Do not remove anything else. Mikebrady’s github recommends a cleaner uninstall but apparently, some of the config files have been customized for Volumio and aren’t rebuilt correctly.

Reboot

We have to download a bunch of dev tools that aren’t in this release so we can download buildessentials later,

sudo nano /etc/apt/sources.list

Add
deb Index of /raspbian stretch main contrib non-free rpi

sudo apt-get update
sudo apt-get install binutils
sudo apt-get install libstdc+±4.9-dev
sudo apt-get install gcc-4.9 gcc g+±4.9 g++ dpkg-dev
sudo apt-get install xmltoman

sudo nano /etc/apt/sources.list

Remove the depository added above

sudo apt-get update

More dev tools

sudo apt install build-essential git autoconf automake libtool libpopt-dev libconfig-dev libasound2-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev

Download the repository

git clone /mikebrady/shairport-sync.git  

cd shairport-sync

autoreconf -fi

Rebuild without ALSA. The only way I could get this to work was without it. (Stdout is probably not needed because we are going to use the pip output but this how I did it and after a week a fussing with it I wasn’t going to try again)
./configure --with-stdout --with-avahi --with-ssl=openssl --with-metadata --with-pipe --sysconfdir=/etc --with-systemd

make
sudo make install

Edit /volumio/app/plugins/music_service/airplay_emulation/shairport-sync.conf.tmpl

Comment out the ALSA config and add
pipe =
{
name = “///tmp/snapfifo”; // there is no default pipe name for the output
};

For good measure but I don’t think it’s actually used, edit /etc/shairport-sync.conf the same as above

Reboot

Finish the initial config and install Spapcast according to Saiyato’s github (/Saiyato/volumio-snapcast-plugin). Check /etc/mpd.conf. Make sure that the ALSA audio output is disabled or commented out and the FIFO audio output is enabled.

Reboot and pray. If you are lucky and the moon in is the seventh house AND Jupiter aligns with Mars (bite your tongue, holding it slightly to the left for good measure), when Volumio restarts you now have a multi-room AirPlay instance.

The one thing I have noticed, Pandora doesn’t download cover art now, not sure if something was broken by the steps above but it’s a small price to get AirPlay up and running.

–edit
The above process was the first time it worked for me. After a suitable refractory period, I gave it another go and installed Pandora > SnapCast then ShairPort-sync last. Pandora is downloading the cover art correctly.

One last thing. Once you get it working, backup/image the disk immediately

I had to remove parts of the github URL’s above because of new users aren’t allowed to post more than 2