Make Raspberry Pi a Spotify connector

 


This article explain how to create a Spotify speaker connector with a Raspberry PI.

In first time :

We deploy Raspian, a connector to Spotify create by DTCooper (https://dtcooper.github.io/raspotify)

curl -sL https://dtcooper.github.io/raspotify/install.sh | sh

Edit the configuration file :

sudo vim /etc/raspotify/conf

LIBRESPOT_NAME="Hifi-Spotify"

LIBRESPOT_DEVICE_TYPE="speaker"

LIBRESPOT_BACKEND="alsa"

LIBRESPOT_MIXER="alsa"

# HifiBerry Soundcard

LIBRESPOT_ALSA_MIXER_CONTROL="Digital"

LIBRESPOT_ALSA_MIXER_DEVICE="hw:sndrpihifiberry"

# Internal sound card

#LIBRESPOT_ALSA_MIXER_CONTROL="Headphone"

#LIBRESPOT_ALSA_MIXER_DEVICE="hw:0"

sudo systemctl restart raspotify

Command to know :

start service : sudo systemctl start raspotify

stop service : sudo systemctl stop raspotify

Restart service : sudo systemctl restart raspotify

Logfile :  sudo journalctl -u raspotify

Test with no service (command ligne) :

sudo systemctl stop raspotify

sudo /usr/bin/librespot -v --name HifiTest --device-type speaker --backend alsa --bitrate 320 --device hw: sndrpihifiberry --alsa-mixer-control Digital --volume-ctrl linear --mixer alsa

Comments