Migrating rules from built-in Sonos devices to Sonos Advanced Controller — Swap Device won't list either set

I've moved from the built-in Sonos integration to Sonos Advanced Controller, and I'm looking for the accepted way to re-point a large number of rules without editing each one by hand.

Background, briefly: I renumbered my LAN from 192.168.1.x to a 10.x scheme. The built-in Sonos integration's child devices never recovered, because their Device Network IDs are the hex-encoded old IP addresses (one of mine still reads C0A801A5 = 192.168.1.165). The DNI field is read-only on child devices, the driver's set-IP command failed silently, and re-running discovery in the integration app never refreshed them. Sonos Advanced Controller sidesteps this entirely — it keys on the player's MAC/RINCON rather than the IP — and after updating it via HPM, it created working players immediately. So the migration itself is the right move; I just need my rules to follow.

The problem: Settings → Swap Device lists essentially every device on my hub except the Sonos ones — neither the old built-in devices nor the new Advanced ones appear in the left-hand (device to change) dropdown. Selecting a device on the left does correctly filter the right-hand list, so the tool is working; it simply doesn't offer these as candidates.

What I've already checked:

  • The old devices are enabled (I had disabled some earlier to quiet log noise; re-enabling didn't make them appear).
  • Their In Use By tabs still list the rules that reference them, so the references are intact — this isn't a case of orphaned IDs after my restore.
  • Both sets are app-created child devices, which is my current guess at why they're excluded. Hand-made virtual devices do show up.

Questions:

  1. Is Swap Device intended to work only with radio-paired devices, and app-managed LAN child devices are simply out of scope? If that's by design, no complaint — I'd just like to know.
  2. Is there another supported or community way to bulk-migrate rule references from one integration's devices to another's? This seems like it would be a common need, given how many people move from the built-in Sonos integration to Sonos Advanced.
  3. Failing that, is there anything smarter than opening each rule and re-selecting the device, other than working from each old device's In Use By list?

I'm prepared to do it manually if that's the answer — I'd just rather not discover afterward that there was a tool for it. Platform 2.5.1.152, C-8 Pro.

The Sonos speaker devices are child devices of the integration app (for the built-in integration, at least, and probably also for your community integration). Most child devices will not work with Swap Device as you discovered, for the reasons documented here:

The "manual" method of opening any app that uses the device and swapping it out yourself is typically the easiest method to swap the device in such cases. Many of us remember when it was the only way. :slight_smile:

If you have a complicated scenario, like a rule or other app that references the device multiple times and would have a lot of selections to change, you could try a trick like cloning the app/automation, using the options you'll be presented before saving the clone to swap any devices out with another, and then delete the original once you verify the clone works. This ultimately does something similar to the "manual" method on a per-app basis and is again therefore probably only worth it if you have some app where you've selected the same device in multiple places or have some other reason you think it would work better.

The first beta of 2.5.2 will have a completely rewritten Sonos controller app, which will include an in app migrate and restore feature for those using the existing Hubitat Sonos app, just an FYI

I have used this option many times when swapping devices won't work. It is the way.

But. If you are "calling" or otherwise referencing the rule in other rules--then it will totally break those references. The "rule references" app is very helpful in chasing these down (but there are quirks, because RM has a tendency to not clean up the internal references when they are deleted (i.e., the "rule references" app still detects old references that aren't really there because snippets in the actual RM codes are left dangling).