Pseudo-discovery of new Sonos zones

I am now working on a new device that will help to maintain a device for each Sonos zone; each new Sonos will be automatically discovered and added as a new Vera device.

It will be released soon.

My code is based on calls to http://:1400/status/topology with the IP of one Sonos zone.

Can someone confirm that the result of the HTTP request lists all the Sonos zones in SonosNet, even the Sonos that are not temporarly disconnected (not powered) ?

Yes and No, The result is a page that has 2 options, when you click either one it will expand to show you the Players, and servers respectively;

Zone Players URL: javascript:toggle(‘idp2587584’):
Media Servers URL: javascript:toggle(‘idp2586752’)

I hope this helps.

I have two play:3 configuged as a stereo-pair in the kitchen (K?k). I only want one device to show up for this in Vera because they always plays the same thing.
This might be a “special case” you’ll have to handle in the topology plugin.

Zone Players
Zone Name Coordinator Group Location UUID Version MinCompatVer Compat
K?k false RINCON_000E587E838C01400:2 http://192.168.178.34:1400/xml/device_description.xml RINCON_000E587E83B801400 21.4-61160c 21.1-00000
BRIDGE true RINCON_000E58E4096401400:0 http://192.168.178.30:1400/xml/device_description.xml RINCON_000E58E4096401400 21.4-61160c 21.1-00000
K?k true RINCON_000E587E838C01400:2 http://192.168.178.33:1400/xml/device_description.xml RINCON_000E587E838C01400 21.4-61160c 21.1-00000

Media Servers
Name Location UUID Version CanBeDisplayed Unavailable Type Ext
Plex Media Server: Henrik & Jenny NAS http://192.168.178.36:32469/DeviceDescription.xml de74f70e-71c7-b190-405e-eb0fdee944b9 0.9.7.9 false false 0
AVM FRITZ!Mediaserver http://192.168.178.1:49000/MediaServerDevDesc.xml fa095ecc-e13e-40e7-8e6c-c025062a85c2 avme false false 0
iPad 192.168.178.35:3401 mobile-iPad-74E2F51E7F82 false false 0

Hope this is useful. Plethora of zones, sources. Good on plugin!

[code]

<?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="/xml/review.xsl"?>The GymUtilityRmBridgeKitchenWhole houseEyeConnect (the-big-mac)RennerpadCraig's PhoneLynn's iPhone[/code]

[quote=“big517, post:2, topic:174636”]Yes and No, The result is a page that has 2 options, when you click either one it will expand to show you the Players, and servers respectively;

Zone Players URL: javascript:toggle(‘idp2587584’):
Media Servers URL: javascript:toggle(‘idp2586752’)

I hope this helps.[/quote]

What I use is the Zone Players part.
I need to know if it lists always all your zones, even if one of them is disconnected (unpowered - if it is the correct english word) ?

[quote=“hek, post:3, topic:174636”]I have two play:3 configuged as a stereo-pair in the kitchen (K?k). I only want one device to show up for this in Vera because they always plays the same thing.
This might be a “special case” you’ll have to handle in the topology plugin.

Zone Players
Zone Name Coordinator Group Location UUID Version MinCompatVer Compat
K?k false RINCON_000E587E838C01400:2 http://192.168.178.34:1400/xml/device_description.xml RINCON_000E587E83B801400 21.4-61160c 21.1-00000
BRIDGE true RINCON_000E58E4096401400:0 http://192.168.178.30:1400/xml/device_description.xml RINCON_000E58E4096401400 21.4-61160c 21.1-00000
K?k true RINCON_000E587E838C01400:2 http://192.168.178.33:1400/xml/device_description.xml RINCON_000E587E838C01400 21.4-61160c 21.1-00000[/quote]

Might be not easy.
I see that your two Play:3 have the same group: RINCON_000E587E838C01400:2
They have the same strange name “K?k”. Is it the real name you gave to your zones ?
stereo-pair is a special Sonos feature, isn’t it ?
Can you help me to identify a stereo-pair ?
Could you unpair your 2 Play:3 and then provide me the new topology ?

