Sonos and Spotify Playlist URI


#1

How do you locate the spotify URI for a playlist? Is this possible or just tracks?


Trouble getting Sonos to play track or speak text
#2

I don’t use Spotify, but for some ideas on how to capture and play a Spotify playlist, see this post in the SmartThings community.


#3

I reviewed this post and have single tracks and radio working, what is missing is how to engage a playlist. In the meantime I recreated the playlist using each track uri.


#4

Here are some solutions for getting SmartThings to automate playback of Spotify playlists on Sonos devices:

  1. If you have a Harmony Hub, create Harmony activities for playing your playlists on the Sonos then invoke those Harmony activities from ST (this is the most reliable and close to native solution. It is my recommended solution).
  2. If your Sonos is near a voice assistant, use an ST smart app or webCoRE to have the Sonos speak to Alexa/Google to trigger the playlist (e.g. "Alexa play playlist in the “”
  3. Duplicate your Spotify playlist tracks into a Sonos playlist and play that - ST can play Sonos playlists
  4. Duplicate your Spotify playlist tracks into a webCoRE Piston and use the piston
  5. Use a software tool like TRIGGERcmd that integrates with ST to trigger the playlist from your desktop. Video here: https://youtu.be/5LNVrFHCKkA

#5

Can you elaborate on option 3. How do play a Sonos playlist via ST?


#6

Also wondering about the third option!


#7

I’ve been workıng on thıs for about a month;)))
Here is what I came up with:

  • You can find playlist URI by looking at your playing device in ST IDE (in may case Sonos Bedroom)

  • But that will only give you the current track not the whole list.
    From here I found 2 ways to go about:
    a) You can collect hundreds of URI tracks for different songs, create your playlist and play them with RANDOM command. (time consuming and it gets boring after awhile. You have to keep changing URI tracks if you want to hear different songs.
    b) You can aim for stations. If you start playing a station in your sonos app, you can see the staions URI instead of that current song.

  • I created a simulated switch in ST IDE (Sonos music switch)

  • When I walk in to the bedroom motions is dedected and Sonos Music Swtich turns on.

  • If the switch is on, play sonos bedroom whit the URI I got from station.

  • If no motion turn the switch OFF

  • If switch is OFF stop sonos player.

(I know you didnt ask for the second part but it took me days to figure this out, I hope it helps someone else)

The good part is, everytime I walk into the room, it plays different song.

If anybody figured out how to get a full playlist URI that would be great.


#8

I do not have a Sonos to test, but I grab the full playlist URI by doing the following:

  • Run the desktop version of Spotify
  • Left click on a playlist in the left column
  • Right click in the same spot
  • Choose: Share > Copy Spotify URI

The results look something like this:

spotify:user:1145696665:playlist:0WEO3c4g0aeYrk9tE4072s

(The example above is some great percussion rhythms by Gabrielle Roth)

My musical tastes are not top-40, so I typically use my own playlists, but I have been able to incorporate playlists created by other people using a similar method.
(in the desktop version of Spotify, begin playing a playlist and look for the 3 dots)