Beta 1 version of the Sonos plugin released

A new major update of the Sonos plugin is now available.
You can download the ZIP file at the bottom of this page: beta1 in tags – Sonos Wireless HiFi Music Systems
Please note that the “services” subdirectory in this archive is unnecessary.

This new version was mainly oriented to a better management of groups.

Here are the changes:

[ol][li]
UI: new Group tab to manage group
[/li]
[li]
New action JoinGroup: the Zone parameter, a Sonos zone name, is a member of the group to be joined, not necessarly the group coordinator
[/li]
[li]
New action LeaveGroup
[/li]
[li]
New action UpdateGroupMembers: the Zones parameter is a comma-separated list of Sonos zone names
[/li]
[li]
Updated actions: most of the AVTransport actions sent to a device are now automatically redirected to the group coordinator
[/li]
[li]
New variables GroupCoordinator, ZonePlayerUUIDsInGroup and ZoneGroupState; variable SonosDevices suppressed.
[/li]
[li]
fix for actions Alert, Say, SavePlaybackContext and RestorePlaybackContext when several zones are involved
[/li]
[li]
Updated actions Alert, Say and SavePlaybackContext: new parameter GroupZones; this parameter is a comma-separated list of Sonos zone names
[/li]
[li]
Updated actions Alert and Say: new parameter SameVolumeForAll; this boolean parameter notifies whether or not the same volume has to be set for all given zones
[/li]
[li]
New action PauseAll to pause music on all Sonos zones
[/li]
[li]
UI Player tab: refresh is improved (refresh rate is now set to 1 second and tab content is now refreshed only when something changes)
[/li]
[li]
UI Player tab: lists content (Sonos playlists, radiu stations, …) is now refreshed
[/li]
[li]
UI Player tab: new button “Clear” to clear the Sonos queue
[/li]
[li]
UI Player tab: for a zone not being a group coordinator, all actions except TTS are automatically redirected to the group coordinator, meaning you can control a group from any of its members
[/li]
[li]
Time position variables (4 variables) are now set even when the UPnP proxy event is used (but set only when there is a potential break of this time position)
[/li]
[li]
Sonos UPnP services updated to match the last Sonos software version
[/li]
[li]
All “Get” actions commented in the Sonos UPnP services (actions that cannot be used by the final Vera user)
[/li]
[li]
new Sonos UPnP services activated: GroupRenderingControl, ZoneGroupTopology, ContentDirectory and MusicServices
[/li]
[li]
Network topology is no more retrieved from a specific HTTP request but from a simple UPnP call or through an event notification[/li][/ol]

I am now waiting for feedbacks (beta testers) during the coming weeks.

If the feedbacks are good, then I will publish the plugin on the app store.

Please note that my tests have been done mainly using the UPnP event proxy.
I have done few positive tests without the UPnP event proxy too, but I encourage everybody now to use the proxy.

Additionally, there are some complex cases with groups that can happen when you have 3 or more Sonos. As I have only 2 Sonos, I was not able to test all these cases.

Here is what I know as not yet perfect in this version:

[ul][li]An action to adjust the group volume as everybody would logically expect is still missing[/li]
[li]when disconnecting a zone, the network change is not propagated to the other zones[/li]
[li]I have not yet managed specifically the paired zones (paired Play:5)[/li][/ul]

I tried to improve the description of the installation procedure in the wiki: Sonos Wireless HiFi Music Systems

New Vera User, but not new to Home Automation. Purchased and installed VeraLite today. Got a few Schlage door sensors as well, one to notify when a particular door is open, the other to interface to our Lutron Radio RA2 Visor Controller (which has 4 contact closures). So, take comments below as coming from a new user.

