New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can Spotify Connect be supported? #14

Open
alesch opened this Issue Mar 18, 2014 · 28 comments

Comments

@alesch

alesch commented Mar 18, 2014

My guess is that Spotify has not added this feature to the library you are using.
I do not know whether its protocol has been reversed already.
Any thoughts on this?

@kingosticks

This comment has been minimized.

Show comment
Hide comment
@kingosticks

kingosticks Mar 18, 2014

Member

Correct, it's not exposed in libspotify (the official library). But doesn't
the mpd architecture already give you this functionality? Or am I missing
something?
On 18 Mar 2014 00:13, "Alex Schenkman" notifications@github.com wrote:

My guess is that Spotify has not added this feature to the library you are
using.
I do not know whether its protocol has been reversed already.
Any thoughts on this?

Reply to this email directly or view it on GitHubhttps://github.com/mopidy/mopidy-spotify/issues/14
.

Member

kingosticks commented Mar 18, 2014

Correct, it's not exposed in libspotify (the official library). But doesn't
the mpd architecture already give you this functionality? Or am I missing
something?
On 18 Mar 2014 00:13, "Alex Schenkman" notifications@github.com wrote:

My guess is that Spotify has not added this feature to the library you are
using.
I do not know whether its protocol has been reversed already.
Any thoughts on this?

Reply to this email directly or view it on GitHubhttps://github.com/mopidy/mopidy-spotify/issues/14
.

@kingosticks

This comment has been minimized.

Show comment
Hide comment
@kingosticks

kingosticks Mar 18, 2014

Member

So I looked at this a bit more since I'd forgotten about Spotify Connect, was curious, and thought I'd share...

Spotify Connect is a whole bunch of stuff which essentially just separates the playback and control of spotify music. It enables "smart" playback devices (certain wireless speakers and amps) to stream directly from the internet rather than being fed audio from a (usually docked/wired) local source e.g. mobile device or computer. This makes it easy for Joe Bloggs to avoid using his cruddy phone/tablet speakers, draining his battery and interrupting his music with phone notifications. So there are a few parts to it:

  • Internet streaming direct to the playback devices
  • "Cloud based" session for seamless playback between devices
  • Control of all these playback devices with the traditional spotify client

I'm assuming they are doing the control through UPnP/DLNA with the speakers/amp as a renderer and the spotify client as a controller. Looking at the two currently supported wireless audio chipsets (Venice 6.5 & JukeBlox 3), the only fancy stuff is the "direct to device" streaming capability.

All in all, it doesn't sound too dissimilar to what you can do with an MPD setup now - providing you can get the audio to the playback device. It also doesn't sound a world away from what you could do with some extra UPnP magic.

Saying all that ... what exactly do you mean when you say Spotify Connect support? Do you mean:

  • Cloud-based sessions so you can seamlessly switch between playback through official spotify clients and through mopidy?
  • Having "Connect enabled" speakers and amps automatically discovered and usable as "MPD outputs" in mopidy?
  • Controlling mopidy through a spotify client as if it were just another "smart" speaker/amp.
  • Something else entirely?
Member

kingosticks commented Mar 18, 2014

So I looked at this a bit more since I'd forgotten about Spotify Connect, was curious, and thought I'd share...

Spotify Connect is a whole bunch of stuff which essentially just separates the playback and control of spotify music. It enables "smart" playback devices (certain wireless speakers and amps) to stream directly from the internet rather than being fed audio from a (usually docked/wired) local source e.g. mobile device or computer. This makes it easy for Joe Bloggs to avoid using his cruddy phone/tablet speakers, draining his battery and interrupting his music with phone notifications. So there are a few parts to it:

  • Internet streaming direct to the playback devices
  • "Cloud based" session for seamless playback between devices
  • Control of all these playback devices with the traditional spotify client

I'm assuming they are doing the control through UPnP/DLNA with the speakers/amp as a renderer and the spotify client as a controller. Looking at the two currently supported wireless audio chipsets (Venice 6.5 & JukeBlox 3), the only fancy stuff is the "direct to device" streaming capability.

All in all, it doesn't sound too dissimilar to what you can do with an MPD setup now - providing you can get the audio to the playback device. It also doesn't sound a world away from what you could do with some extra UPnP magic.

Saying all that ... what exactly do you mean when you say Spotify Connect support? Do you mean:

  • Cloud-based sessions so you can seamlessly switch between playback through official spotify clients and through mopidy?
  • Having "Connect enabled" speakers and amps automatically discovered and usable as "MPD outputs" in mopidy?
  • Controlling mopidy through a spotify client as if it were just another "smart" speaker/amp.
  • Something else entirely?
@ajcrowe

This comment has been minimized.

Show comment
Hide comment
@ajcrowe

ajcrowe Apr 25, 2014

From my perspective I would much prefer to use the native Spotify interface and send tracks/playlists/albums to my Mopidy server to play then use any of the MPD clients / Web interfaces available.

So I would vote for point 3 being where I would like to see it implemented.

ajcrowe commented Apr 25, 2014

From my perspective I would much prefer to use the native Spotify interface and send tracks/playlists/albums to my Mopidy server to play then use any of the MPD clients / Web interfaces available.

So I would vote for point 3 being where I would like to see it implemented.

@Alex131089

This comment has been minimized.

Show comment
Hide comment
@Alex131089

Alex131089 May 10, 2014

I'd love to have this too :)
Use Spotify from my smartphone to control my Pi+speakers (through Pi MusicBox & Mopidy) as if it was an expensive smart speaker.

Alex131089 commented May 10, 2014

I'd love to have this too :)
Use Spotify from my smartphone to control my Pi+speakers (through Pi MusicBox & Mopidy) as if it was an expensive smart speaker.

@jodal

This comment has been minimized.

Show comment
Hide comment
@jodal

jodal May 10, 2014

Member

I recently asked a couple of Spotify engineers about Spotify Connect, with especial focus on part three: Controlling mopidy through a spotify client as if it were just another "smart" speaker/amp.

This is what I learned:

  • The playing device (e.g. Mopidy) streams music directly from Spotify's servers. The controlling device (Spotify app on your phone) may be removed and the music will continue playing.
  • Spotify Connect is entirely custom. It has nothing to do with UPnP/DLNA, Qualcomm Allplay, Chromecast's DIAL, or similar.
  • Control is done through Spotify's servers, not directly over your local network.
  • There is no special hardware required.
  • Eventually there will be a public SDK for Connect functionality. Currently this SDK is only being distributed to Spotify Partners.
  • Reverse engineering the protocol is supposedly quite hard, so we're recommended to sit tight waiting for the SDK.

Personally, I'm very interested in creating a Mopidy frontend for Spotify Connect when the SDK arrives.

Member

jodal commented May 10, 2014

I recently asked a couple of Spotify engineers about Spotify Connect, with especial focus on part three: Controlling mopidy through a spotify client as if it were just another "smart" speaker/amp.

This is what I learned:

  • The playing device (e.g. Mopidy) streams music directly from Spotify's servers. The controlling device (Spotify app on your phone) may be removed and the music will continue playing.
  • Spotify Connect is entirely custom. It has nothing to do with UPnP/DLNA, Qualcomm Allplay, Chromecast's DIAL, or similar.
  • Control is done through Spotify's servers, not directly over your local network.
  • There is no special hardware required.
  • Eventually there will be a public SDK for Connect functionality. Currently this SDK is only being distributed to Spotify Partners.
  • Reverse engineering the protocol is supposedly quite hard, so we're recommended to sit tight waiting for the SDK.

Personally, I'm very interested in creating a Mopidy frontend for Spotify Connect when the SDK arrives.

@jodal jodal added the question label May 10, 2014

@jodal jodal changed the title from Can Spotify connect be supported? to Can Spotify Connect be supported? May 10, 2014

@kingosticks

This comment has been minimized.

Show comment
Hide comment
@kingosticks

kingosticks May 10, 2014

Member

I can totally confirm the last point. I spent a good while with wireshark
and got nowhere other than the broadcast done to advertise the service.
Good news they plan to release it.
On 10 May 2014 18:25, "Stein Magnus Jodal" notifications@github.com wrote:

I recently asked a couple of Spotify engineers about Spotify Connect, with
especial focus on part three: Controlling mopidy through a spotify client
as if it were just another "smart" speaker/amp.

This is what I learned:

  • The playing device (e.g. Mopidy) streams music directly from
    Spotify's servers. The controlling device (Spotify app on your phone) may
    be removed and the music will continue playing.
  • Spotify Connect is entirely custom. It has nothing to do with
    UPnP/DLNA, Qualcomm Allplay, Chromecast's DIAL, or similar.
  • Control is done through Spotify's servers, not directly over your
    local network.
  • There no special hardware required.
  • Eventually there will be a public SDK for Connect functionality.
    Currently this SDK is only being distributed to Spotify Partners.
  • Reverse engineering the protocol is supposedly quite hard, so we're
    recommended to sit tight waiting for the SDK.

Personally, I'm very interested in creating a Mopidy frontend for
Spotify Connect when the SDK arrives.


Reply to this email directly or view it on GitHubhttps://github.com/mopidy/mopidy-spotify/issues/14#issuecomment-42748374
.

Member

kingosticks commented May 10, 2014

I can totally confirm the last point. I spent a good while with wireshark
and got nowhere other than the broadcast done to advertise the service.
Good news they plan to release it.
On 10 May 2014 18:25, "Stein Magnus Jodal" notifications@github.com wrote:

I recently asked a couple of Spotify engineers about Spotify Connect, with
especial focus on part three: Controlling mopidy through a spotify client
as if it were just another "smart" speaker/amp.

This is what I learned:

  • The playing device (e.g. Mopidy) streams music directly from
    Spotify's servers. The controlling device (Spotify app on your phone) may
    be removed and the music will continue playing.
  • Spotify Connect is entirely custom. It has nothing to do with
    UPnP/DLNA, Qualcomm Allplay, Chromecast's DIAL, or similar.
  • Control is done through Spotify's servers, not directly over your
    local network.
  • There no special hardware required.
  • Eventually there will be a public SDK for Connect functionality.
    Currently this SDK is only being distributed to Spotify Partners.
  • Reverse engineering the protocol is supposedly quite hard, so we're
    recommended to sit tight waiting for the SDK.

Personally, I'm very interested in creating a Mopidy frontend for
Spotify Connect when the SDK arrives.


Reply to this email directly or view it on GitHubhttps://github.com/mopidy/mopidy-spotify/issues/14#issuecomment-42748374
.

@vizzah

This comment has been minimized.

Show comment
Hide comment
@vizzah

vizzah Aug 5, 2014

If you'd like to know more about Spotify Connect, check this out:
http://divideoverflow.com/2014/08/reversing-spotify-connect/

vizzah commented Aug 5, 2014

If you'd like to know more about Spotify Connect, check this out:
http://divideoverflow.com/2014/08/reversing-spotify-connect/

@jodal jodal added this to the Later milestone Sep 8, 2014

@jodal jodal added enhancement and removed question labels Sep 8, 2014

@LandonSchropp

This comment has been minimized.

Show comment
Hide comment
@LandonSchropp

LandonSchropp commented Oct 24, 2014

👍

@geekbleek

This comment has been minimized.

Show comment
Hide comment
@geekbleek

geekbleek Oct 31, 2014

I would love to see this functionality in mopidy!!

geekbleek commented Oct 31, 2014

I would love to see this functionality in mopidy!!

@ulilicht

This comment has been minimized.

Show comment
Hide comment
@ulilicht

ulilicht Nov 7, 2014

When reading the comments here: https://developer.spotify.com/technologies/libspotify/ it seems that there won't be any integration of Spotify Connect into libspotify soon.

ulilicht commented Nov 7, 2014

When reading the comments here: https://developer.spotify.com/technologies/libspotify/ it seems that there won't be any integration of Spotify Connect into libspotify soon.

@jodal

This comment has been minimized.

Show comment
Hide comment
@jodal

jodal Nov 7, 2014

