Wednesday, April 26, 2017

Using a Raspberry Pi as an Airplay Server

This is mostly for my own personal notes. Maybe you'll get something out of it.
I've got an original Raspberry Pi B with a WiFi dongle that I have hooked directly to the USB input of my JVC Receiver.

Grab the "Lite" version of Raspbian because you won't need any windows.
At press time the most recent version is 2017-04-10-raspbian-jessie-lite.zip

Setup your accounts/wifi/localization the way you like.
Update and upgrade/dist-upgrade to get everything current.
Reboot to make sure everything is on the level.

Go to: https://github.com/mikebrady/shairport-sync and skim the instructions so you know what you are doing.

Install All The Things!
sudo apt-get install build-essential git xmltoman autoconf automake libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev avahi-daemon libavahi-client-dev libsoxr-dev libssl-dev
Clone All The Things!
git clone https://github.com/mikebrady/shairport-sync.git
Change Directory
cd shairport-sync
Setup Configuration Script
autoreconf -i -f
Configure All The Things!
./configure --sysconfdir=/etc --with-alsa --with-avahi --with-ssl=openssl --with-soxr --with-systemd
Make All The Things!
make

Create Shairport-Sync Group for Security
 getent group shairport-sync &>/dev/null || sudo groupadd -r shairport-sync >/dev/null
Create Shairport-Sync User for Security
getent passwd shairport-sync &> /dev/null || sudo useradd -r -M -g shairport-sync -s /usr/bin/nologin -G audio shairport-sync >/dev/null
Install All The Things!
sudo make install
Launch on System Boot
sudo systemctl enable shairport-sync
Configure All The Things!
sudo nano /etc/shairport-sync.conf
I added a name to the "general" section
name = "MusicPi";
interpolation = "soxr";
I added some output info to the "alsa" section
output_device = "hw:1";