Spotify Connect

I just jumped into the world of Pi, and set up Volumio 2 on my Pi Zero and boy am I loving it!

To make it seamless, I am trying to get Spotify Connect up and running on it as well.
Has anyone managed to spotify-web-connect running on a Pi 1/Zero? Would appreciate some tips.

I built it from source, and on attempting to run main.py I run into the following issues:

volumio@volumio:~/spotify-connect-web$ python connect.py -u User-p Pass-d Loading Spotify library... Traceback (most recent call last): File "connect.py", line 8, in <module> from connect_ffi import ffi, lib, C File "/home/volumio/spotify-connect-web/connect_ffi.py", line 23, in <module> libraries=[str('spotify_embedded_shared')]) File "/usr/local/lib/python2.7/dist-packages/cffi/api.py", line 437, in verify lib = self.verifier.load_library() File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py", line 114, in load_library return self._load_library() File "/usr/local/lib/python2.7/dist-packages/cffi/verifier.py", line 225, in _load_library return self._vengine.load_library() File "/usr/local/lib/python2.7/dist-packages/cffi/vengine_cpy.py", line 158, in load_library raise ffiplatform.VerificationError(error) cffi.ffiplatform.VerificationError: importing '/home/volumio/spotify-connect-web/__pycache__/_cffi__x4c785defx96dcd04b.arm-linux-gnueabihf.so': libspotify_embedded_shared.so: cannot open shared object file: No such file or directory volumio@volumio:~/spotify-connect-web$ ls =0.9.2 README.md connect_ffi.pyc requirements.txt spotify_appkey.key Dockerfile __pycache__ console_callbacks.py run-with-docker static LICENSE connect.py libspotify_embedded_shared.so spotify.h templates Makefile.docker connect_ffi.py main.py spotify.processed.h utils.py

Have also asked for help at Fornoth’s github

Also, has anyone tried librespot so far?

UPDATE:
I succumbed and used a pre-build chroot. I have it up and running on my Zero :smiley:

After getting the spotify-connect-web.sh working well, I am not trying to get run it as a service on startup using systemctl .

I have created a spotify-connect.service file under /usr/lib/systemd/system/

[Unit]
Description=Spotify Connect
After=network.target

[Service]
ExecStart=/usr/bin/sh /home/volumio/spotify-connect-web.sh --username xx --password xxx  --bitrate 320 -$
Restart=always
RestartSec=10
StartLimitInterval=30
StartLimitBurst=20

[Install]
WantedBy=multi-user.target

However, when I try a systemctl start spotify-connect and then check the status using systemctl status spotify-connect
I run in to the following error.

volumio@volumio:~$ sudo systemctl status spotify-connect
● spotify-connect.service - Spotify Connect
   Loaded: loaded (/usr/lib/systemd/system/spotify-connect.service; enabled)
   Active: activating (auto-restart) (Result: exit-code) since Sat 2016-07-23 03:15:46 UTC; 6s ago
  Process: 4313 ExecStart=/usr/bin/sh /home/volumio/spotify-connect-web.sh --username xx --password xxx--bitrate 320 -D 5 -m PCM --mixer_device_index 5 (code=exited, status=203/EXEC)
 Main PID: 4313 (code=exited, status=203/EXEC)

Jul 23 03:15:46 volumio systemd[1]: spotify-connect.service: main process exited, code=exited, status=203/EXEC
Jul 23 03:15:46 volumio systemd[1]: Unit spotify-connect.service entered failed state.

Any pointers?

Hi everybody,

Will Spotify Connect come to Volumio2 ? I remember having read Michelangelo saying that you were working on it.

I’ve tried Fornoth method on V2 0.976 but it doesn’t work. Volumio does appear as Spotify Connect device but no sound is coming out the Pi. I don’t know what the problem is because it works very fine on 1.55 and with the integrated spotify plugin in V2.

I use Volumio + HifiBerry Digi connected to a Marantz amp with integrated DAC.

Btw, Volumio2 looks really awesome and the plugin feature let’s hope great development in the future. Nice job !

Just installed Volumio 2. Everything sofar works great. I only cannot find Spotify Connect. I have installed the Spotify plugin, this works perfect. So, is Spotify Connect in Volumio 2? Had it working in Volumio 1.55; it worked great.

