+41 22 566 01 87
+41 22 566 01 87
I'm using the spotify daemon from a little while and now I feel that is stable enough to deserve to write down some cookbook notes for future use and to share them.
So in this article we will install a Spotify daemon on a Raspberry Pi, then you will be able to tell your Spotify client from which device you want to listen to your music.
This article shows the steps I made following the readme file of the official Spotify daemon project on Github, you're encouraged to check it for further informations/questions/issues.
So ssh or just open a terminale on your raspi and then:
$ mkdir spotify $ cd spotify $ wget https://github.com/Spotifyd/spotifyd/releases/download/0.2.11/spotifyd-2019-06-19-armv6.zip $ unzip ./spotifyd-2019-06-19-armv6.zip $ ./spotifyd
And that's all you need.
If all went well you should see now a blue dot on the devices icon. Depending on your client of choice the position and the color could be different.
Mine look like this:
Click on the icon and select Spotifyd
Wait a few seconds…
… any sound?
If yes Congratulations! You made it.
If no … well try to troubleshoot in the next section or go to the advanced configuration.
$ speaker-test -t wav -c 6
Still no sound? The problem is not caused from spotifyd (hardware maybe?).
With the new releases of Spotifyd comes a lots of configuration options. Here we will give a name at our demon and then autoload it with systemd.
$ mkdir -p ~/.config/spotifyd $ nano ~/.config/spotifyd/spotifyd.conf
Write these lines in the spotifyd config file:
[global] device_name = awesome_spotify_device
You can put what name you want in place of awesome_spotify_device but spaces are not admitted.
If you have trouble connecting you can try to put your spotify credential in the same file, like:
[global] device_name = awesome_spotify_device username = awesome_ptl_member password = not_so_secret_password
Now restart spotifyd.
$ mkdir -p ~/.config/systemd/user $ cd ~/.config/systemd/user $ wget https://raw.githubusercontent.com/Spotifyd/spotifyd/master/contrib/spotifyd.service $ nano ./spotifyd.service
In the [Service] section change the path of the spotifyd executable to match yours. For example:
... [Service] ExecStart=/home/pi/spotify/spotifyd --no-daemon ...
Check if there is a Spotifyd process already running and if is the case kill it.
$ systemctl --user start spotifyd.service $ systemctl --user enable spotifyd.service $ systemctl --user status spotifyd.service