Spotify Connect Plugin (old-volumio login with winscp)

I don’t understand: …because there is some problem to remove it… ???

I installed your latest package (October 21th 2016) with the big download. I took a while to donwload and install (15 minutes?). Unfortunately, it stayed “inactive” and didn’t show up as a Spotify Connect HW in my network. But upon further investigation I found, that the bash gave an error with my (complicatd) password in the commandline I quoted above. So I changed the template and it worked.

I am really glad I can Finally (!) enjoy direct Spotify Connect functionality on my aged “Raspberry Pi Model B+” with HiFiBerry DAC+.

Thanks again,
cheers,
Chris

I mean to uninstall…

@LoudenFM
I made some test with complex password and I can’t find the problem you met… Can you point me a case of password or username that may cause problem ? ( of course not yours :mrgreen: ). When I enter #$& it is correctly saved in config and used in startconnect.sh…

Hi,

just try one with semicolon “;” or braces “(” or commata “,” in it. My fix just uses a double quotation around the original, so bash doesn’t try to interpret the stuff in it. It should be safe to use, even without complex passwords…

Cheers,
Chris

Tried to install on rpi0 (arm6).
Download started, I waited (knew it was supposed to be long), but led turned off at some point, pi seemed dead: could not ssh anymore, etc.
Restarted, and found a truncated Volspotconnectchroot.tar.gz file on / (about 85MB out of 183MB)
Seems like download failed at some point for unknown reason, and install script did not catch the pb: so the whole rpi was probably taken down…strange.
Will try again.

Where can I find any other eventual defunct files for clean-up (temporary plugin installer folder, etc)?
Why is there a complete chroot for arm6?
Is that going to change in the short term and become lighter, similar to arm7 ?

Thanks for all the hard work.

Ok, re-installed after removing /Volspotconnectchroot.tar.gz file.
Works a treat on rpi0, thanks!!!

It seems re-install happened partly twice (maybe plugin management relaunched orphaned /tmp/downloaded_plugin.zip or something (found only afterwards). Therefore I had two files in/ during install:

volumio@volumio:/$ ls -la Vol* -rw-r--r-- 1 root root 182835856 Oct 11 21:28 Volspotconnectchroot.tar.gz -rw-r--r-- 1 root root 182835856 Oct 11 21:28 Volspotconnectchroot.tar.gz.1 and obviously the last one stayed in the end.
So might be sth to look-at in Volumio plugin-install management when first plugin install does not fail gracefully, so that some clean-up is done.

Anyhow, as far as Spotify Connect Plugin goes, all is good on Rpi0 / arm6
Still wishing you can build a smaller chroot for that one.
Would be nice if currently playing tracks, queue, and play status is fed back in Volumio UI, I guess this will come soon.

Merci beaucoup Balbuze, ça vaut un petit coup de Chartreuse couleur logo Spotify! :wink:

@macmpi
Good ! I know for the install that start twice… And don’t know what to do for that. The problem is that download starts twice and thus slow down everthing…
It is true that a lighter volspoconnectchroot would be great, but not sur we can remove a lot of stuff from it… This a limitation of the librspot library.
And the way I choose was the easiest : using something ready. A better way would be to write something in js that bind directly the lib… Not sur I’m able to do that.
And yes the album art and working buttons could be managed later. To wait you can test IP:4000 …
And the most important is to make it works with softvol…
What is your DAC?

Pour la charteuse, je vois qu’il y a des connaisseurs :smiley: :mrgreen:

Seems to be using original libspotify_embedded_shared.so, not librespot: am I wrong?

Currently I’m testing with HDMI out, but then will try with PHat DAC (similar to Hifiberry DAC)

Hi,

I am trying to install the spotify-connect-web plugin from balbuze.
The installation is no problem but the plugin stays inactive
Can somebody guide me here?

Hardware: RPi2 with external USB Behringer DAC.
Software: volumio-2.001-2016-10-15-pi.img

Steps:

  1. Volumio installation was no problem
  2. Selecting USB Behringer DAC was strange
    • When I selected CODEC and Generic I2S DAC (Which worked straight away in 1.55) and restarted…a HIFIBerry was selected (Software mixer??)
    • After that I again selected CODEC and Generic I2S DAC–>Now I had hardware mixer and SOUND!!!
      This results:

/data/plugins/music_service/volspotconnect/spotify-connect-web$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: sndrpihifiberry [snd_rpi_hifiberry_dac], device 0: HifiBerry DAC HiFi pcm5102a-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 5: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

  1. Now I uploaded the “volspotconnect.zip” plugin from ballbuze and installed it.
    • I unchecked the family shared device (don’t have it)
    • I filled in username and password (tried also empty credentials)

But the plugin stays inactive and in spotify app on phone no connect device visible.
my “startconnect.sh” looks like this:

cd /data/plugins/music_service/volspotconnect/spotify-connect-web
./spotify-connect-web --username ‘XXXX’ --password ‘XXXX’ --bitrate 320 --name ‘Volumio’ --playback_device hw:5 --mixer Digital --mixer_device_index 5 --dbrange 45 # &
avahi-publish-service ‘Volumio’ _spotify-connect._tcp 4000 VERSION=1.0 CPath=/login/_zeroconf

Please help…

Is it also possible with this plugin that anyone with a premium account can log in (avahi)?

hi!
You have to have a working system, with right output selected and "none " as mixer or a (working) hardware mixer.
Once everything is fine, save in the plugin setting. Of course you have to enter right credentials.
If after that, it is still not working, can you check from a ssh console :

systemctl -l status volspotconnect

if not running you can try to launch it by “hand” to see the error message :

sh ./data/plugins/music_service/volspotconnect/spotify-connect-web/startconnect.sh and paste the result.
Do you use complex password with ()/;$"# etc… ? If yes this might be the problem. A other user reports it…
let me know

SSH the result of: systemctl -l status volspotconnect:
/data/plugins/music_service/volspotconnect$ systemctl -l status volspotconnect
● volspotconnect.service - Volspotconnect Daemon
Loaded: loaded (/etc/systemd/system/volspotconnect.service; disabled)
Active: active (running) since Sun 2016-11-13 13:25:15 UTC; 14min ago
Main PID: 6142 (bash)
CGroup: /system.slice/volspotconnect.service
├─6142 /bin/bash /data/plugins/music_service/volspotconnect/spotify-connect-web/startconnect.sh
└─6162 avahi-publish-service Volumio _spotify-connect._tcp 4000 VERSION=1.0 CPath=/login/_zeroconf

Result of launching “startconnect.sh” by hand in SSH:

username: volumio
password: volumio

/data/plugins/music_service/volspotconnect$ sh ./data/plugins/music_service/volspotconnect/spotify-connect-web/startconnect.sh
sh: 0: Can’t open ./data/plugins/music_service/volspotconnect/spotify-connect-web/startconnect.sh

error code 127

Do I have the correct user rights?

Hi!
what I see :
volspotconnect is not running
You have to be on the / rep to enter command because it is a relatif path, so :

cd / sh ./data/plugins/music_service/volspotconnect/spotify-connect-web/startconnect.sh
and please paste what returns

amixer -c 5

Please remove your credentials before posting…use XXX instead.

Result running startconnect.sh:

login as: volumio
volumio@xxx.xxx.xxx.xxx’s password:
___
/_ \ __
__ __ //\ \ __ __ ___ ___ /_\ ___
/\ /\ \ / __\\ \ \ /\ \/\ \ /' __ __\/\ \ / __
\ \ _/ |/\ \L\ \
\ _\ \ _\ /\ /\ /\ \ \ /\ \L\
\ _
/ \ _//_\ _/\ _\ _\ _\ _\ _/
// // // // /////////___/

         Free Audiophile Linux Music Player - Version 2.0

      C 2015 Michelangelo Guarise - Volumio Team - Volumio.org

Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
volumio@volumio:~$ cd /
volumio@volumio:/$ sh ./data/plugins/music_service/volspotconnect/spotify-connect-web/startconnect.sh
Loading Spotify library…
Traceback (most recent call last):
File “loader.py”, line 3, in
File “runpy.py”, line 180, in run_module
File “runpy.py”, line 72, in _run_code
File “/data/plugins/music_service/volspotconnect/spotify-connect-web/main.py”, line 14, in
from connect import Connect
File “/data/plugins/music_service/volspotconnect/spotify-connect-web/connect.py”, line 9, in
from console_callbacks import audio_arg_parser, mixer, error_callback, connection_callbacks, debug_callbacks, playback_callbacks, playback_setup
File “/data/plugins/music_service/volspotconnect/spotify-connect-web/console_callbacks.py”, line 104, in
mixer = alsa.Mixer(args.mixer, **mixer_card_arg)
alsaaudio.ALSAAudioError: Unable to find mixer control Digital,0 [hw:5]
Failed to execute script loader
Established under name ‘Volumio’

And amixer -c 5 result:
volumio@volumio:~$ amixer -c 5
Simple mixer control ‘PCM’,0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 128
Mono:
Front Left: Playback 108 [84%] [-20.00dB] [on]
Front Right: Playback 108 [84%] [-20.00dB] [on]

Update: I see what the problem is

In the Volumio 2 Play Back Options of the selected Generic-IS2-DAC, the mixer control name field only gives Digital as an option and it should be PCM. I can see the option PCM when I click on the field,but I can’t select nor save it.
I changed manually the “startconnect.sh” file --mixer Digital to --mixer PCM, run it from the ssh console and…BAMMMM running!

Looks like the external USB Audio DAC is not installed/selected correctly, I did mention in my first thread.
That is why Spotify Connect Web cannot pass the “startconnect.sh”.
Why does Volumio 2 selects a Hifiberry DAC when I choose CODEC and Generic-IS2-DAC (also no sound)
And why does the Audio works when I try the same selection for the second time?
The Hifiberry DAC codec also stays in the output device list after selecting CODEC and Generic-I2S-DAC for the 2nd time.

I can see you have a hifiberry dac and a USB dac. You can disable i2s dac if use only usb. I noticed this problem of mixer. You can also remove /data/configuration/audio_interface/alsa_controller/config.json and restart volumio “killall node”.
Or update to a recent dev version… But the problem does not come from the plugin.
And even if changing by hand startconnect.sh works, if you save the output or mixer or device name, it will be replaced with paramter given by volumio…

I was right…I didn’t setup the USB device correctly…got an answer from the DAC department :wink:
With an USB Audio device the I2S is not needed.
Now it is working properly, thanx for the help

Have you also figured out already how to stop the mpd (e.g. webradio) when a spotify connect song is send from my phone?

good !
just to know, does your mixer work, I mean the volume changes ?

Well if I change the volume button on my phone the volume on the RPi is changing too…so I guess yes?

very good :smiley:
thank you!

No…thank YOU!

And how about my other question?
When music is playing on Volumio (Webradio, Airplay, etc) and I want to play a song on the Spotify Connect Device, the running music does not stop.
I have to stop it manually and then send the song to the spotify connect device.
Is that an issue which can’t be fixed or no solution found yet?

Oh and another small question: what does the setting --dbrange 45 in the “startconnect.sh” file mean?

for your first question, yes you have to stop what is playing on volumio to be able to use spotify-connect. I know this, but I don’t know how to solve it (in fact I have a small idea but I’m working on a other plugin (brutefir) and maybe one day…(and I’m not sure my idea is good)
dbrange -45 is here to to help having a volume control nearest to the control in volumio and avoiding starting with a to loud volume. If you think you need a other value (you can test between 1 to 80 (I don’t know the max value) let me know. I will change it or adding a selector in the plugin config… But not sure it needs to be change…