Spotify Connect 2 does not work with Spotify API

Volumio Information

Volumio Version:2.861
Hardware: RPI 1
DAC: USB

Symptoms:

Installed the Spotify Connect 2 plugin.

Volumio shows up in Spotify App just fine.

Volumio does not show up when querying Spotify API for available devices - this is among other things used in integration scenarios with e.g. Home Assistant - and essentially this makes it hard/impossible to use Spotty with Volumio in those scenarios.

Steps to reproduce:

Spotty API call:

https://api.spotify.com/v1/me/player/devices

Create the API Client ID in your Spotify account and get OAuth 2.0 token from https://accounts.spotify.com/authorize in e.g. Postman to reproduce this bug.

Auth Settings in Postman:
Bearer
Implicit Grant Type
Scope: user-read-playback-state

When exercising the API call Volumio is not returned a Connect Endpoint available to Spotify.

What mode of Spotify Connect are you using? Discovery or have you logged in with your credentials?

Discovery I guess - there are two spotify plugins, the one from the Volumio Team where you log in with your credentials and the one I’m trying to use to get Spotify Connect from apps and other systems.

It’s version 1.0.5 of that plugin.

Spotify Connect will not show up in your devices if you don’t log into it. In Discovery mode, well it needs to be discovered first before it shows up as an active device :wink:

Not sure I understand what you mean.

Volumio just showed up on the API thus was controllable from Home Assistant for a few minutes and then went away again.

The whole thing seems quite shaky to be honest.

Might be my RPI and the wifi dongle and I’ll experiment a little more when my new hardware comes home.

Spotify Connect with the Discovery feature, uses mdns and other trickery to show a device as available from other clients inside the local LAN.
Such a device will not show up under the API, unless it is in active use. It will then show up under the respective user’s devices as an available/active device.

So I don’t understand why you’d expect it to show up in the Get a User's Available Devices endpoint, because – well, it isn’t a specific user’s device when still in discovery mode.

If you want the device to be locked to once account, then go to the plugin settings page, and enter your credentials. It will then show up in the /me/player/devices endpoint.

Does that make more sense now?