Member

libspotify is barely maintained. I'm guessing that freely available Spotify Connect functionality will be available through a new library.

Member

jodal commented Nov 7, 2014

libspotify is barely maintained. I'm guessing that freely available Spotify Connect functionality will be available through a new library.

@ulilicht

This comment has been minimized.

Show comment
Hide comment
@ulilicht

ulilicht Nov 7, 2014

Was there any hint that Spotify Connect will be freely available or are you
talking about the reverse engineered approach?

Stein Magnus Jodal notifications@github.com schrieb am Fri Nov 07 2014 at
13:58:25:

libspotify is barely maintained. I'm guessing that freely available
Spotify Connect functionality will be available through a new library.


Reply to this email directly or view it on GitHub
#14 (comment)
.

ulilicht commented Nov 7, 2014

Was there any hint that Spotify Connect will be freely available or are you
talking about the reverse engineered approach?

Stein Magnus Jodal notifications@github.com schrieb am Fri Nov 07 2014 at
13:58:25:

libspotify is barely maintained. I'm guessing that freely available
Spotify Connect functionality will be available through a new library.


Reply to this email directly or view it on GitHub
#14 (comment)
.

@jodal

This comment has been minimized.

Show comment
Hide comment
@jodal

jodal Nov 7, 2014

Member

No, there wasn't. I haven't been in contact with Spotify about this since my comment on May 10.

Member

jodal commented Nov 7, 2014

No, there wasn't. I haven't been in contact with Spotify about this since my comment on May 10.

@sashahilton00

This comment has been minimized.

Show comment
Hide comment
@sashahilton00

sashahilton00 Dec 2, 2014

@jodal has spotify provided any update to you on when it will be released, or are we still being left in the dark?

sashahilton00 commented Dec 2, 2014

@jodal has spotify provided any update to you on when it will be released, or are we still being left in the dark?

@jodal

This comment has been minimized.

Show comment
Hide comment
@jodal

jodal Dec 2, 2014

Member

I have no news so far.

Member

jodal commented Dec 2, 2014

I have no news so far.

@woutervanwijk

This comment has been minimized.

Show comment
Hide comment

woutervanwijk commented Dec 19, 2014

@calgot

This comment has been minimized.

Show comment
Hide comment
@calgot

calgot Jan 8, 2015

Just adding a +1 for alternative 3 above, just bought a Pi with MusicBox to get simple streaming to my stereo without realising I needed Spotify Connect for it to work like I'd like... I hope Spotify will release something soon.

calgot commented Jan 8, 2015

Just adding a +1 for alternative 3 above, just bought a Pi with MusicBox to get simple streaming to my stereo without realising I needed Spotify Connect for it to work like I'd like... I hope Spotify will release something soon.

@fyksen

This comment has been minimized.

Show comment
Hide comment
@fyksen

fyksen Feb 26, 2015

Would love to see this implemented. Makes it easy to make a spotify speaker with a raspberry pi.

fyksen commented Feb 26, 2015

Would love to see this implemented. Makes it easy to make a spotify speaker with a raspberry pi.

@dennisfisch

This comment has been minimized.

Show comment
Hide comment
@dennisfisch

dennisfisch Mar 1, 2015

+1 from me as well, this would be absolutely awesome.

dennisfisch commented Mar 1, 2015

+1 from me as well, this would be absolutely awesome.

@sashahilton00

This comment has been minimized.

Show comment
Hide comment
@sashahilton00

sashahilton00 Mar 13, 2015

Hi guys,

we are currently in the process of assembling any developers who are interested in making Spotify Connect an open protocol that can be integrated with any projects of your choosing. Anyone who is willing to help is welcome, especially those who know a thing or two about reverse engineering ;)

If you are interested, have a look at the central repo that holds resources related to this project: https://github.com/sashahilton00/spotify-connect-resources
and come and introduce yourself over on the chatroom, we wont bite ;) https://gitter.im/sashahilton00/spotify-connect-resources

See you soon, I hope :)

sashahilton00 commented Mar 13, 2015

Hi guys,

