sonos discover
Sends an SSDP M-SEARCH query, then asks the first responder for the full zone topology. Falls back to a subnet scan on networks that block multicast. Names match what the Sonos app shows.
#Synopsis
sonos discover [--all] [--format plain|json|tsv] [--timeout 5s]
#Flags
| Flag | Default | What it does |
|---|---|---|
--all | off | Include invisible/bonded devices (stereo-pair secondaries, surrounds). |
Plus all global flags.
#Examples
sonos discover
sonos discover --format json
sonos discover --all
sonos discover --format json | jq -r '.[].name'
#How it works
- SSDP M-SEARCH for
urn:schemas-upnp-org:device:ZonePlayer:1on239.255.255.250:1900. - As soon as one speaker answers, call
ZoneGroupTopology.GetZoneGroupStateon it for the canonical room list. - If SSDP returns nothing, scan the local subnet for TCP
1400and try step 2 against any responder. - Filter out invisible/bonded devices unless
--allis set.
The topology result is cached briefly so subsequent commands don't re-discover.
See Discovery for the full story.