Installed new Sonos Beta SW today. Followed all the steps. It was a little confusing because it seems that people interchangeably talk about UI4 and UI5 (I’m on 5, I guess) and things are in different places in UI5. Took a while to figure out where the “toolbox” was, for example. Anyway, got everything installed, tried to add a Sonos Zone. System didn’t seem to do anything when I added the zone (created the device but it didn’t show your UI for controlling the zone). So, deleted the device and tried again. Still nothing. Tried with a different parent, then device showed up but not controllable. Tried again just as you specified. This time I waited and device showed properly after a “reload.” Instructions talk about “save” but “save” doesn’t show after adding the device in UI5. Very strange. Anyway, I think I just didn’t wait long enough or chalk it all up to dumb user mode.

Anyway, after that was done, added a Sonos Pause All scene that sends a “Pause All” to one Sonos Zone. This scene in Vera is triggered from a alarm condition (on the Schlage sensor) which is wired to a Contact Closure from my Lutron Radio RA2 system. Magic! Works perfectly.

I’ll play around a bunch more with the Beta, though I have pretty limited needs right now for control. The main function was just making it easy for the wife to pause the music when she turns off the lights leaving the house!

@lolodomo, thanks for this plugin.

What is the recommended install method for those with a prior install? If the prior install must be removed, is there any way to preserve the player configuration?

[quote=“Ds514, post:7, topic:177168”]@lolodomo, thanks for this plugin.

What is the recommended install method for those with a prior install? If the prior install must be removed, is there any way to preserve the player configuration?[/quote]

Just upload the new files and reload.

If you don’t have the UPnP proxy installed. I recommend to install it (find it in the apps store).

I will update the wiki. You’re right, there is no “toolbox” section in UI5. It is “Developer apps” or something like that.

tried to add a Sonos Zone. System didn't seem to do anything when I added the zone (created the device but it didn't show your UI for controlling the zone). So, deleted the device and tried again. Still nothing. Tried with a different parent, then device showed up but not controllable. Tried again just as you specified. This time I waited and device showed properly after a "reload." Instructions talk about "save" but "save" doesn't show after adding the device in UI5. Very strange. Anyway, I think I just didn't wait long enough or chalk it all up to dumb user mode.

You must not attach a new Sonos device to a parent device.
Regarding the button label (save or reload), I will check this evening and update the wiki if you’re right.
There might be a little difference between UI4 and UI5 for that.

Is it possible for you to fix a Icon file for a Playbar…

Yes.
Please give me what ModelNumber is set in the XML description file for the Playbar + the icon path.
Please read this topic to understand how to get the different informations: http://forum.micasaverde.com/index.php/topic,12973.0.html
With the URL of the Playbar icon, I can try to retrieve it from my own Sonos devices. In case it does not work, I would need that you send me the PNG file too.

I hope I can add this new icon without having to rename all the other icons…

If i understand the XML file it must be icon-S9.png

Se below