Thanks.

No, it´s not. Maybe in future versions.

It’s under development, see below:

volumio-login-with-winscp-t4524-10.html#p20550

Listening to Spotify on Volumio 2 via Spotify Connect as I type this and it’s awesome!

Is there easy way to make Spotify connect work? Like a plugin.

I see all kind of difficult instructions on the internet to make this work. But it is a bit confusion…

found in
powerpi.de/spotify-connect-auf-d … bedienung/

github.com/balbuze/volumio-plug … potconnect

Yes just try : [url]https://github.com/balbuze/volumio-plugins/tree/master/plugins/music_service/volspotconnect/url] .
You just need volspoconnect.zip file
To know : no sound with Software mixer …
It is done for volumio2 :smiley:
Have a look at the readme!

Thanks! Tried that and the plugin is installed but stays inactive…

Pi3 with Volumio. hifiberry dac+(phone jack version)

After several hours working. finally i can choose different player(PC…PHONE and Pi3 with Volumio that can auto start when boot)
but there is no sound that speaker connected to hifiberry dac+ phone jack when playing Spotify .
However it works perfect in website(volumio.local) when playing radio and spotify plugin

any one has suggestion ? . thanks a lot

Please, write in the spotify connect plugin thread, not here:
spotify-connect-t2811-120.html#p24670

Sorry for that. Dont know how to move post to another place…maybe i have no right to do that ?

Any way i just found the solutions myself
Just add “–device 1” after “sudo /root/spotify-connect-web.sh --name PI3 --username name --password pwd --bitrate 320” in /etc/rc.local
–device 1 is my hifiberry dac. Force to assign dac to be default output when boot

@naish
Just some basic : you need a premium or family account
If ok in order to help you, I need :
-your device : (RPI1 RPI2 RP3…)
-your DAC (usb / i2c)
-mixer used in volumio (none, software, hardware). If hardware its name (Digital, PCM etc)
-version of the plugin (have a look in package.json)
-and paste the content of startconnect.sh by typing :

 cat /data/plugins/music_service/volspotconnect/spotify-connect-web/startconnect.sh

please change your credentials with XXX

:/data/plugins/music_service/volspotconnect/spotify-connect-web$
./spotify-connect-web --username ‘ps’ --password ‘’ --bitrate 320 --name ‘Volumio’ --playback_device plughw:1 --mixer ‘’ --mixer_device_index 1 --dbrange 45 &
[1] 19322
volumio@volumio:/data/plugins/music_service/volspotconnect/spotify-connect-web$
avahi-publish-service ‘Volumio’ _spotify-connect._tcp 4000 VERSION=1.0 CPath=/login/_zeroconf
mount: only root can use “–bind” option

-I use a hifiberry dac
-no mixer used
-a RPI2

Note: I have a Spotify key but don’t know were to place it.

hi!
I don’t undesrtand why and how you have a “mount: only root can use “–bind” option” … using a

     cat /data/plugins/music_service/volspotconnect/spotify-connect-web/startconnect.sh

Anyway, it should work.
Requirement :
Your system have a working system with volumio
you have installed the plugin
you have set good user name and passwd
you have no other device using and playing music with this account
you have saved
volumio is not playing something
In the official app when playing something you should no see a device, select it, that it.

Hello,

thanks a lot for the work to implement spotify connect. It general it works fine for me. But with my HifiBerry DAC I need to use a softvol (ALSA type) device to control the volume. I succeded to install this device in ALSO and it seems to be controlled over Spotify (when I change volume over Spotify I can see the changes in this mixer).

But whenever I connect this SW device (which is routed to my HifiBerry DAC as output) to Spotify connect it fails. I always get the message that no PCM device of this name can be found.

What am I doing wrong here?

Joachim

Trying to install your plugin, balbuze, it only gets to 10%, saying: “Downloading plugin at 127.0.0.1:3000/plugin-serve/volspotconnect.zip”. I’ve let it run for many hours, nothing happens.

Please check if the file you have downloaded is a valid zip file… Or re download it : https://github.com/balbuze/volumio-plugins/raw/master/plugins/music_service/volspotconnect/volspotconnect.zip

Soved the problem!

Installed your latest “light” version (1.5.1) and changed the mixer type to Software. And suddenly it worked!