Hi @Mark_W, welcome to the community.
You will need to create a preset in Sonos and add your Spotify playlist in the Sonos preset, and use playPreset/playTrack command (depends on if you use SmartThings or Hubitat hub) to play this preset.
Please refer to how to create rule to change the playlist section in the original post for more details.
Thanks James - My presets only appear to be single tracks on media sources when I look in my Smartthings IDE. I created a Sonos playlist (called Gym IT) from the Spotify playlist (Gym), but in the IDE on the device it only ever shows singular track info. How do I create a Sonos Preset that is the playlist that I can reference when calling on with playPreset and the relevant ID?
@Mark_W, see below for the detailed steps:
-
Open Sonos mobile app. Go to “Browse” from the bottom navigation tab, select Spotify, find the specific play lists (not just a single track), tap the Spotify playlist and hold until the menu pops.
-
Select “Add Playlist to My Sonos”. Please note that only those playlists/stations added in “My Sonos” will be shown as presets in SmartThings IDE. If you just created the Sonos playlist, there won’t be a preset created for it in ST.
-
Now go back to “My Sonos” from the bottom navigation tab, and you should be able to find this newly added playlist from Spotify.
-
This preset should be shown in SmartThings IDE like this, and you can create rule to play this preset.
Unbelievable support. Thank you so much James! Adding it to “My Sonos” was the trick I missed and I’d never have gotten it without you.
Really having fun creating the “Jukebox” as described. Using Hubitat with Echo Speaks and Amazon Music as my music service. Have created Media Tiles with artists, playlists and stations that work beautifully to play on my Echo devices. The only problem I am having is that the album artwork does not change when the song changes. If I press the Music Player tile settings in the lower left corner and press refresh, the song title and album artwork change to the currently playing tract. How can I get my tiles to refresh automatically? Don’t know much about rules, but thinking that using that might solve my problem. Any suggestions?
If you watch the Current States section of the device details in your Hubitat admin UI, does the audioTrackData
attribute update whenever the song changes?
If not, it sounds like something about the Echo Speaks integration isn’t working as expected as the attribute should automatically update when tracks are changed. If the device attributes aren’t updating when the track data changes, it would probably be best to post in the Hubitat Echo Speaks release thread.
@Bill_Findley, does the album art eventually change after a few moments if you don’t manual refresh as described? In my experience, echo responds reasonably quickly when commends are sent over SmartThings/Hubitat, Echo Speaks smart app and the Echo Speaks virtual server you host in Heroku, but sometimes it can take tens of seconds for the data updates to be reported in SmartThings/Hubitat, and that might be the reason why you didn’t see the album art changed. It seems the latency of track data update is significantly smaller if I press next
few times in a row, but the latency is more obvious when I cold start to play something. I haven’t looked into the Echo Speaks sever code/config much, and am wondering if the Heroku server goes idle/sleep if no activities for a period so there’s a delay for the data to be updated to SmartThings/Hubitat in that case.
James & Josh…thank you! I realized that I might not have the most recent update to Echo Speaks and that seemed to do the trick.
I don’t think this is available for variables but now that I have created a “Jukebox” for one of my Echo devices it would very time consuming to create rules for the same artists, playlists, stations, etc for another Echo and link it to a different dashboard. I would like to be able to select my device with a tile and use the rule for Amazon music search selecting that device.
Then I could carry around my own jukebox on my phone and have the music play on the Amazon device that is currently in the room with me. Wouldn’t that be cool?
I like it because I can never remember the names of playlists and get tongue tied when asking Alexa to play one.
If not available, please consider it in the future.
That is indeed a cool idea. Select device based on the variable value is not currently supported, so I will have to note it down and see the interests from other users. Meanwhile, while it is not quite the same and does require some work in rules, you can use few True/False variables - kitchenEcho, bedroomEcho, garageEcho for example, and add a few IF_Conditions in your music playlist rules to check these variables’ value and decide which device to send the play (music search) command. And create another rule to turn the other variables to False
, when either of them is turned True
. Then added these variables tiles to the dashboard, Tap one of them to select the device first, and then the playlist/artist rule tile so the music will be played to the specific device, and by looking at those variables in the dashboard, you know which device is already selected.
Thanks for the advise. I have begun working on this and so far so good. A little time consuming but with the copy function of the rules I will be able to get it done without too much work. I decided to put a true/false tile for each device and speaker group.
Do you have any ideas on the use of Album Art and the media player for multiple devices? Right now I would need two 3 tiles for every Echo device (True/False, Album Art, Player).
A Visible/Invisible tile (if you had it) would not work because you can not put tiles on top of each other.
Any other great ideas?
@Bill_Findley, can you please provide a bit more details what you are trying to achieve (or the issue you have) with the 2 sets of the 3 tiles? Are you not having enough landscape for those tiles? Or something I missed?
Here is an example screenshot. I have tiles for each device, tiles for music searches (artists, stations, playlists) and a tile for the AlbumArt and one is the media play. Right now the AlbumArt and Media player tile are for one particular Echo device. I am trying to have only two tiles (one each) instead of 2 tiles for every device.
So I would either need a Media Player and AlbumArt tile be able to represent multiple Echo devices are tile on top of each other that would disappear when not active (true)
I hope that helps.
@Bill_Findley, thanks for the details and screenshot. The music player and album art is not able to represent multiple devices unfortunately, but you may create rules to execute play
, pause
, fast forward
, rewind
, volume-up
or volume-down
command on specific devices by checking the True/False variables, like your playlist rules, and add these rule tiles to the dashboard to replace the “Music Player” tile.
See the screenshot below for example. (The play
tile in the screenshot is actually a True/False variable that uses $.runRule()
syntax to execute a rule to send play
command to the specific device and toggle the variable value to have the tile “active/inactive” color effect and change the icon.)
But you will have to add the album art tile for each device to be able to show the image played on each of them though.
Thank you! That will work great. The AlbumArt is not something I need to look at on my phone anyway just something cool…but I could make a tile that gives the currently playing song.
Great timely response. Thanks again.
Don’t forget to post your final setup in the “Show Off Your SharpTools Dashboards!” thread. I believe it will be very cool and inspiring to the others!
This looks really cool and something I have spent hours today trying to get the first step done, only to find that there seems to be an ongoing issue where echo speaks is not working in the UK
Are there any alternative options for using Echo speakers?
It sounds like some people in the main SmartThings Echo Speaks thread have figured out a workaround for UK logins:
https://community.smartthings.com/t/release-echo-speaks-v3-actions/173073/986?u=joshua_lyon
(I would also note that SmartThings had an outage for European users last night as well)
Well that was simple haha, thank you so much. The thread was so long I never spotted that bit but has done the tick. Much appreciated - I can continue playing now Appreciate the help
Hey,
Did this get anywhere as im trying to create a Juke box and would like some radio tiles to have images of the Radio Stations.
Thanks
Hi @adam_lewis I hope you don’t mind that I moved your post to the Echo Speaks thread where I think you’ll get more visibility about your question (the other thread was more about tiles with custom shapes).
The last part of the first post in this thread has some tips on how to use Media Tiles along with a special $.runRule("RULEID")
hyperlink syntax to create nice visual tiles to start desired radio stations.
–
You can see some neat examples in this thread including the banner image by @James and a neat example by @Bill_Findley