using the RaspberryPi to make all SONOS speakers support Apple Airplay


Airplay allows you to conveniently play music and videos over the air from your iOS or Mac OS X devices on remote speakers.

Since we just recently “migrated” almost all audio equipment in the house to SONOS multi-room audio we were missing a bit the convenience of just pushing a button on the iPad or iPhones to stream audio from those devices inside the household.

To retrofit the Airplay functionality there are two options I know of:

1: Get Airplay compatible hardware and connect it to a SONOS Input.

airportexpress_2012_back-285111You have to get Airplay hardware (like the Airport Express/Extreme,…) and attach it physically to one of the inputs of your SONOS Set-Up.  Typically you will need a SONOS Play:5 which has an analog input jack.

PLAY5_back

2: Set-Up a RaspberryPi with NodeJS + AirSonos as a software-only solution

You will need a stock RaspberryPi online in your home network. Of course this can run on virtually any other device or hardware that can run NodeJS. For the Pi setting it up is a fairly straight-forward process:

You start with a vanilla Raspbian Image. Update everything with:

sudo apt-get update

sudo apt-get upgrade

Then install NodeJS according to this short tutorial. To set-up the AirSonos software you will need to install additional avahi software. Especially this was needed for my install:

sudo apt-get install git-all libavahi-compat-libdnssd-dev

You then need to get the AirSonos software:

sudo npm install airsonos -g

After some minutes of wait time and hard work by the Pi you will be able to start AirSonos.

sudo airsonos

And it’ll come up with an enumeration of all active rooms.

Screen Shot 2014-06-25 at 11.38.47

And on all your devices it’ll show up like this:

IMG_1046

and

Screen Shot 2014-06-25 at 12.38.27

 

Source: https://github.com/stephen/airsonos

  1. #1 by Niko on July 3, 2014 - 22:04

    Hi,
    Does the raspberry version work for you? I have it running on a rev B raspi with the increased performance overclock. Unfortunately the audio encoding doesn’t seem to be fast enough as I only get choppy audio, very unreliable.
    I must say that the pi is running raspbmc, so that might be a problem performance wise. The encoding issue has been raised with Stephen wang on GitHub.
    I’d really like this to work and would give it another shot on a fresh raspbian install…
    Thanks
    Niko

    • #2 by bietiekay on July 4, 2014 - 12:14

      I am running it on a separate RaspberryPi which I am only using for SONOS related things (like the recentPodcasts, Autobookmarking of Audiobooks and Podcasts and Airplay).

      And without any overclocking it’s working fairly great for me. Almost no interruptions.

Comments are closed.