In this tutorial, we’ll cover how to turn a Raspberry Pi with JustBoom HAT/pHAT into an AirPlay receiver.
To create your own AirPlay receiver, you will need:
JustBoom HAT or pHAT
microSD card with latest Raspbian Jessie (Lite)
Shairport Sync is an AirPlay audio player capable of streaming audio from iTunes, iOS devices and other AirPlay sources. Synchronised multi-room audio is possible, as Shairport Sync-powered devices stay synchronised with the source.
The Shairport Sync project can be found on GitHub, and is what will be used in this tutorial to turn a Raspberry Pi into a JustBoom AirPlay receiver.
First, update the repositories and install the required dependencies:
sudo apt-get update && sudo apt-get dist-upgrade -y sudo apt-get install -y build-essential git xmltoman autoconf automake libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev
Clone the Shairport Sync repository:
git clone https://github.com/mikebrady/shairport-sync.git && cd shairport-sync
Then, configure and build Shairport Sync:
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-soxr --with-systemd
getent group shairport-sync &>/dev/null || sudo groupadd -r shairport-sync >/dev/null getent passwd shairport-sync &> /dev/null || sudo useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null
sudo make install
Finally, enable Shairport-Sync to start at boot:
sudo systemctl enable shairport-sync
Reboot the Pi to finalise the installation:
With the software installed, start your AirPlay source, and search for your freshly installed AirPlay receiver. It should appear as its hostname.
Repeating the installation for multiple JustBoom devices, you can create your own multi-room audio setup, selecting multiple AirPlay receivers.