Hi folks - hoping someone can help. I’ve successfully created a script which uses the play_media service to play a MP3 file stored on a standard URL (e.g. domain.com/test.mp3). However I am unable to get this to work using Spotify (I’m a premium subscriber). I have tried all of the URL options from the Spotify PC app, such as below, to no avail. Does anyone have any suggestions?
Both of those work for me, but both also require a click to start the song. The Spotify API does not support auto playing. There is a reverse engineered API for the local spotify server, but the implementation hasn’t been updates since 2013.
Thanks for the feedback. Makes sense - so any link needs to be directly playable or to a direct file (e.g. MP3 or whatever) it seems. I guess the next best thing is to just use the media_play command to resume whatever was last playing.
You can download tracks from Spotify and add them to the script. Normally you won’t be able to play Spotify songs outside its app, so you have to download it with a tool Spotify Music downloader. I’ve tried this many times and it never fails.
Hi, how does this work? You are using both Sonos integration and spotify integration on HA, and you pass a spotify URI to Sonos but you won’t get it to autoplay?
Spotify premium users can directly listen to Spotify Music through Sonos. Free Spotify users must need a professional Spotify playlist converter to locally save music from Spotify and then add local Spotify music files to Sonos for offline playback.