Reply To: [NEW UPDATE] Spotify Connect Server – beta available!

Max2Play Home Forums Max2Play Development (Ideas, Wishes) [NEW UPDATE] Spotify Connect Server – beta available! Reply To: [NEW UPDATE] Spotify Connect Server – beta available!

23. April 2017 at 20:45 #28420

This is how I did this – I think it should be quite an easy to implement this as plugin in max2play.

Step by step (you need to be root):
1. Look up the most recent release of librespot and copy the link to the latest ZIP-file
2. SSH into your Pi and get the ZIP (example; copy your own link after ‚wget‘):
wget https://github.com/herrernst/librespot/releases/download/v20170413-d95c0b3/librespot-linux-armhf-raspberry_pi.zip
3. Unzip:
unzip librespot-linux-armhf-raspberry_pi.zip
4. Create the service definition:
nano /etc/systemd/system/spotify-connect.service
5. Paste the following into the empty file:

[Unit]
Description=Librespot
Requires=network-online.target
After=network-online.target

[Service]
User=root
Restart=always
RestartSec=10
ExecStart=/root/librespot --name SpotiPi --username renebouwmeester --password ******** --disable-discovery --cache /tmp --bitrate 320 --device hw:0 > /dev/null 2>&1

[Install]
WantedBy=multi-user.target

6. Save with CTRL-X, Y
7. Reload daemons:
systemctl daemon-reload
8. Enable your new service:
systemctl enable spotify-connect.service
9. Enable and activate your new service:
systemctl start spotify-connect.service

This works for me on two max2play installations:
1. Hifiberry Digi+ Pro (multisuqeeze – hw:0 is my Hifiberry – hw:1 is USB DAC)
You need to add -C <sec> option to squeezelite command line
-C 10
2. IQAudio DigiAmp+
You need to add -C <sec> option to squeezelite command line
-o hw:CARD=IQaudIODAC -V Digital -C 10
(I’ve removed -Q option as after closing output device alsa volume was set to 0 – librespot does only software volume)
3. For USB DAC you need to use plughw:CARD=<name> – use aplay -L to get this name, in my case it’s:
plughw:CARD=Pro
That’s for Matrix Mini-i Pro 2014

Other options worth mentioning:
Enable I2S-MMAP (Mixerdevice for Soundcards) – ON
Disable IPv6 – OFF (this gave me error as it’s turned ON as default)
Disable Build-In-Audio on RPI3 – ON

Credits:
https://github.com/herrernst/librespot
https://community.roonlabs.com/t/spotify-connect-on-your-roonbridged-pi-the-quick-n-easy-way/17896
https://github.com/herrernst/librespot/releases/

  • This reply was modified 7 years ago by cpu.
  • This reply was modified 7 years ago by cpu.
  • This reply was modified 7 years ago by cpu. Reason: updated