Mopidy + Spotify Connect / Raspotify

Hey there,

I’m wondering what the recent options are of how to get Raspberry Pi working with Mopidy AND Spotify Connect. I love both and don’t wanna miss one.

My setup consists of a Raspberry Pi 3 with the HiFiBerry Amp 2 connected. I’m running Mopidy 2.1 with Mopidy-Spotify and TuneIn backend extensions, which works like a charm. Parallel to this installation I’m running Raspotify which leverages librespot and enables the use of Spotify Connect. Raspotify also works like a charm - if I run it separately…

Once one of both is running and playing music I’m not able to start playing the other one. In order to play music using Spotify Connect I need to manually stop the mopidy server and vice versa.

Does anybody have an idea of how to get both running together seamlessly. Or is there another way of how to integrate Spotify Connect with Mopidy?

Pimusicbox uses the librespot onevent handler to issue a MPD stop command to Mopidy when librespot playback starts. You could also configure an ALSA dmix device to allow both programs to output to the soundcard at the same time (but you’d still need to remember to stop and start them both to avoid a garbled mess).

Hi all, that works perfectly well – is there a chance to display the current track from Spotify connect in Mopidy Front end? If we cannot display the current track in that view, is at least possible to display a spotify connect logo? Thanks MK

I was googling a bit and I figured it could be done some how as described here:

So the song play events can be captured and collected and we could maybe create a plugin to mopidy that just collects these events and displays it on the now playing page …
Isn’t that possible?
Best regards

Very possible to use the Spotify Web API for that. Not entirely sure if the auth token used by Mopidy-Spotify has the necessary permissions (scopes) to access that part of the API. If not, you may be able to ask @adamcik to add what’s needed (if you find out). I’m not personally interested in adding this to my webclient as I think it would just be confusing, but maybe it just needs some effort in the UI department.

The current default scope is set to:


Older tokens might be missing at least streaming.