Note: I have to handle the special case of the bridge too.
Note 2: please unplug one of your 2 Play:3 and tell me if the topology is updated.

[quote=“dinkeldorf, post:4, topic:174636”]Hope this is useful. Plethora of zones, sources. Good on plugin!

[code]

<?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="/xml/review.xsl"?>The GymUtilityRmBridgeKitchenWhole houseEyeConnect (the-big-mac)RennerpadCraig's PhoneLynn's iPhone[/code][/quote]

You have 4 Sonos and 3 of them are grouped with the one named “UtilityRmBridge” being the coordinator for this group.
Is it correct ?

When one unit is unplugged it disappears from the topology… Which seems to be logical.

Zone Players
Zone Name Coordinator Group Location UUID Version MinCompatVer Compat
BRIDGE true RINCON_000E58E4096401400:0 http://192.168.178.30:1400/xml/device_description.xml RINCON_000E58E4096401400 21.4-61160c 21.1-00000
K?k true RINCON_000E587E838C01400:2 http://192.168.178.33:1400/xml/device_description.xml RINCON_000E587E838C01400 21.4-61160c 21.1-00000

Also not that one of my units has coordinator = true (in the previous post). That one is the “master” of the stereo-pair.

And when i split them up both has coordinator = true.

Zone Players
Zone Name Coordinator Group Location UUID Version MinCompatVer Compat
Vardagsrum true RINCON_000E587E83B801400:16 http://192.168.178.34:1400/xml/device_description.xml RINCON_000E587E83B801400 21.4-61160c 21.1-00000
BRIDGE true RINCON_000E58E4096401400:0 http://192.168.178.30:1400/xml/device_description.xml RINCON_000E58E4096401400 21.4-61160c 21.1-00000
K?k true RINCON_000E587E838C01400:2 http://192.168.178.33:1400/xml/device_description.xml RINCON_000E587E838C01400 21.4-61160c 21.1-00000

Bad news even if it seems to be logical as you said.
If I delete the Vera device when the zone is unplugged and create it again when the zone is plugged again, it will break scenes using this device.

3 possibilities:
1 - I maintain the Vera devices to be conform to the Sonos network topology
2 - I create new devices but never suppress devices
3 - I suppress devices only after a certain delay of inactivity => how much time ?

What are your suggestions ?

[quote=“hek, post:9, topic:174636”]And when i split them up both has coordinator = true.

Zone Players
Zone Name Coordinator Group Location UUID Version MinCompatVer Compat
Vardagsrum true RINCON_000E587E83B801400:16 http://192.168.178.34:1400/xml/device_description.xml RINCON_000E587E83B801400 21.4-61160c 21.1-00000
BRIDGE true RINCON_000E58E4096401400:0 http://192.168.178.30:1400/xml/device_description.xml RINCON_000E58E4096401400 21.4-61160c 21.1-00000
K?k true RINCON_000E587E838C01400:2 http://192.168.178.33:1400/xml/device_description.xml RINCON_000E587E838C01400 21.4-61160c 21.1-00000[/quote]

I could assume that if they are grouped with the same name, they are paired. But that is not satisfying.

Could you compare the result of http://192.168.178.34:1400/xml/device_description.xml when paired and not paired ?

When stereo-paired they both have the same group-id (RINCON_000E587E838C01400:2). The master unit has coordinator=true, and slave unit have coordinator=false.

When unpaired they have different group id (RINCON_000E587E83B801400:16, RINCON_000E587E838C01400:2) and both has the coordinator property = true.

I have not tried grouping units in any other way (like you do when playing same content in different rooms).

I would suggest you create all devices you find (use UUID as the unique identifier?) as slave devices. The plugin never deletes a device but it could update it’s “state” to “SLAVE” or something.
When beeing slave you cannot control it (all buttons disappear etc) and status is Slave. When beeing offline it could have the same disabled GUI and have status offline visible.

If user REALLY want to delete an auto-created device they use the trashcan on the devicetab. If the deleted sonos show up in the the network the unit will be auto-created again.

[quote=“hek, post:12, topic:174636”]When stereo-paired they both have the same group-id (RINCON_000E587E838C01400:2). The master unit has coordinator=true, and slave unit have coordinator=false.

