should it be something like as follows
x-sonos-spotify:spotify%3aplaylist%3a5wH4G2nhAXlwu1viXgbHlk
x-sonos-spotify:spotify%3auser%3a123642705%3aplaylist%3a5wH4G2nhAXlwu1viXgbHlk
I imagine that for a Spotify playlist, the playlist is put in the Sonos queue ?
I am not sure at all it exists a direct Sonos URI we could use to automatically load a Spotify playlist.
It would require to spy the network to understand how the Spotify Sonos service is implemented.
The question is the same more or less for any Sonos service.
I have not studied the way the Sonos services are implemented to browse and select data. It could even be different for each service.
It would be awesome to figure out how to load a spotify playlist into the sonos queue via the plugin.
We were thinking of collaborating on a shared spotify playlist with different bunch of members and each adding their favourite tracks and the plugin would load that playlist into a fresh queue different intervals.
Hey @ronniech, I know there has been a lot time, but did you find a solution? I just bough sonos and I have spotify and I am having the same issue than you, can’t make it play a specific playlist!
Not sure if this will help you, but here’s an applescript I use. The spotify uri is inside a text file.
[code]try
– Kill Spotify
do shell script “killall Spotify”
-- Pause 5 seconds
delay 5
-- read the reference file
--this is just a one line spotify uri reference to a playlist
set tunes to do shell script "cat /Users/JoeSmith/Desktop/Playlist.rtf"
-- Make sure shuffle & repeat is on
tell application "Spotify"
if shuffling is false then
set shuffling to true
if repeating is false then
set repeating to true
end if
end if
end tell
delay 1
tell application "Spotify"
activate
set sound volume to 0
play track tunes
next track
delay 6
set sound volume to 100
end tell
-- Bring Spotify to the front
set appName to "spotify"
set startIt to false
tell application "System Events"
if not (exists process appName) then
set startIt to true
else if frontmost of process appName then
set visible of process appName to false
else
set frontmost of process appName to true
end if
end tell
if startIt then
tell application appName to activate
end if
@PJJP, thanks for your answer, so you are doing it via a MAC (which has to be on) instead of doing it between Vera and sonos directly without the need of a PC or MAC? This last thing is what I was looking and I think I found a workaround:
Create your spotify lists, then from them, create a sonos playlist. Then use the URI to play a sonos playlist and it will play the spotify playlist. I have a randome select each morning using this code:
How do you define the function in such a way that you can then call the list from another Scene? Does it run from a scene or do you have to load it into Vera via SSH somehow?
With the new management of the Sonos favorites, there is a good chance that if you put a Spotify playlist in your favorite, you could simply play it by using the new string “SF:name of the playlist”.
[quote=“lolodomo, post:10, topic:178634”]With the new management of the Sonos favorites, there is a good chance that if you put a Spotify playlist in your favorite, you could simply play it by using the new string “SF:name of the playlist”.[/quote]This sounds great, but I try and it is not working, is the “SF:” short URI yet implemented?
Regards.
[quote=“Vreo, post:11, topic:178634”][quote=“lolodomo, post:10, topic:178634”]With the new management of the Sonos favorites, there is a good chance that if you put a Spotify playlist in your favorite, you could simply play it by using the new string “SF:name of the playlist”.[/quote]This sounds great, but I try and it is not working, is the “SF:” short URI yet implemented?
Regards.[/quote]
I uploaded all the files in the trunk version (except the services folder) and it didn’t work. It starts playing what it is already on the queue regardless of the name of the playlist. Another thing is that it keeps frozen in each tab of the plugin, example, the Player tab keeps displaying “Opening Sonos_showPlayer…” eternally.
You have cleared your WEB browser cache ?
Check that you have not uploaded a null J_Sonos1.js file.
You are running UI5 ? That would mean the Javascript code is no more working in UI5 !!!
@lolodomo, after working out for a while, I found out that the only thing uncompatible is the Sonos_defineUIStyle(); function and all it’s calls. After deleting the function and all instances of it calls, everything work again, the thing is that the Favorite playlists are not working, they are correctly populated, but when playing from the drop down list or by SF: Uri, nothing happens, if the player was paused with whatever queue, it resumes it, but doesn’t change anything.
@lolodomo, after working out for a while, I found out that the only thing uncompatible is the Sonos_defineUIStyle(); function and all it’s calls. After deleting the function and all instances of it calls, everything work again[/quote]
Thank you a lot, I was in the process of publishing several plugins that would have not worked in UI5 !!!
the thing is that the Favorite playlists are not working, they are correctly populated, but when playing from the drop down list or by SF: Uri, nothing happens, if the player was paused with whatever queue, it resumes it, but doesn't change anything.
Do you see errors in logs ?
Is Spotify service queueing everything ?
Is it the only kind of media that does not work, I mean playing Sonos favorites ?
I was thinking that it could not work well for services using queue. But as it works for Amazon cloud player, I was not sure. The solution could be to use queueing for Sonos favorites.
Sorry, that log was with a modifijed js, I have being playing a lot with it. This new log is the one you should evaluate, is with your js only removing the mentioned UI style.
Can you please try the last version of the file J_Sonos1.js I just pushed, it should now work in UI5. Stupid error.
For your Spotify favorite, it is of kind “x-rincon-cpcontainer” and I have not (yet) managed this case. I have myself this case when I put in my favorite a full album coming from Amazon Cloud Player. I don’t know yet if I will be able to handle this case.
You have always this case when saving Spotify in Sonos favorites or you just mention one case that did not work (playlist) ? I mean everything is a playlist when using Spotify ?