we are currently in the process of assembling any developers who are interested in making Spotify Connect an open protocol that can be integrated with any projects of your choosing. Anyone who is willing to help is welcome, especially those who know a thing or two about reverse engineering ;)

If you are interested, have a look at the central repo that holds resources related to this project: https://github.com/sashahilton00/spotify-connect-resources
and come and introduce yourself over on the chatroom, we wont bite ;) https://gitter.im/sashahilton00/spotify-connect-resources

See you soon, I hope :)

@sashahilton00

This comment has been minimized.

Show comment
Hide comment
@sashahilton00

sashahilton00 Jun 6, 2015

I figured an update was probably in order... we have managed to reverse the authentication, encryption and transport protocols for Connect, and have a rudimentary client working as a PoC. A library is now under development, so hopefully this will be a reality soon... The library in progress can be found here: https://github.com/plietar/spotify-connect/tree/librespot

sashahilton00 commented Jun 6, 2015

I figured an update was probably in order... we have managed to reverse the authentication, encryption and transport protocols for Connect, and have a rudimentary client working as a PoC. A library is now under development, so hopefully this will be a reality soon... The library in progress can be found here: https://github.com/plietar/spotify-connect/tree/librespot

@psych0d0g

This comment has been minimized.

Show comment
Hide comment
@psych0d0g

psych0d0g Jun 24, 2015

im VERY interested in point 3 myself!
my current approach to get spotify music on mopidy from my mobile phones i quite ugly:

root device
Use bubbleupnp Licensed version
Install xposed framework
enable bubbleupnp xposed module
start playback from spotify on android phone

Here the audio gets captured by the xposed bubbleupnp module and streamed to musicbox via upnp which introduces alot of audio latency and way more load on my android device (thus reducing battery life) than when using native spotify connect

psych0d0g commented Jun 24, 2015

im VERY interested in point 3 myself!
my current approach to get spotify music on mopidy from my mobile phones i quite ugly:

root device
Use bubbleupnp Licensed version
Install xposed framework
enable bubbleupnp xposed module
start playback from spotify on android phone

Here the audio gets captured by the xposed bubbleupnp module and streamed to musicbox via upnp which introduces alot of audio latency and way more load on my android device (thus reducing battery life) than when using native spotify connect

@robo-hamburger

This comment has been minimized.

Show comment
Hide comment
@robo-hamburger

robo-hamburger Jul 17, 2015

Not sure how to solve this but just installing modipy with this extension bundled I was pretty confused when connect did not work (it didn't even occur to me it was just a client).

Only after ssh in seeing there were no errors and finding this bug did I figure out it was not supported. I wonder if there is a way to make it clearer connect is not supported in the UI?

robo-hamburger commented Jul 17, 2015

Not sure how to solve this but just installing modipy with this extension bundled I was pretty confused when connect did not work (it didn't even occur to me it was just a client).

Only after ssh in seeing there were no errors and finding this bug did I figure out it was not supported. I wonder if there is a way to make it clearer connect is not supported in the UI?

@bourgeois

This comment has been minimized.

Show comment
Hide comment
@bourgeois

bourgeois Jul 21, 2015

+1 ! This would be awesome.

bourgeois commented Jul 21, 2015

+1 ! This would be awesome.

@marcokeur

This comment has been minimized.

Show comment
Hide comment
@marcokeur

marcokeur Jul 31, 2015

Definitely +1

marcokeur commented Jul 31, 2015

Definitely +1

@pablospe

This comment has been minimized.

Show comment
Hide comment
@pablospe

pablospe commented Aug 9, 2015

+1

@artworklv

This comment has been minimized.

Show comment
Hide comment
@artworklv

artworklv commented Aug 10, 2015

+1

@jodal

This comment has been minimized.

Show comment
Hide comment
@jodal

jodal Aug 10, 2015

Member

+1-ing this issue won't make this any more or less likely to happen. Please stop.

Member

jodal commented Aug 10, 2015

+1-ing this issue won't make this any more or less likely to happen. Please stop.

@mopidy mopidy locked and limited conversation to collaborators Aug 10, 2015

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.