Fornoth / spotify-connect-web

MIT License
436 stars 66 forks source link

Telling spotify which device to use via spotify-connect-web #122

Open binderth opened 7 years ago

binderth commented 7 years ago

as described in #112, I'd like to tell Alexa to Play spotify in a specific room. I have multiple instances of spotify-connect-web, which have speakers in five rooms at my home. I understand, that presently the spotify skill only plays Spotify on the echo-speakers.

So my question is, whether the API from spotify allows it to tell the actual playing to be directed to a specific device within my spotify-inventory. e.g. if I'm playing Spotify in my living room spotify-connect-web enabled Speaker, the App or my Desktop Spotify knows this and I can Change the Spotify Connect speakers accordingly. Is spotify-connect-web able to tell Spotify this via command line? Then I could tell Alexa to switch it via my existing smarthome-skill. I'd configure a switch, which just fires the command-line and Spotify would change the output to this Connect device. This would come in handy, as I could tell Alexa what to Play and then where to play it.

Thanks!

Fornoth commented 7 years ago

This isn't possible directly from spotify-connect-web, but spotify offers a web api to control connect devices https://developer.spotify.com/web-api/web-api-connect-endpoint-reference/ Also, see #112 where someone posted a link to an alexa skill that does just that