Create "Jukebox" Dashboard with Album Art for Echo or Sonos Devices

Hi James,

2 questions. Hope you can help answer.

  1. Will the rules that I created a while back work when Smartthings completely move away from Groovy? Will play preset numbers stay after Smartthings migration? If yes, how are we going to find out the preset number if IDE web site is gone? If not, is there any solution?

  2. Can we create rules to interact with Home Assistant Media Browser? As you know that all Sonos favorites are stored in Home Assistant Media Browser. I wonder if we can create similar rule to activate a Sonos favorites or playlists in Home Assistant Media. If the answer is “No”, will you and Josh have plans to implement this feature?

Thanks

Hi James or Josh,

Can you please help answer the below 2 questions?

Hi James,

2 questions. Hope you can help answer.

  1. Will the rules that I created a while back work when Smartthings completely move away from Groovy? Will play preset numbers stay after Smartthings migration? If not, is there any solution?

  2. Can we create rules to interact with Home Assistant Media Containers in browser? As you know that all Sonos favorites are stored in Home Assistant Media containers. I wonder if we can create similar rule to activate a Sonos favorites or playlists in Home Assistant Media. If the answer is “No”, will you guys have plans to implement this feature?

Thanks

It depends on how SmartThings handles the transition of the Sonos device DTH to Driver. If they maintain the same set of capabilities and commands, like they have for many devices, then yes.

Yes, you can control media players from Home Assistant in SharpTools Rules. I hadn’t personally tried to mimic this ‘jukebox’ playlist control, but from a quick test I was able to add Sonos or Spotify items to ‘My Sonos’, then when I was playing that item I could review the Home Assistant ‘Developer Tools’ → ‘States’ where I could see the media_playlist attribute.

Then if I took that attribute value and used it in a playPreset() command, it would start that ‘My Sonos’ favorite playing…

1 Like

Oh, thanks so much! I really appreciated that you showed me exactly how to tie the preset in Home Assistant to SharpTools. Thanks so much. Now, I can forget about smartthings migration away from Groovy. Now, I am so so relieved.

1 Like

Where do i go to get the “Get the preset number from the device page in SmartThings IDE site” for the Sonos playlist?
I want to add a few statations.
Thanks

With SmartThings in the process of shutting down the IDE, I would just complete a fresh sync of your devices by going through the authorization flow again from your SharpTools User Page → Manage Connections.

Once that’s done, you can view the device’s details by tapping the ... next to your location on your SharpTools User Page, then scroll down and tap on your device, then scroll down to view the presets attribute.

1 Like

Thank you. That’s very good info to know as IDE page will be decommissioned.

James

Apr '21

@Charlie_Barham, thanks for the details. I believe this is the same bug raised by @Mike_O that the Sonos queue is not cleared when another playlist is selected, and this new playlist will just be added to the end of of the existing queue.

So I’m running into the same frustrations when selecting a playlist, the previous playlists are still in the Sonos queue and the playlist I have selected just gets added to the existing queue. I am assuming there is no fix for this yet. I did come across something on stackoverflow, contributed by a “Joshua”, assuming that isn’t Sharptools “Josh”, where he found that the Sonos API documentation is wrong, and he was able to clear the queue as needed. I wouldn’t have the slightest idea if this would help get this implemented for Sharptools, but I thought I’d point it out. Thanks,

https://stackoverflow.com/questions/71507198/is-there-a-way-to-clear-the-sonos-queue-via-the-api

Thanks for sharing! Nope, that’s not me! :slight_smile:

I would also clarify that the Sonos integration is managed by SmartThings and last I checked, they are using a local API for communicating with the Sonos device - as opposed to the cloud API mentioned in that article. That being said, it may still be a helpful clue to the SmartThings engineering team (assuming they want to fix it and don’t see it as intended) as there might be a similar distinction in commands even in the local Sonos API.

1 Like

Hi @josh or @James - I’m trying to get this up and running and I can see my Sonos presets in the device details and in the IDE, but in both places, not all of the sources I’ve added to My Sonos show up as numbered presets. It looks like presets only show up if they are playlists or albums, but any artists I’ve added to My Sonos (at least through Apple Music) do not show up in the preset list, although there are gaps in the numbering that suggest they’re in there somewhere.

Have either of you had any experience/success filling in preset numbers that don’t show up in the list in the IDE, or does adding a whole artist channel to My Sonos just not work as a preset for this purpose?

I just gave it a try and I see the same results. I’m able to add the artist to “My Sonos” and as you mentioned, I see the gaps in the ‘presets’ where the artist should be in SmartThings. I suspect that it just isn’t supported for whatever reason – I’m not sure if that’s a SmartThings or Sonos limitation.

Spotify has a concept of an Artist “station” and I can add that to My Sonos and it’s available, but that ends up being a mix of music with similar styles to the artist.

I suspect you could also create a playlist of a bunch of songs from the artist that you like and add that to My Sonos. It would be more of a manual playlist that you would maintain, but it could be a workaround for what you’re trying to achieve.

Thanks so much for your response! That was the conclusion I came to as well, although I’ll probably still try using one of the “gap” numbers when I have time just to see what happens. I’ll post here if it’s successful so others can benefit from my tinkering.

I really appreciate the followup and active monitoring of long/older threads - browsing these forums and seeing how active and helpful y’all are is a big reason I went with SharpTools over ActionTiles!

2 Likes