I have installed PiMusicbox successfully yesterday on my RasPi and entered my credentials for Spotify.
I have a Spotify premium account and I can see and play songs from my playlists via the web interface of Musicbox just fine.
However, neither on the Spotify app on my iPhone nor my Macbook seem to be recognizing Musicbox as a device which supports Spotify Connect.
What does happen is if I am playing a song from Spotify, through the web interface on the Musicbox, and then try to start a song through either my phone or laptop (in Spotify), music is stopped on Musicbox and starts playing on the other device. (which is in line with the normal functioning of Spotify)
The whole reason for me to try Musicbox was its Spotify Connect capability.
I have tried it also on an other RasPi this morning at an other location and network, and still have the same issue.
Does anyone have an idea what might be causing this? and if there is a way of solving it?
Musicbox doesn’t have Spotify Connect functionality as Spotify have not
publicly released Spotify Connect. It’s only available to their preferred
partner companies.
Where did you see that Musicbox offers Spotify Connect functionality?
Well, if I look at it once again, I see that somehow I assumed this to be true, because very vaguely I do remember reading about it. But I might have gotten too excited…
I now see other threads indeed that mention the fact that Spotify Connect is not released publicly yet.
I hope this serves as a reference for other people looking to do the same as I did.
All in all, I believe that Musicbox is still a very cool thing to run on the RasPi and will keep using it, with the hope that Spotify launches Connect as soon as possible.
I guess not,
In the meanwhile I purchased two Gramofons, they have native Spotify
Connect support, no Airplay though.
However if Spotify is the main platform you use, just get one, you won’t
regret it.
Then add this to the end of /opt/musicbox/startup.sh
# start Spotify Connect if enabled
if [ "$INI__spotify__enabled" == "1" ]
then
#start with cache to /dev/null to prevent disk full errors
/opt/librespot/librespot -a /opt/librespot/spotify_appkey.key -b "$INI__spotify__bitrate" -c /dev/null -n "$INI__network__name" -u "$INI__spotify__username" -p "$INI__spotify__password"
fi
And reboot. Enjoy!
It’s not completely stable though, but it works quite well. It will stop spitting out sound if you use shairport or mopidy. A reboot fixes that. See: https://github.com/plietar/librespot/issues/26
I tried the code and instructions for activating connect but it doesn’t seem to work on my raspberry pi 2. I’ve tried applying it to a clean install of pi musicbox, am I missing something?
Thanks for providing an instruction and a downloadable file. However, I can’t connect to your web server. No response on port 80. Is connect.zip available for download somehere else?
Thanks for providing an instruction and a downloadable file. However, I
can’t connect to your web server. No response on port 80. Is connect.zip
available for download somehere else?
Appreciate the work, but not having any joy. All that happens is that the first time I try and play a song the librespot process dies. I’ve tried running it manually and get the following before starting Spotify on my phone:
Authenticated !
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
kMessageTypeHello MusicBox 34aee17358367ce034fe6896a117955318021821 1 1463868028366
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: WireError("invalid value for enum: 11")', ../src/libcore/result.rs:688
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', ../src/libcore/result.rs:688
Then once opening Spotify on my phone the following line pops up:
thread '<main>' panicked at 'calledResult::unwrap()on anErrvalue: "SendError(..)"', ../src/libcore/result.rs:688
and the connect device disappears.
It would help if there was some logging I could go through
Also I found mopidy-spotify. I can’t see support for Connect. i could not get itcinstalled, because it needs python v2.7.5 while Musicbox has v2.7.3. And maybe it is already installed on musicbox with an older version of python.
As far as I know, there is no other Spotify connect for Mopidy.
There is a plug-in that allows Spotify Premium users to browse the Spotify music catalogue and playlists using the Mopidy interface. I guess this one is called mopidy-spotify.