The list of devices to play a track on is given by Spotify (web-api /me/player/devices). Spotify needs to know the device exists.

The official apps and applications discover new devices using zeroconf and some http requests. Hutspot tries do do the same and can discover connect devices on your network. Default it is off. It needs to be enabled in Settings.

To let Spotify know the device exists some encrypted info (authorization blob) needs to be sent to the Spotify servers. Librespot can store and reuse the credentials (see the wiki page on Librespot) and these are used by Hutspot to register the connect device. On success the device appears in the list provided by the Spotify Web-API. Note that it is a bit flaky so it can require some list refreshing and retries.

This is currently only tested with devices running Librespot (raspberry pi and banana pi).