1 0 urn:schemas-upnp-org:device:ZonePlayer:1 192.168.1.123 - Sonos PLAYBAR Sonos, Inc. http://www.sonos.com S9 Sonos PLAYBAR Sonos PLAYBAR Arc: The Wireless Atmos Home Theater Soundbar | Sonos 22.0-65180a 1.9.1.10-2 00-0E-58-B0-5D-A6:D uuid:RINCON_000E58B05DA601400 0 image/png 48 48 24 /img/icon-S9.png 21.1-00000 4.1 OTP: Huvudsovrum PB PLAYBAR 10 0x00008000 0x30206772 0x00030008 6 50.000 0.000 urn:schemas-upnp-org:service:AlarmClock:1 urn:upnp-org:serviceId:AlarmClock /AlarmClock/Control /AlarmClock/Event /xml/AlarmClock1.xml urn:schemas-upnp-org:service:MusicServices:1 urn:upnp-org:serviceId:MusicServices /MusicServices/Control /MusicServices/Event /xml/MusicServices1.xml urn:schemas-upnp-org:service:DeviceProperties:1 urn:upnp-org:serviceId:DeviceProperties /DeviceProperties/Control /DeviceProperties/Event /xml/DeviceProperties1.xml urn:schemas-upnp-org:service:SystemProperties:1 urn:upnp-org:serviceId:SystemProperties /SystemProperties/Control /SystemProperties/Event /xml/SystemProperties1.xml urn:schemas-upnp-org:service:ZoneGroupTopology:1 urn:upnp-org:serviceId:ZoneGroupTopology /ZoneGroupTopology/Control /ZoneGroupTopology/Event /xml/ZoneGroupTopology1.xml urn:schemas-upnp-org:service:GroupManagement:1 urn:upnp-org:serviceId:GroupManagement /GroupManagement/Control /GroupManagement/Event /xml/GroupManagement1.xml urn:schemas-upnp-org:service:HTControl:1 urn:upnp-org:serviceId:HTControl /HTControl/Control /HTControl/Event /xml/HTControl1.xml urn:schemas-upnp-org:device:MediaServer:1 192.168.1.123 - Sonos PLAYBAR Media Server Sonos, Inc. http://www.sonos.com S9 Sonos PLAYBAR Media Server Sonos PLAYBAR Arc: The Wireless Atmos Home Theater Soundbar | Sonos uuid:RINCON_000E58B05DA601400_MS urn:schemas-upnp-org:service:ContentDirectory:1 urn:upnp-org:serviceId:ContentDirectory /MediaServer/ContentDirectory/Control /MediaServer/ContentDirectory/Event /xml/ContentDirectory1.xml urn:schemas-upnp-org:service:ConnectionManager:1 urn:upnp-org:serviceId:ConnectionManager /MediaServer/ConnectionManager/Control /MediaServer/ConnectionManager/Event /xml/ConnectionManager1.xml urn:schemas-upnp-org:device:MediaRenderer:1 Huvudsovrum PB - Sonos PLAYBAR Media Renderer Sonos, Inc. http://www.sonos.com S9 Sonos PLAYBAR Media Renderer Sonos PLAYBAR Arc: The Wireless Atmos Home Theater Soundbar | Sonos uuid:RINCON_000E58B05DA601400_MR urn:schemas-upnp-org:service:RenderingControl:1 urn:upnp-org:serviceId:RenderingControl /MediaRenderer/RenderingControl/Control /MediaRenderer/RenderingControl/Event /xml/RenderingControl1.xml urn:schemas-upnp-org:service:ConnectionManager:1 urn:upnp-org:serviceId:ConnectionManager /MediaRenderer/ConnectionManager/Control /MediaRenderer/ConnectionManager/Event /xml/ConnectionManager1.xml urn:schemas-upnp-org:service:AVTransport:1 urn:upnp-org:serviceId:AVTransport /MediaRenderer/AVTransport/Control /MediaRenderer/AVTransport/Event /xml/AVTransport1.xml urn:schemas-sonos-com:service:Queue:1 urn:sonos-com:serviceId:Queue /MediaRenderer/Queue/Control /MediaRenderer/Queue/Event /xml/Queue1.xml urn:schemas-upnp-org:service:GroupRenderingControl:1 urn:upnp-org:serviceId:GroupRenderingControl /MediaRenderer/GroupRenderingControl/Control /MediaRenderer/GroupRenderingControl/Event /xml/GroupRenderingControl1.xml urn:rhapsody-real-com:device-id-1-0:sonos_1:RINCON_000E58B05DA601400 QPlay:2 image/png 48 48 24 /img/icon-S9.png

Ok, Playbar is identified by “S9”. Sonos coud have used a better ref !
Can you provide the following image file: http://192.168.x.xx:1400/img/icon-S9.png ?
replacing the IP in this URL with your Playbar IP.

Here is the Icon-S9.png file for Sonos Playbar

Playbar and Play:1 cions are now added in my working version.
So this will be part of the next version. I will tell you as soon as the code is available in trunk.