Skip to content
Raspberry Pi Audio Receiver with Bluetooth A2DP, AirPlay, UPnP and Spotify Connect
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md Adjust installation for Raspbian Buster Jun 27, 2019
enable-hifiberry.sh
enable-read-only.sh Refactor and update for Raspbian Buster Jul 15, 2019
install-aplay-zero.sh aplay-zero: Wait for sound to be initialized Jun 27, 2019
install-bluetooth.sh Restart bluetooth-agent on failure, fixes #16, #13 Nov 5, 2019
install-pivumeter.sh Refacator installation scripts May 28, 2019
install-shairport.sh Refactor and update for Raspbian Buster Jul 15, 2019
install-snapcast-client.sh
install-spotify.sh
install-startup-sound.sh Refacator installation scripts May 28, 2019
install-upnp.sh Revert installation confirmation in upnp script Jun 26, 2019
install.sh Add snapclient installation to global installation script Jun 26, 2019

README.md

Raspberry Pi Audio Receiver

A simple, light weight audio receiver with Bluetooth (A2DP), AirPlay, Spotify Connect and UPnP.

Features

Devices like phones, tablets and computers can play audio via this receiver.

Requirements

Installation

The installation script asks whether to install each component.

sudo apt update -y
sudo apt upgrade -y
sudo apt install -y --no-install-recommends git

git clone https://github.com/nicokaiser/rpi-audio-receiver.git
cd rpi-audio-receiver
./install.sh

Basic setup

Sets hostname to e.g. airpi, the visible device name ("pretty hostname") to AirPi.

Bluetooth

Sets up Bluetooth, adds a simple agent that accepts every connection, and enables audio playback through BlueALSA. A udev script is installed that disables discoverability while connected.

AirPlay

Installs Shairport Sync AirPlay Audio Receiver.

Spotify Connect

Installs Spotifyd, an open source Spotify client).

UPnP

Installs gmrender-resurrect UPnP Renderer.

Snapcast

Installs snapclient, the client component of the Snapcast Synchronous multi-room audio player.

/dev/zero playback

Some DACs tend to produce popping/clicking noises when switching from or to stand-by (i.e. when no sound is played). An optional aplay service can be installed which always streams an empty bytestream to the DAC. This consumes some CPU but avoids clicks.

Read-only mode

To avoid SD card corruption when powering off, you can boot Raspbian in read-only mode. This is described by Adafruit in this tutorial and cannot be undone.

Limitations

  • Only one Bluetooth device can be connected at a time, otherwise interruptions may occur.
  • The device is always open, new clients can connect at any time without authentication.
  • To permanently save paired devices, the Raspberry has to be switched to read-write mode (mount -o remount,rw /) until all devices have been paired once.
  • You might want to use a Bluetooth USB dongle or have the script disable Wi-Fi while connected (see bluetooth-udev.sh), as the BCM43438 (Raspberry Pi 3, Zero W) has severe problems with both switched on, see raspberrypi/linux/#1402.

Disclaimer

These scripts are tested and work on a current (as of the current date) Raspbian setup on Raspberry Pi. Depending on your setup (board, configuration, sound module, Bluetooth adapter) and your preferences, you might need to adjust the scripts. They are held as simple as possible and can be used as a starting point for additional adjustments.

References

You can’t perform that action at this time.