When unpaired they have different group id (RINCON_000E587E83B801400:16, RINCON_000E587E838C01400:2) and both has the coordinator property = true.

I have not tried grouping units in any other way (like you do when playing same content in different rooms).[/quote]

That’s not enough as it is what you got with a normal grouping. Check dinkeldorf’s data. I need to find something else to distinguish stereo pair. Name could be an idea but I assume there is something better in the description file.

I would suggest you create all devices you find (use UUID as the unique identifier?) as slave devices. The plugin never deletes a device but it could update it's "state" to "SLAVE" or something. When beeing slave you cannot control it (all buttons disappear etc) and status is Slave. When beeing offline it could have the same disabled GUI and have status offline visible.

Yes, I use UUID as unique identifier.
Good idea with the SLAVE and OFFLINE state.
Even in SLAVE state, certain actions are probably allowed, like volume adjustment. But I could disable "normal"l actions and update accordingly the GUI.

If user *REALLY* want to delete an auto-created device they use the trashcan on the devicetab. If the deleted sonos show up in the the network the unit will be auto-created again.

It seems to be logical. I will do that.

For SLAVE and OFFLINE state and the impact on GUI, I can certainly do it without using the network topology but with normal UPnP calls.

OFFLINE state is already detected with the displayed message “Cannot contact…”, I just have to update the Player tab.
For SLAVE state, I have to search a proper way to get the info and then adjust the Player tab.

By the way, I will not be able to “grey” (disable) buttons in the Control tab and buttons on the device, it is not something possible with the MCV flash GUI.

Agreed. There is no way of distinguish paired from grouped using this info.

How do I fetch the descriptor file? I could post them when i’m back home from work tonight.

Here is expanded view on mine (Living Room 2 Has been disconnected for a few days btw)

Zone Players
Zone Name	Coordinator	Group	Location	UUID	Version	MinCompatVer	Compat
Whole Home	false	RINCON_000E58D339F601400:4	http://192.168.1.95:1400/xml/device_description.xml	RINCON_000E58D337BE01400	21.4-61160c	21.1-00000	
BRIDGE	true	RINCON_000E58E4E8C801400:0	http://192.168.1.75:1400/xml/device_description.xml	RINCON_000E58E4E8C801400	21.4-61160c	21.1-00000	
Portable	false	RINCON_000E58D339F601400:4	http://192.168.1.70:1400/xml/device_description.xml	RINCON_000E587DE3F601400	21.4-61160c	21.1-00000	
CONNECT	true	RINCON_000E582E1D7E01400:121	http://192.168.1.73:1400/xml/device_description.xml	RINCON_000E582E1D7E01400	21.4-61160c	21.1-00000	
Living Room2	true	RINCON_000E58D339F601400:4	http://192.168.1.98:1400/xml/device_description.xml	RINCON_000E58D339F601400	21.4-61160c	21.1-00000	

[quote=“big517, post:16, topic:174636”]Here is expanded view on mine (Living Room 2 Has been disconnected for a few days btw)

[code]
Zone Players
Zone Name Coordinator Group Location UUID Version MinCompatVer Compat
Whole Home false RINCON_000E58D339F601400:4 http://192.168.1.95:1400/xml/device_description.xml RINCON_000E58D337BE01400 21.4-61160c 21.1-00000
BRIDGE true RINCON_000E58E4E8C801400:0 http://192.168.1.75:1400/xml/device_description.xml RINCON_000E58E4E8C801400 21.4-61160c 21.1-00000
Portable false RINCON_000E58D339F601400:4 http://192.168.1.70:1400/xml/device_description.xml RINCON_000E587DE3F601400 21.4-61160c 21.1-00000
CONNECT true RINCON_000E582E1D7E01400:121 http://192.168.1.73:1400/xml/device_description.xml RINCON_000E582E1D7E01400 21.4-61160c 21.1-00000
Living Room2 true RINCON_000E58D339F601400:4 http://192.168.1.98:1400/xml/device_description.xml RINCON_000E58D339F601400 21.4-61160c 21.1-00000

