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

Spotify “end session” command through Sonos api? #17

Open
Nayhtohn opened this issue Oct 12, 2020 · 3 comments
Open

Spotify “end session” command through Sonos api? #17

Nayhtohn opened this issue Oct 12, 2020 · 3 comments
Assignees

Comments

@Nayhtohn
Copy link

I’m wondering if you can help with an issue I’m running into:

When I have a queue setup from the Sonos app the emulator works fine, but when I start a song from the Spotify app it doesn’t work and I have to go into the Sonos app and press “end session” before the emulator can work.

I can’t see on the Sonos api a command for end session, and clearqueue doesn’t seem to work - do you know if such a command exists? Or how I can watch the api command line when I press a button in the app to see what it tells the system to do?

Thanks,
Ben

@hankhank10
Copy link
Owner

Hi Ben, happy to help you debug this.

For starters, please could you stop the code running through pm2 (pm2 stop readnfc) if you have it running that way. Then manually run the code (python readnfc.py) and report back (a) what version you are running and (b) what error code you get when trying to tap a tag in this way.

Thanks

@hankhank10 hankhank10 self-assigned this Oct 12, 2020
@Nayhtohn
Copy link
Author

I have the following:
A) Script version Alpha 0.9.3...
B) When I present a tag I get:
"Read from NFC tag: spotify:album:7sYd6KDHefklNf94RmND8g
Detected spotify service request
Clearing Sonos Queue
Fetching URL via HTTP: http://localhost:5005/Living Room/spotify/now/spotify/album/7sYd6KDHefklNf94RmND8g
Error code returned from Sonos API"

When i press "End session" in the sonos app in my phone, the tag works as normal

Thanks,

Ben

@Nayhtohn
Copy link
Author

From the Sonos API:

  "Error: Got status 500 when invoking /MediaRenderer/AVTransport/Control\n at Object.invoke (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/helpers/soap.js:99:10)\n at Player.addURIToQueue (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/models/Player.js:616:15)\n at promise.then (/home/pi/node-sonos-http-api/lib/actions/spotify.js:37:33)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants