Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

When should a device be visible (active)? #1559

Open
janek opened this issue Apr 28, 2020 · 0 comments
Open

When should a device be visible (active)? #1559

janek opened this issue Apr 28, 2020 · 0 comments

Comments

@janek
Copy link

janek commented Apr 28, 2020

Thank you so much for making Spotify accessible via API, I'm very grateful to be able to use it!

I'm building an alarm clock that starts to play music at a specified time, from Spotify. For playback, I use a Raspberry Pi that's constantly connected to my music system. The Spotify client I use on it is raspotify, and it's also running the whole time.

At some point I send a request to the Spotify API to play from that specific device. It works 80% of the time; and when it doesn't, it breaks with 404: Device not found. The device, however, is clearly visible from the Spotify app. If I use the app to play something on it only for a moment, I can then use the Web API to play on it again.

I would love to never get this error and just have the same visibility of the device from the API as I can experience in the Spotify app. But I can also probably hack around it somehow, if I know what the behaviour is, for example something like the following:

  • how does visibility from API differ from visibility from Spotify desktop?
  • is there a rule for how long a device "lingers" after the last time it was performing playback?
  • is there an endpoint in the API that would extend this linger time without disrupting playback, if playback is happening on another device?

I looked through the documentation and was not able to find anything, pardon if I missed it. Thank you for your time!

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

No branches or pull requests

1 participant