Ok, I’ve searched the Internet and read all the docs.
Basic newbie question: what is the use case for setting the Spotify login variables?
Currently my devices show up a as both Spotify connect options and I can even go into AirPlay and they work that way as well, all while both the balena devices and the phone I’m using are all on the same network.
So when does Librespot utilize the credentials in the variables?
Hey Simon welcome to the forums. It’s my understanding that if you use the credentials you can use Spotify connect via the internet rather than having to be present on the same local network. Like yourself though, I’m having a hard time finding documentation of this anywhere online, but from experience in the past that’s what it does.
If you do decide to try it and confirm that this is the case do let us know or submit a PR to the balenaSound documentation and we can make sure folks like yourself can find this information in the future!
Spotify has a very specific message that you need to be on the same wifi as the device you want to use through Spotify Connect, so if you do not have wifi enabled on your phone, no connect devices show up, and if you’re connected to a different wifi (I have two separate networks in my house), then no connect devices show up except those on that specific wifi network.
So I’m still unclear as to how this is intended to function?
So when does Librespot utilize the credentials in the variables?
To answer your original question, there are two ways to login with your premium account, one of which is zeroconf, it uses your logged premium account on your phone/device so you don’t need to provide user/pass via SOUND_SPOTIFY_USERNAME and SOUND_SPOTIFY_PASSWORD. I realize this is not really well documented so i’ll create a PR now to fix it.
If you provide credentials via environment variables you can stream from your phone on a different network. That’s what the “via the internet” means. To be honest it’s not a very useful feature so we’ll probably remove that from the docs to prevent confusion.