hankhank10 / vinylemulator

Emulate the tactile experience of a vinyl collection through your Sonos system, but with a back end run by Spotify
https://www.hackster.io/mark-hank/sonos-spotify-vinyl-emulator-3be63d
GNU General Public License v3.0
169 stars 28 forks source link

Spotify songs not queueing or playing #15

Closed foxtech60 closed 4 years ago

foxtech60 commented 4 years ago

Hi all, I am working through this project and really looking forward to finalising it. Thanks Mark, this is a great project. However... I have my Pi (Raspberry Pi OS Kernel 5.4 - release 2020-08-20) set up and running Node.js and NPM as well as the node-sonos-http-api package and pm2 to run on startup. The following works as expected: http://192.168.1.27:5005/ http://192.168.1.27:5005/zones http://192.168.1.27:5005/Rumpus%20Room/playpause

However when I try to play something it does not hit the queue or play... e.g. http://192.168.1.27:5005/Rumpus%20Room/spotify/open.spotify.com/track/78lgmZwycJ3nzsdgmPPGNx Output: {"status":"success"} (its Led Zepplin - for all us oldies)

If I run the "Zones" request again it does not show up as queued and does not play. Any help / ideas would be greatly appreciated.

Thanks

hankhank10 commented 4 years ago

Glad you're enjoying the project.

The format of the URL you are sending doesn't look right to me. I don't recognise the open.spotify.com bit. I suspect that you have copied a link from the spotify app rather than a URI.

The requests should be sent in the following format:

192.168.4.102:5005/Dining Room/spotify/now/spotify:track:4fNDKbaeEjk2P4GrRE1UbW

Let me know if this fixes the issue.

foxtech60 commented 4 years ago

@hankhank10 thanks for the idea mate. Unfortunately this is the URL I have now tried: http://192.168.1.27:5005/Rumpus%20Room/spotify/now/spotify:track:2nVHqZbOGkKWzlcy1aMbE7

And I am now getting this error: {"status":"error","error":"Got status 500 when invoking /MediaRenderer/AVTransport/Control","stack":"Error: Got status 500 when invoking /MediaRenderer/AVTransport/Control\n at Object.invoke (/home/pi/Projects/node-sonos-http-api/node_modules/sonos-discovery/lib/helpers/soap.js:99:10)\n at Player.addURIToQueue (/home/pi/Projects/node-sonos-http-api/node_modules/sonos-discovery/lib/models/Player.js:616:15)\n at promise.then (/home/pi/Projects/node-sonos-http-api/lib/actions/spotify.js:37:33)"}

I have seen this with other users. This relates to node-sonos-http-api. Do you know what others have done to fix this?

Cheers Peter

hankhank10 commented 4 years ago

Best course of action would be to raise an issue over at the node-sonos http api github

foxtech60 commented 4 years ago

OK mate, thanks...