As posted in AirPlay and Sonos - AirSonos I made the scripts available to install a working copy of AirSonos on your System.

Today I want to make it possible on a Raspberry Pi Zero under Raspbian.
Thanks to Pieter Beulque and his blog Raspberry Pi + NodeJS for wrapping up the instructions on the basic setup.

Add WiFi to your Raspberry Pi Zero

Disclaimer: This is an unofficial hack that requires intermediate soldering skills. Please be very careful when soldering anything and don't blame me when you brake something!

Raspberry Pi Zero with soldered Wifi-Dongle

  1. Buy an WiFi USB-Dongle
  2. Break the plastic housing apart
  3. Solder the pins according to the picture to the USB test-points on the bottom side of the Pi Zero.

Thanks to the Hackerspace FFM for the publication of the Raspberry PI Zero + nano USB WiFi Adapter mod.


Running a basic setup of Raspbian on a Raspberry Pi is very easy and clearly explained in their Getting Started Guide.

Download NOOBS, extract it on your SD, plug it in and turn on the Raspberry Pi. When prompted, choose to install Raspbian and let it run.

Setup your WiFi

To be able to communicate with your Pi, it needs a network-connection.
Therefor you need to create a file to configure the WiFi-connection.
This is done via:

sudo echo "network={  
}" > /etc/wpa_supplicant/wpa_supplicant.conf

The Raspberry Pi can now be started headless (which means no monitor nor keyboard attached), connect to your WiFi and should be reachable via SSH.

Node on Raspbian

Finally it became easy to install node on the Raspberry Pi.
Just download the ARM-binary and install it with the following code-snippet:

cd ~  
sudo dpkg -i node_latest_armhf.deb  

Needed software for networking stuff

To enable the Raspberry Pi for the necessary networking stuff we need some additional software that can easily be installed via apt-get.
As well it may be needed to setup the correct rights for the /usr/local-directories so that the normal user can install the packages.

sudo apt-get install git-core libnss-mdns libavahi-compat-libdnssd-dev -y  
sudo chown -R $USER /usr/local  

If you don't want to change the rights as in the second line, just add sudo in front of the next commands - however it is not recommended to do so.

Finally I assembled a script to download and install the working forks from the community.

# First remove everything you've installed already:
npm uninstall -g airsonos  
npm uninstall -g nodetunes

# Then install the working forks:
npm install -g git://  
cd ~  
git clone airsonos  
cd airsonos  
npm install babel  
npm install -g

# Now everything should be installed so you now can execute that damn thing and hopefully it works:

If everything went well, the software should launch and you should see the output on your command-line indicating the found Sonos-speakers or Sonos-groups.

Searching for Sonos devices on network...

Büro (@, RINCON_5CAAFD9DA04801400:0)

Search complete. Set up 1 device tunnel.  


The Raspberry Pi Zero is an impressive device but it lacks computing power.
This results in a huge delay when trying to execute AirSonos.

At the moment it could be more effective to use a Raspberry Pi 3 that features a faster processor to decrypt the AirPlay stream.