Introduction: Spotify Connect
How to connect your favorite speakers to spotify with the official application: Spotify Connect.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Wifi on Your Raspberry
I use a USB WIFI key on my Raspberry pi A+ (under raspbian) to connect the system on my domestical network.
The reference of the usb key use in the tutorial is a TP-LINK TL-WN725N.
To connect the system you have to change te file /etc/network/interfaces:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d<br>auto lo
iface lo inet loopback
#iface eth0 inet manual # put # to accelerate the boot
#iface wlan0 inet manual
#iface wlan1 inet manual
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp
wpa-ssid "*****" # put your ESSID
wpa-psk "339***************3C1" #Put your wifi password
Step 2: Install Spotify Connect
Go to /home/pi.
Download the file develop by Fornoth:
curl -O <a href="http://spotify-connect-web.s3-website.eu-central-1.amazonaws.com/spotify-connect-web.sh"> http://spotify-connect-web.s3-website.eu-central-</a>1.amazonaws.com/spotify-connect-web.sh
Make it executable:
chmod u+x spotify-connect-web.sh
Launch the installation of the pre-build Spotify-connect:
The script is download into the file "spotify-connect-web-chroot".
Step 3: Spotify Appkey
You need a spotify premium account.
You need to download your "spotify_appkey.key" on this website:
Put yout ID/password and get your key "spotify_appkey.key"
Is not possible to gat your key with the raspberry (no web browser), so you need to get it with yout laptop and send it to the raspberry with SFTP protocol (filezilla for example) to the adress:
Step 4: System Launching
To test the environement launch the command with your spotify's ID/password. Optionnal you can choos the name of connection.
./spotify-connect-web.sh --username ID --password password --bitrate 320 --name Rpi
For automatical lunch creat a file launch in the repetory /home/pi. Put yout Spotify's ID/password.
trap "sudo umount $DIR/dev $DIR/proc" EXIT
sudo mount --bind /dev $DIR/dev
sudo mount -t proc proc $DIR/proc/
sudo cp /etc/resolv.conf $DIR/etc/
sudo chroot $DIR /bin/bash -c "cd /usr/src/app && python main.py --username Identifiant --password MotDePasseCompte --bitrate 320 --name Rpi"
Create the file launchspotify in the repetory /etc/init.d/:
sudo sh /home/pi/launch &
Make it executable
sudo chmod 755 /etc/init.d/launchspotify.sh
Finaly launch the last command to launch spotify connect at boot:
update-rc.d launchspotify.sh defaults