Airplay to Sonos via RaspberryPi 2/3


Please note, this requires a RaspberryPi 2/3 – this will not work on the Original models. Why would you want to do this? Maybe you want to listen to Deezer or Spotify on your Sonos, but don’t have a premium subscription..






IMPORTANT NOTE FOR USERS OF RASPBIAN JESSIE LITE Рyou will also need to install git:

sudo apt-get install git

Then on with the install..

sudo su

apt-get update

apt-get upgrade

apt-get install libavahi-compat-libdnssd-dev

curl -sL | sudo bash

curl -sL | bash

apt-get install nodejs

npm install airsonos -g

nano /etc/rc.local

Add this line

sudo /usr/bin/airsonos &

so it looks like this:

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
sudo /usr/bin/airsonos &
exit 0


Ctrl X and then Y to save and exit, now reboot..

after a short wait, airsonos will enumerate all your devices and they should a appear as airplay targets on iphones macs etc..

Also, be aware there is usually a short delay of ~5 seconds before you will start hearing sound..




Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.