[/code][/quote]

Weird that “Living Room 2” didn’t disappear for you… When I disconnected one (of the stereo-paired units) it was removed from the topology immediately…

Forgot my VPN.

Here comes the descriptor files for left/right channel.

A bit hackish but

http://192.168.178.33:1400/status/zp

Gives the following which contains “(L)” in ZoneName. This could be used to distiguish groups from pair.

ZoneName K?k (L)
ZoneIcon x-rincon-roomicon:kitchen
Configuration 1
LocalUID RINCON_000E587E838C01400
SerialNumber 00-0E-58-7E-83-8C:9
SoftwareVersion 21.4-61160c
MinCompatibleVersion 21.1-00000
HardwareVersion 1.8.1.2-2
IPAddress 192.168.178.33
MACAddress 00:0E:58:7E:83:8C
Copyright ? 2004-2007 Sonos, Inc. All Rights Reserved.
ExtraInfo OTP:
HTAudioInCode 0
IdxTrk

This might be even more interesting.

http://192.168.178.34:1400/status/jffs/localsettings.txt

contents of /jffs/localsettings.txt
Version: [1.0]
HouseholdID: [Sonos_GuXqZszxZ3pwixYDli3Y6ZuMea]
BootSeq: [23]
RegisteredCustomerID: [--------]
ZoneName: [K?k]
Icon: [x-rincon-roomicon:kitchen]
EQ: [AMV55 LV100 RV100 B0 T0 LY FN SS4 LEV0 SWY SC0 SP0]
GroupID: [17]
ChannelMapSet: [RINCON_000E587E838C01400:LF,LF;RINCON_000E587E83B801400:RF,RF]
Invisible: [1]
UnpairedZoneName: [Vardagsrum]
UnpairedIcon: [x-rincon-roomicon:living]
LED: [Off]
Configuration: [1]
UnpairedConfiguration: [1]

http://192.168.178.33:1400/status/jffs/localsettings.txt

contents of /jffs/localsettings.txt
Version: [1.0]
HouseholdID: [Sonos_GuXqZszxZ3pwixYDli3Y6ZuMea]
BootSeq: [17]
ZoneName: [K?k]
Icon: [x-rincon-roomicon:kitchen]
RegisteredCustomerID: [-------]
EQ: [AMV55 LV100 RV100 B0 T0 LY FN SS4 LEV0 SWY SC0 SP0]
GroupID: [2]
ChannelMapSet: [RINCON_000E587E838C01400:LF,LF;RINCON_000E587E83B801400:RF,RF]
Invisible: [ 0 ]
UnpairedZoneName: [K?k]
UnpairedIcon: [x-rincon-roomicon:kitchen]
LED: [Off]
Configuration: [1]
UnpairedConfiguration: [1]

[quote=“big517, post:16, topic:174636”]Here is expanded view on mine (Living Room 2 Has been disconnected for a few days btw)

[code]
Zone Players
Zone Name Coordinator Group Location UUID Version MinCompatVer Compat
Whole Home false RINCON_000E58D339F601400:4 http://192.168.1.95:1400/xml/device_description.xml RINCON_000E58D337BE01400 21.4-61160c 21.1-00000
BRIDGE true RINCON_000E58E4E8C801400:0 http://192.168.1.75:1400/xml/device_description.xml RINCON_000E58E4E8C801400 21.4-61160c 21.1-00000
Portable false RINCON_000E58D339F601400:4 http://192.168.1.70:1400/xml/device_description.xml RINCON_000E587DE3F601400 21.4-61160c 21.1-00000
CONNECT true RINCON_000E582E1D7E01400:121 http://192.168.1.73:1400/xml/device_description.xml RINCON_000E582E1D7E01400 21.4-61160c 21.1-00000
Living Room2 true RINCON_000E58D339F601400:4 http://192.168.1.98:1400/xml/device_description.xml RINCON_000E58D339F601400 21.4-61160c 21.1-00000

[/code][/quote]

Are you absolutely sure that your Living Room2 Sonos zone is unplugged ?
Reading your information, I would have concluded that it is even the master of a group including Whole Home zone and Portable zone.