I’ve recently integrated the juke box idea, but was trying to modify the rule to start playback at a certain point during the media. I am linked to my plex server through sonos, and have added the song that I want and can play the song successfully. However I am trying to get it to start about a minute into the song as the opening has a build up that I am trying to skip. Any ideas on way to achieve this?
@James I’ve had this running for some time flawlessly. I went back and looked at the methodology after a comment from @josh in the SmartThings community. As of right now, the Sonos preset is identified from the Current States data in the IDE. Any idea how to identify the preset after the IDE deprecates? You can probably wing it by trying different numbers but wondering if there will be a better way.
I have a playlist with songs from various sources added in the Sonos application, can I play such a playlist using sharptools? I was able to start radio stations with PlayPresent, how do I start a playlist?
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?
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?
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?
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?
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.
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.
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.
@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,
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.
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!