Alright everyone, big new release.
First, ALL cloud-related stuff is removed, as everything works locally now. I'm renaming this to "Sonos Advanced" as there's no longer anything "Cloud" about it.
Second, Group Devices have been improved with "switch" capability, and accurately reflect whether the group is "on" or not. I'm working on an improvement to how "Group Players" works, too. Presently, it creates an all new group, with no stream playing. I'll leave this in place as-is. "Join Players To Coordinator" does just that, joins them without interrupting any stream on the coordinator. Also leaving that as-is. But I'm working on a new button, name TBD, that will group all the players together into a new group, and if and only if there's a single stream playing on any one of the players, bring that stream into the new group. If there's 2 or more of the "follower" devices playing, then there's no real way to know which stream to pull in, so in those cases I'll just have it not pull one in.
So if you have "bedroom" and "living room" as a Sonos Group device, with living room as coordinator, and the living room speaker is idle, but the bedroom speaker has a stream playing, there will be a command that will pull them into a group with living room as coordinator still, but rather than being an all-new group with no stream, or having the (non-existent) stream from living room, it'll snag the bedroom stream and move it to the living room when it becomes coordinator.
Similarly, I'll be adding a "Split Group" button that takes whatever stream is playing and starts it playing on each of the members of the group, but with them being a stand-alone coordinator of their one-device "group".
Well, at least I'll add these if functionally it's possible. I'm like 95% sure it is, but I haven't actually dug into it. But it's the next thing I have planned.
I've set up everything on my end for HPM integration, just waiting on my pull request to be approved and merge my repository into the official repository list. In the meanwhile, you can manually add it as a custom repository using this link.
I've also added support for setting bass, treble, and loudness. Looking into being able to set some of the Arc/Beam specific stuff too, as they have a few extra config settings for home theater related stuff. Namely, I want to automate turning "Night Sound" and "Speech Enhancement" on and off. I haven't found where the UPnP control for this exists, if at all, so it'll take some investigation.
I have zero idea whether or not you can in-place upgrade the code... I've got 2 Hubitats, and on my main one, I've only ever had iterative updates as I program things, and on my "testing" hub, I've only tested the all-new all-local version from a "fresh" install via HPM. That said, the way the app works in regard to child devices and their DNIs hasn't changed since I added "current state" a long while back, so it'll probably be OK to update the app/driver code from the old "Sonos Cloud" stuff to the new "Sonos Advanced" ones. But if it doesn't work, then the only thing I can really suggest is just adding "Sonos Advanced" side-by-side to the old app and moving any Rules and stuff over to the new child devices.
This new version uses all-new drivers, and a new app. The old "Sonos Cloud" ones are left in place on GitHub, so if you want to manually upgrade, you'll want to copy/paste in the code from the new drivers and app into your current app and driver code and overwrite it.
Or install the new one side-by-side and move things over... that's probably safer.
Edit: Also forgot, "current state" also now includes "currently playing" album art. Yippie.