We have moved at community.getvera.com

Author Topic: Proper way to get information from the Sonos zones  (Read 4141 times)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Proper way to get information from the Sonos zones
« on: April 06, 2013, 05:18:13 am »
For people not following all the forum sections, futzle made a major enhancement developing a UPnP proxy that will allow any plugin to handle event notification from UPnP device.

In other words, it will allow our Sonos plugin to be informed in real time by the Sonos zones when something change. This will avoid getting information every 15 seconds even when not changed, and having information refreshed in the plugin in pseudo real-time.
It should help getting the network topology in a proper way.
And it should help to get services account information too.

I will made the changes in the plugin, keeping the old mode for people not having the UPnP proxy installed and running.

That will be a great enhancement for our plugin. Big thanks to futzle.

http://forum.micasaverde.com/index.php/topic,10182.0.html

Offline big517

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: Proper way to get information from the Sonos zones
« Reply #1 on: April 06, 2013, 07:43:13 am »
Are you saying she fixed upnp?

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Proper way to get information from the Sonos zones
« Reply #2 on: April 06, 2013, 09:25:59 am »
I am saying she find a solution to bypass the main problem we have for the exchange of data information with Sonos zones

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Proper way to get information from the Sonos zones
« Reply #3 on: April 06, 2013, 09:28:18 am »
With Futzle's UPnP proxy, we are now able to do a proper implementation.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Proper way to get information from the Sonos zones
« Reply #4 on: April 27, 2013, 07:59:12 pm »
Using futzle's UPnP event proxy, I discovered a case where the received event does not deliver exactly the same data as the corresponding UPnP call to retrieve the current track metadata. For a tunein radio, the XML tag dc:title in the track metadata has not the same value. So I will have to find a solution and adjust the code.

But I am really not far to have something working very well that allows to suppress the poll loop every 15 seconds in the Sonos plugin. I should be able to commit a new Sonos version probably during the next week.

Using the Sonos event notifications, you can get additional information you cannot get with the UPnP calls, like for example the next track to be played. Normally, I should be able to get the Sonos network topology too, but I have not yet checked this part.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Proper way to get information from the Sonos zones
« Reply #5 on: August 24, 2013, 10:15:12 am »
The plugin in its last version now works well with the UPnP event proxy (if installed of course). Thanks to futzle for this plugin.

That means that the plugin is no more sending frequent UPnP requests to each Sonos, except few calls at lua startup and of course when you activate a Sonos command from a Vera scene or the Vera UI.
When no Sonos command is run by the Vera, the plugin is only listening to event notifications coming from each Sonos (through the proxy) + every 5 minutes the plugin tries to retrieve the XML description file of each Sonos to determine if it is online or offline.

So this new mode will largely reduce the taffic between the Sonos and the Vera, and theorically the plugin could not have impact on how the Sonos are working. It is to be checked by users having reported strange behaviour with group management caused by the Sonos plugin.

Of course, a second improvment iof this new mode s that the Vera is immediately informed of any change on the Sonos. There is no delay to get updated information.
« Last Edit: August 24, 2013, 10:39:23 am by lolodomo »

Offline a-lurker

  • Hero Member
  • *****
  • Posts: 872
  • Karma: +66/-8
Re: Proper way to get information from the Sonos zones
« Reply #6 on: August 24, 2013, 08:19:14 pm »
Excellent - look forward to seeing this in action.

Edit: - it's working well so far.
« Last Edit: August 24, 2013, 10:52:08 pm by a-lurker »

Offline Piwtorak

  • Hero Member
  • *****
  • Posts: 988
  • Karma: +4/-0
Re: Proper way to get information from the Sonos zones
« Reply #7 on: October 09, 2013, 04:53:16 pm »
Lolodomo,
I would like to have the last version for sonos plugin, I have already installed upnp proxy from futzle.

can you give me the necessary directions to do the things up to date in my system for sonos and vera ?

thanks !

Vera3 (1), Airport Extreme (2), Apple TV (3), Sqblaster (1), GE Switch (3), GE Dimmer (1), Leviton VRCSZ2 (2), GE 45601 (1), Intermatic HA03 (2), GE Zwave Outlet (1), Remote Control Curtain (1) and growing.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Proper way to get information from the Sonos zones
« Reply #8 on: October 10, 2013, 02:30:53 am »
Please follow the detailed instructions trom the wiki: http://code.mios.com/trac/mios_sonos-wireless-music-systems#
« Last Edit: October 10, 2013, 05:39:27 am by lolodomo »

Offline Piwtorak

  • Hero Member
  • *****
  • Posts: 988
  • Karma: +4/-0
Re: Proper way to get information from the Sonos zones
« Reply #9 on: October 10, 2013, 10:15:22 am »
Thanks Lolodomo,
I have my system running in vera3, saying the time, saying alerts when a door is open, etc.

I want to install the last files for update plugin...in the wiki the dates are:

D_Sonos1.xml​ (599 bytes) - added by anker 23 months ago.
I_Sonos1.xml​ (5.6 KB) - added by anker 23 months ago.
S_Sonos1.xml​ (701 bytes) - added by anker 23 months ago.
SonosUI5AdvancedScene.jpg​ (80.8 KB) - added by guessed 16 months ago.
Sonos-Dashboard.png​ (23.9 KB) - added by guessed 11 months ago.
Sonos-Dialog-Control.png​ (43.0 KB) - added by guessed 11 months ago.
Sonos-Dialog-Player.png​ (58.8 KB) - added by guessed 11 months ago.


is this the newest version ?

thanks !
Vera3 (1), Airport Extreme (2), Apple TV (3), Sqblaster (1), GE Switch (3), GE Dimmer (1), Leviton VRCSZ2 (2), GE 45601 (1), Intermatic HA03 (2), GE Zwave Outlet (1), Remote Control Curtain (1) and growing.

Offline Brientim

  • Sr. Hero Member
  • ******
  • Posts: 2497
  • Karma: +78/-7
Re: Proper way to get information from the Sonos zones
« Reply #10 on: October 10, 2013, 11:05:09 am »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Proper way to get information from the Sonos zones
« Reply #11 on: October 10, 2013, 11:13:34 am »
Thanks Lolodomo,
I have my system running in vera3, saying the time, saying alerts when a door is open, etc.

I want to install the last files for update plugin...in the wiki the dates are:

D_Sonos1.xml​ (599 bytes) - added by anker 23 months ago.
I_Sonos1.xml​ (5.6 KB) - added by anker 23 months ago.
S_Sonos1.xml​ (701 bytes) - added by anker 23 months ago.
SonosUI5AdvancedScene.jpg​ (80.8 KB) - added by guessed 16 months ago.
Sonos-Dashboard.png​ (23.9 KB) - added by guessed 11 months ago.
Sonos-Dialog-Control.png​ (43.0 KB) - added by guessed 11 months ago.
Sonos-Dialog-Player.png​ (58.8 KB) - added by guessed 11 months ago.


is this the newest version ?

thanks !

The link where to download the ZIP file is mentioned in the "what you need" part of the wiki page.
Wiki main page: http://code.mios.com/trac/mios_sonos-wireless-music-systems#
Download of beta1 version: http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/tags/beta1

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Proper way to get information from the Sonos zones
« Reply #12 on: October 10, 2013, 11:14:31 am »
To update to a new version, you just have to upload the new files and then reload.