@TheHundredthIdiot Thanks for the screenshots… A number of observations - all related to poor documentation by me on the functionality. Also, I never actually tried to use my devices in a scene till you did - so I just went through the adding to a scene and figured out you don’t need the switches and dimmers for what you are trying to do as part of a scene. Those are now ONLY needed for Alexa… Let me explain in a little more detail - posting here as opposed to PM as this is relevant to all using this driver.
I originally added the switch to use turn on and off via Alexa - which does not allow you to pick a song to play when you use Alexa. But you can set dimmers and turn on and off via Alexa giving you purely Alexa control of the song and playing.
Alexa usage Pattern
Alexa, set speaker-name to 40%
Alexa, turn on speaker-name
So what exactly does the dimmer do?
Nothing when you set it - it simply registers what you set it to
Then why set it?
It is used when you turn the switch on to decide WHAT playlist to play. If you set it to ZERO - which is a special value, it simply plays whatever is in queue at that time for that player. If you set it to anything but zero, it is used as a percentage of the number of entries in the Settings / Favorites 1…n to decide which of those to play - so if you have all 5 settings set - setting to 0-20% will pick the 1st one, 21-40% will pick the second one and so on. if you only have 4 settings set, 0-25% will pick the 1st one, 26-50% will pick the second one etc. However, ALL this only happens if and when you turn on the switch. Otherwise, setting the dimmer does nothing on its own.
How to use the device in a scene?
In a SmartThings scene, it allows you to play a favorite already. So to play a favorite, you DO NOT need to turn on the switch (as that does all of the above) - you simply pick play favorite and choose the favorite. That’s it.
What was likely going on in your case?
In your screenshots, I saw you turn on and then play favorite, that will do the same operation twice, which may explain why things were getting locked up, as the Sonos may be confused by the barrage of conflicting commands coming its way
Also I think you were changing dimmers and expecting something to change on the screen - and nothing will as explained above
Also, on the list of favorites, that is a scrolling list (it does not look like one, but swiping up or down scrolls the list) - so when you have a LOT of Sonos Favorites, and/or Sonos playlists setup (the list is a combination of Sonos Favorites and Sonos Playlists) you will need to scroll to find all of the ones you have.
And on “laggy” update of the playing track, it is because I am still using polling (every 10s) to get the track information rather than events - I cannot get events to work on my Sonos (I use Sonos NET and that may have something to do with it). When I eventually get events working on my network, I will move the implementation to get closer to real-time updates.
The Radio playing did have a bug in it… It should be fixed now.
PS: Coming to think of it, if the SmartThings scenes for these new devices allow you to play from favorites or playlists directly, the switch and dimmer functionality may be moot altogether (I did that because this was not the case for the older DTH devices). This is because Alexa has its own Sonos integration independent of SmartThings that allow you to play stuff on your Sonos anyway. So I may end up removing the switch and dimmer functionality altogether
EDIT: this is now done. So no more switch or dimmer… Just use Play Favorite on the scene construction UI.