Skip to content
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
Open

Can Spotify Connect be supported? #14

alesch opened this issue Mar 18, 2014 · 28 comments
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal

Comments

@alesch
Copy link

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
Copy link
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//issues/14
.

@kingosticks
Copy link
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?

@ajcrowe
Copy link

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.

@u1735067
Copy link

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
Copy link
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 Can Spotify connect be supported? Can Spotify Connect be supported? May 10, 2014
@kingosticks
Copy link
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//issues/14#issuecomment-42748374
.

@vizzah
Copy link

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 C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal and removed question labels Sep 8, 2014
@LandonSchropp
Copy link

👍

@geekbleek
Copy link

I would love to see this functionality in mopidy!!

@ulilicht
Copy link

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
Copy link
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
Copy link

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
Copy link
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
Copy link

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

@jodal
Copy link
Member

jodal commented Dec 2, 2014

I have no news so far.

@woutervanwijk
Copy link

More info here. No library though...
http://divideoverflow.com/2014/08/reversing-spotify-connect/

@calgot
Copy link

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
Copy link

fyksen commented Feb 26, 2015

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

@dennisfisch
Copy link

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

@sashahilton00
Copy link

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
Copy link

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
Copy link

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-corg
Copy link

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
Copy link

+1 ! This would be awesome.

@marcokeur
Copy link

Definitely +1

@pablospe
Copy link

pablospe commented Aug 9, 2015

+1

1 similar comment
@artworklv
Copy link

+1

@jodal
Copy link
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
@jodal jodal removed this from the Later milestone Nov 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal
Projects
None yet
Development

No branches or pull requests