Page 8 of 10

Re: SONOS Plugin Official (download here)

Posted: Tue Dec 29, 2015 10:57 pm
by techoguy
Litfoo,

can you change the debug of the sonos plugin to 1 or 2 and then copy the output to the screen as you did here? With what I see, I'm not sure why this is happening. Also, it seems odd that there is no red error within EG and yet the next action, "Start Program: Harm.." isn't executing.

Re: SONOS Plugin Official (download here)

Posted: Wed Dec 30, 2015 10:10 am
by litfoo
Sure - I set it to 2

Image

Anything you can see here?

** update** not sure how and why, but since resetting logging back to 0 and restarting EG, it seems to be all working as before

thanks for your help so far Techoguy

Re: SONOS Plugin Official (download here)

Posted: Wed Jan 06, 2016 8:57 pm
by kalinkamaen
Hello guys.

I just want to mention that Sonos favourites works with voxcommando.
See picture:

Image

I am now sending events to voxcommando from EG with broadcaster. And voxcommander
starts my playlist.

If we could get the info from voxcommando and give it to techoguy he could fix it for us!!??

Here is a copy of sonos plugin XML file from voxcommando. I do not know if it is any help!!

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<!--AvailableCommands.xml-->

<!--This should be in the same folder as the plugin dll-->

-<AvailableCommands>


-<command>

<name>Sonos</name>

<commandString/>


-<info>

<params/>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos</helplink>


-<description>

<default>Control over Sonos wireless audio systems.</default>

<de/>

</description>

</info>


-<command>

<name>ClearQueue</name>

<commandString>Sonos.ClearQueue</commandString>


-<info>

<params>0</params>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#ClearQueue</helplink>


-<description>

<default>Remove all tracks from the current queue for the current player/coordinator.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>CreateGroup</name>

<commandString>Sonos.CreateGroup</commandString>


-<info>

<params>2-4</params>

<parameter optional="False" type="string" name="GroupName">Existing Group or Single player</parameter>

<parameter optional="False" type="string" name="Player1">First player to add</parameter>

<parameter optional="True" type="string" name="Player2">Second player to add</parameter>

<parameter optional="True" type="string" name="Player3">Thrid player to add</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#CreateGroup</helplink>


-<description>

<default>Creates a group or adds to an existing group. Returns the name of the new group is successfully created.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>DissolveGroup</name>

<commandString>Sonos.DissolveGroup</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="string" name="Group Name"/>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#DissolveGroup</helplink>


-<description>

<default>Dissolves (removes) the group named <Group Name> freeing the individual players from the group.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>DissolveAllGroups</name>

<commandString>Sonos.DissolveAllGroups</commandString>


-<info>

<params>0</params>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#DissolveAllGroups</helplink>


-<description>

<default>Dissolves (removes) all known groups freeing the individual players from the groups they were in, if any.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>GenXML</name>

<commandString>Sonos.GenXML</commandString>


-<info>

<params/>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#GenXML</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>Play</name>

<commandString>Sonos.Play</commandString>


-<info>

<params/>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Play</helplink>


-<description>

<default>Actions to play various types of content on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.</default>

<de/>

</description>

</info>


-<command>

<name>Artist</name>

<commandString>Sonos.Play.Artist</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="Artist">Specify content to queue and play</parameter>

<parameter optional="True" type="boolean" name="Clear Queue">Clear existing queue before adding new items</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Artist</helplink>


-<description>

<default>Play Sonos library songs by <Artist> on the current player. If the player is the coordinator of a group, then all players in that group will also play the content.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>Album</name>

<commandString>Sonos.Play.Album</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="Album">Specify content to queue and play</parameter>

<parameter optional="True" type="boolean" name="Clear Queue">Clear existing queue before adding new items</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Album</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>AlbumArtist</name>

<commandString>Sonos.Play.AlbumArtist</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="AlbumArtist">Specify content to queue and play</parameter>

<parameter optional="True" type="boolean" name="Clear Queue">Clear existing queue before adding new items</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#AlbumArtist</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>Composer</name>

<commandString>Sonos.Play.Composer</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="Composer">Specify content to queue and play</parameter>

<parameter optional="True" type="boolean" name="Clear Queue">Clear existing queue before adding new items</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Composer</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>Genre</name>

<commandString>Sonos.Play.Genre</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="Genre">Specify content to queue and play</parameter>

<parameter optional="True" type="boolean" name="Clear Queue">Clear existing queue before adding new items</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Genre</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>SavedQ</name>

<commandString>Sonos.Play.SavedQ</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="SavedQ">Specify content to queue and play</parameter>

<parameter optional="True" type="boolean" name="Clear Queue">Clear existing queue before adding new items</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SavedQ</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>Favourite</name>

<commandString>Sonos.Play.Favourite</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="Favourite">Specify content to queue and play</parameter>

<parameter optional="True" type="boolean" name="Clear Queue">Clear existing queue before adding new items</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Favourite</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>TuneIn</name>

<commandString>Sonos.Play.TuneIn</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="StationID">Specify content to queue and play</parameter>

<parameter optional="True" type="boolean" name="Clear Queue">Clear existing queue before adding new items</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#TuneIn</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>Share</name>

<commandString>Sonos.Play.Share</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="Share">Specify content to queue and play</parameter>

<parameter optional="True" type="boolean" name="Clear Queue">Clear existing queue before adding new items</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Share</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>

</command>


-<command>

<name>Player</name>

<commandString/>


-<info>

<params/>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Player</helplink>


-<description>

<default>Control the currently selected player (device)</default>

<de/>

</description>

</info>


-<command>

<name>Play</name>

<commandString>Sonos.Player.Play</commandString>


-<info>

<params>0</params>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Play</helplink>


-<description>

<default>Start playback of the current queue (if any).</default>

<de/>

</description>

</info>

</command>


-<command>

<name>Pause</name>

<commandString>Sonos.Player.Pause</commandString>


-<info>

<params>0</params>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Pause</helplink>


-<description>

<default>Pause or stop playback of the current player.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>SetVol</name>

<commandString>Sonos.Player.SetVol</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="integer" name="Volume">0 to 60 percent</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SetVol</helplink>


-<description>

<default>Set the current play volume to a value from 0-60</default>

<de/>

</description>

</info>

</command>


-<command>

<name>AdjustVol</name>

<commandString>Sonos.Player.AdjustVol</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="integer" name="Adjustment">+/- %</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#AdjustVol</helplink>


-<description>

<default>Adjusts the current player's play volume by a positive or negative value in percent.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>SetGrpVol</name>

<commandString>Sonos.Player.SetGrpVol</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="integer" name="Volume">0 to 60 percent</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SetGrpVol</helplink>


-<description>

<default>Set the current group's play volume to a value from 0-60</default>

<de/>

</description>

</info>

</command>


-<command>

<name>AdjustGrpVol</name>

<commandString>Sonos.Player.AdjustGrpVol</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="integer" name="Adjustment">+/- %</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#AdjustGrpVol</helplink>


-<description>

<default>Adjusts the current group's play volume by a positive or negative value in percent.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>SetLoudness</name>

<commandString>Sonos.Player.SetLoudness</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="boolean" name="Enabled"/>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SetLoudness</helplink>


-<description>

<default>Set the current player's loudness to true or false (enabled disabled)</default>

<de/>

</description>

</info>

</command>


-<command>

<name>GetVolume</name>

<commandString>Sonos.Player.GetVolume</commandString>


-<info>

<params>0</params>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#GetVolume</helplink>


-<description>

<default>Get the current player's volume (0-100%)</default>

<de/>

</description>

</info>

</command>


-<command>

<name>Next</name>

<commandString>Sonos.Player.Next</commandString>


-<info>

<params>0</params>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Next</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>Previous</name>

<commandString>Sonos.Player.Previous</commandString>


-<info>

<params>0</params>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Previous</helplink>


-<description>

<default/>

<de/>

</description>

</info>

</command>


-<command>

<name>SetPlayMode</name>

<commandString>Sonos.Player.SetPlayMode</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="string" name="PlayMode">eg: SHUFFLE_NOREPEAT</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SetPlayMode</helplink>


-<description>

<default>Sets the playback mode to one of: SHUFFLE, SHUFFLE_NOREPEAT, NORMAL, REPEAT_ALL</default>

<de/>

</description>

</info>

</command>

</command>


-<command>

<name>TTS</name>

<commandString/>


-<info>

<params/>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#TTS</helplink>


-<description>

<default/>

<de/>

</description>

</info>


-<command>

<name>Speak</name>

<commandString>Sonos.TTS.Speak</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="string" name="Text">TTS text to say aloud</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#Speak</helplink>


-<description>

<default>Creates a wav file with the given text spoken, by the current TTS voice and plays it on the current Sonos Player Device. ***WARNING the voice must be different from the one being used by the normal TTS plugin. We hope to fix this.</default>

<de/>

</description>

</info>

</command>

</command>


-<command>

<name>SeekTime</name>

<commandString>Sonos.Group.SeekTime</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="string" name="Time">format HH:MM:SS</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SeekTime</helplink>


-<description>

<default>Seeks in the currently playing track to the <Time> specified. Time must be specified in the format: HH:MM:SS</default>

<de/>

</description>

</info>

</command>


-<command>

<name>SeekTrack</name>

<commandString>Sonos.Group.SeekTrack</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="integer" name="TrackIndex">Track number to play</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SeekTrack</helplink>


-<description>

<default>Seeks in the current play queue to the track specified by <TrackIndex></default>

<de/>

</description>

</info>

</command>


-<command>

<name>SetPlayer</name>

<commandString>Sonos.SetPlayer</commandString>


-<info>

<params>1</params>

<parameter optional="False" type="string" name="Player Name">Player to control</parameter>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SetPlayer</helplink>


-<description>

<default>Select the current player which will be controlled by subsequent actions.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>SetLastPlayer</name>

<commandString>Sonos.SetLastPlayer</commandString>


-<info>

<params>0</params>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SetLastPlayer</helplink>


-<description>

<default>Select the last current player which will be controlled by subsequent actions. This allows you to temporarily target a player as follows. Assume you are using player 'A' and want to temporarily control player 'C': Sonos.SetPlayer C ... do various actions here ... ... do various actions here ... Sonos.SetLastPlayer</default>

<de/>

</description>

</info>

</command>


-<command>

<name>PartyMode</name>

<commandString>Sonos.PartyMode</commandString>


-<info>

<params>0-1</params>

<parameter optional="True" type="string" name="Coordinator"/>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#PartyMode</helplink>


-<description>

<default>Create a group containing all available players. If <Coordinator> is not specified then the current player will be used as the <Coordinator>.</default>

<de/>

</description>

</info>

</command>


-<command>

<name>SetUri</name>

<commandString>Sonos.SetUri</commandString>


-<info>

<params>1-2</params>

<parameter optional="False" type="string" name="Uri"/>

<parameter optional="True" type="string" name="Meta"/>

<helplink>http://voxcommando.com/mediawiki/index.php?title=Plugin_Sonos#SetUri</helplink>


-<description>

<default>Low level action for playing or queing items manually. See standard Sonos configuration for examples.</default>

<de/>

</description>

</info>

</command>

</command>

</AvailableCommands>

Re: SONOS Plugin Official (download here)

Posted: Mon Jan 11, 2016 5:29 am
by techoguy
Hi All,
I have fixed the plugin.
The latest version can be found here from now on: https://github.com/techoguy/Full-SONOS- ... EventGhost
I will still announce here when a new release is completed.

SONOS changed the formatting of some of their header responses which is what caused the Favorites action drop down to show up empty. I actually wrote the plugin with very few third party modules so I handle all my own HTTP headers and UPNP protocol. Third party modules should have been used but I built this plugin to be very light and to better understand both protocols and python better.

Let me know how it works.

Re: SONOS Plugin Official (download here)

Posted: Mon Jan 11, 2016 7:01 am
by kalinkamaen
Hello techoguy.

First of all, thank you for using you spare time to help oss with this.

I still have problem with startplaylist. When I make a macro "startplaylist", I do not se any
favorites at all listed. And you can read Error i get under here!!

Code: Select all

---> Welcome to EventGhost <---
looking for ZP that is not invisible...
ERROR StartPlayList: something went wrong local variable 'tempuuid' referenced before assignment
SONOS.ERROR "ERROR StartPlayList: something went wrong local variable 'tempuuid' referenced before assignment"
Traceback (most recent call last) (1710):
  File "wx\_core.pyc", line 14669, in <lambda>
  File "C:\EventGhost\eg\Core.py", line 197, in Notify
    listener(value)
  File "C:\EventGhost\eg\Classes\MainFrame\TreeCtrl.py", line 844, in OnNodeSelected
    path = node.GetPath()
  File "C:\EventGhost\eg\Classes\TreeItem.py", line 377, in GetPath
    path.append(parent.childs.index(item))
ValueError: list.index(x): x not in list

Re: SONOS Plugin Official (download here)

Posted: Mon Jan 11, 2016 11:38 pm
by techoguy
kalinkamaen wrote:Hello techoguy.

First of all, thank you for using you spare time to help oss with this.

I still have problem with startplaylist. When I make a macro "startplaylist", I do not se any
favorites at all listed. And you can read Error i get under here!!
Hi Kalinkamaen,
It looks like the plugin has not found any Zone players. Can you verify that zone players were found when the plugin was first started? I would restart EG or the plugin to try again. If you see the message "!! - No SONOS ZPs, search network again" or something similar in the beginning then the plugin hasn't found your zone players on the network. I've been seeing this a lot more lately not just with my plugin but anything that tries to connect to SONOS. So if after multiple restarts of EG you still get this message, try power cycling your main SONOS player that is connected to the network. That is what usually fixes it for me.

Re: SONOS Plugin Official (download here)

Posted: Tue Jan 12, 2016 8:23 am
by kalinkamaen
My sonos plugin works very good until I start adding startplaylist to it. Have a look here:

Code: Select all

SONOS.ZonePlayerAdded '192.168.10.170-RINCON_000E58A0BFBA01400'
SONOS.ADDED.RINCON_000E58A0BFBA01400 '192.168.10.170'
SONOS.ZonePlayerAdded '192.168.10.152-RINCON_000E587AC37801400'
SONOS.ADDED.RINCON_000E587AC37801400 '192.168.10.152'
SONOS.ZonePlayerAdded '192.168.10.181-RINCON_000E584B11EC01400'
SONOS.ADDED.RINCON_000E584B11EC01400 '192.168.10.181'
SONOS.ZonePlayerAdded '192.168.10.102-RINCON_000E58A26D0A01400'
SONOS.ADDED.RINCON_000E58A26D0A01400 '192.168.10.102'
SONOS.ZonePlayerAdded '192.168.10.114-RINCON_000E582B34C601400'
SONOS.ADDED.RINCON_000E582B34C601400 '192.168.10.114'
SONOS.ZonePlayerAdded '192.168.10.185-RINCON_000E587AC33401400'
SONOS.ADDED.RINCON_000E587AC33401400 '192.168.10.185'
SONOS.ZonePlayerAdded '192.168.10.141-RINCON_000E58FE544C01400'
SONOS.ADDED.RINCON_000E58FE544C01400 '192.168.10.141'
SONOS.ZonePlayerAdded '192.168.10.112-RINCON_000E58A036E401400'
SONOS.ADDED.RINCON_000E58A036E401400 '192.168.10.112'
SONOS.RINCON_000E58FE544C01400.Stopped u"Stue"
SONOS.RINCON_000E587AC33401400.Stopped u"Kjokken"
SONOS.RINCON_000E58A0BFBA01400.Volume u"vol-0 Garasje"
SONOS.RINCON_000E58A0BFBA01400.Mute u"mute-1 Garasje"
SONOS.RINCON_000E587AC37801400.Volume u"vol-20 Bad"
SONOS.RINCON_000E587AC37801400.Mute u"mute-0 Bad"
SONOS.RINCON_000E582B34C601400.Volume u"vol-50 Treningsrom"
SONOS.RINCON_000E582B34C601400.Mute u"mute-1 Treningsrom"
SONOS.RINCON_000E58A0BFBA01400.Stopped u"Garasje"
SONOS.RINCON_000E58A036E401400.Playing u"Loftstue"
SONOS.RINCON_000E582B34C601400.Stopped u"Treningsrom"
SONOS.RINCON_000E587AC33401400.Playing u"Kjokken"
SONOS.RINCON_000E587AC37801400.Playing u"Bad"
SONOS.RINCON_000E58FE544C01400.Playing u"Stue"
SONOS.RINCON_000E58FE544C01400.Volume u"vol-20 Stue"
SONOS.RINCON_000E58FE544C01400.Mute u"mute-0 Stue"
SONOS.RINCON_000E58A26D0A01400.Stopped u"Uteområdet"
SONOS.RINCON_000E587AC33401400.Volume u"vol-20 Kjokken"
SONOS.RINCON_000E587AC33401400.Mute u"mute-0 Kjokken"
SONOS.RINCON_000E58A26D0A01400.Volume u"vol-25 Uteområdet"
SONOS.RINCON_000E58A26D0A01400.Mute u"mute-1 Uteområdet"
SONOS.ERROR u"**Response Device XML Request Error from Uteområdet

{'body': '<?xml version="1.0" encoding="utf-8" ?><root xmlns="urn:schemas-upnp-org:device-1-0">  <specVersion>    <major>1</major>    <minor>0</minor>  </specVersion>  <device>    <deviceType>urn:schemas-upnp-org:device:ZonePlayer:1</deviceType>    <friendlyName>192.168.10.102 - Sonos CONNECT</friendlyName>    <manufacturer>Sonos, Inc.</manufacturer>    <manufacturerURL>http://www.sonos.com</manufacturerURL>    <modelNumber>ZP90</modelNumber>    <modelDescription>Sonos CONNECT</modelDescription>    <modelName>Sonos CONNECT</modelName>    <modelURL>http://www.sonos.com/products/zoneplayers/ZP90</modelURL>    <softwareVersion>31.3-22220</softwareVersion>    <hardwareVersion>1.16.5.5-2</hardwareVersion>    <serialNum>00-0E-58-A2-6D-0A:C</serialNum>    <UDN>uuid:RINCON_000E58A26D0A01400</UDN>    <iconList>      <icon>        <id>0</id>        <mimetype>image/png</mimetype>        <width>48</width>        <height>48</height>        <depth>24</depth>        <url>/img/icon-ZP90.png</url>      </icon>    </iconList>    <minCompatibleVersion>29.0-00000</minCompatibleVersion>    <legacyCompatibleVersion>24.0-00000</legacyCompatibleVersion>    <displayVersion>6.0</displayVersion>    <extraVersion>OTP: 1.1.1(1-16-5-zp90-0.8)</extraVersion>    <roomName>Uteomr\xc3\xa5det</roomName>    <displayName>CONNECT</displayName>    <zoneType>1</zoneType>    <feature1>0x00310001</feature1>    <feature2>0x00006172</feature2>    <feature3>0x00030021</feature3>    <internalSpeakerSize>-1</internalSpeakerSize>    <bassExtension>0.000</bassExtension>    <satGainOffset>0.000</satGainOffset>    <memory>32</memory>    <flash>32</flash>    <ampOnTime>425</ampOnTime>    <serviceList>      <service>        <serviceType>urn:schemas-upnp-org:service:AlarmClock:1</serviceType>        <serviceId>urn:upnp-org:serviceId:AlarmClock</serviceId>        <controlURL>/AlarmClock/Control</controlURL>        <eventSubURL>/AlarmClock/Event</eventSubURL>        <SCPDURL>/xml/AlarmClock1.xml</SCPDURL>      </service>          <service>        <serviceType>urn:schemas-upnp-org:service:MusicServices:1</serviceType>        <serviceId>urn:upnp-org:serviceId:MusicServices</serviceId>        <controlURL>/MusicServices/Control</controlURL>        <eventSubURL>/MusicServices/Event</eventSubURL>        <SCPDURL>/xml/MusicServices1.xml</SCPDURL>      </service>          <service>        <serviceType>urn:schemas-upnp-org:service:AudioIn:1</serviceType>        <serviceId>urn:upnp-org:serviceId:AudioIn</serviceId>        <controlURL>/AudioIn/Control</controlURL>        <eventSubURL>/AudioIn/Event</eventSubURL>        <SCPDURL>/xml/AudioIn1.xml</SCPDURL>      </service>      <service>        <serviceType>urn:schemas-upnp-org:service:DeviceProperties:1</serviceType>        <serviceId>urn:upnp-org:serviceId:DeviceProperties</serviceId>        <controlURL>/DeviceProperties/Control</controlURL>        <eventSubURL>/DeviceProperties/Event</eventSubURL>        <SCPDURL>/xml/DeviceProperties1.xml</SCPDURL>      </service>          <service>        <serviceType>urn:schemas-upnp-org:service:SystemProperties:1</serviceType>        <serviceId>urn:upnp-org:serviceId:SystemProperties</serviceId>        <controlURL>/SystemProperties/Control</controlURL>        <eventSubURL>/SystemProperties/Event</eventSubURL>        <SCPDURL>/xml/SystemProperties1.xml</SCPDURL>      </service>          <service>        <serviceType>urn:schemas-upnp-org:service:ZoneGroupTopology:1</serviceType>        <serviceId>urn:upnp-org:serviceId:ZoneGroupTopology</serviceId>        <controlURL>/ZoneGroupTopology/Control</controlURL>        <eventSubURL>/ZoneGroupTopology/Event</eventSubURL>        <SCPDURL>/xml/ZoneGroupTopology1.xml</SCPDURL>      </service>          <service>        <serviceType>urn:schemas-upnp-org:service:GroupManagement:1</serviceType>        <serviceId>urn:upnp-org:serviceId:GroupManagement</serviceId>        <controlURL>/GroupManagement/Control</controlURL>        <eventSubURL>/GroupManagement/Event</eventSubURL>        <SCPDURL>/xml/GroupManagement1.xml</SCPDURL>      </service>      <service>        <serviceType>urn:schemas-tencent-com:service:QPlay:1</serviceType>        <serviceId>urn:tencent-com:serviceId:QPlay</serviceId>        <controlURL>/QPlay/Control</controlURL>        <eventSubURL>/QPlay/Event</eventSubURL>        <SCPDURL>/xml/QPlay1.xml</SCPDURL>      </service>    </serviceList>    <deviceList>      <device>  <deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>  <friendlyName>192.168.10.102 - Sonos CONNECT Media Server</friendlyName>  <manufacturer>Sonos, Inc.</manufacturer>  <manufacturerURL>http://www.sonos.com</manufacturerURL>  <modelNumber>ZP90</modelNumber>  <modelDescription>Sonos CONNECT Media Server</modelDescription>  <modelName>Sonos CONNECT</modelName>  <modelURL>http://www.sonos.com/products/zoneplayers/ZP90</modelURL>  <UDN>uuid:RINCON_000E58A26D0A01400_MS</UDN>  <serviceList>    <service>      <serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>      <serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId>      <controlURL>/MediaServer/ContentDirectory/Control</controlURL>      <eventSubURL>/MediaServer/ContentDirectory/Event</eventSubURL>      <SCPDURL>/xml/ContentDirectory1.xml</SCPDURL>    </service>    <service>      <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>            <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>            <controlURL>/MediaServer/ConnectionManager/Control</controlURL>            <eventSubURL>/MediaServer/ConnectionManager/Event</eventSubURL>            <SCPDURL>/xml/ConnectionManager1.xml</SCPDURL>          </service>        </serviceList>      </device>      <device>        <deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>  <friendlyName>Uteomr\xc3\xa5det - Sonos CONNECT Media Renderer</friendlyName>  <manufacturer>Sonos, Inc.</manufacturer>  <manufacturerURL>http://www.sonos.com</manufacturerURL>  <modelNumber>ZP90</modelNumber>  <modelDescription>Sonos CONNECT Media Renderer</modelDescription>  <modelName>Sonos CONNECT</modelName>  <modelURL>http://www.sonos.com/products/zoneplayers/ZP90</modelURL>        <UDN>uuid:RINCON_000E58A26D0A01400_MR</UDN>        <serviceList>          <service>            <serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>            <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>            <controlURL>/MediaRenderer/RenderingControl/Control</controlURL>            <eventSubURL>/MediaRenderer/RenderingControl/Event</eventSubURL>            <SCPDURL>/xml/RenderingControl1.xml</SCPDURL>          </service>          <service>            <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>            <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>            <controlURL>/MediaRenderer/ConnectionManager/Control</controlURL>            <eventSubURL>/MediaRenderer/ConnectionManager/Event</eventSubURL>            <SCPDURL>/xml/ConnectionManager1.xml</SCPDURL>          </service>          <service>            <serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>            <serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>            <controlURL>/MediaRenderer/AVTransport/Control</controlURL>            <eventSubURL>/MediaRenderer/AVTransport/Event</eventSubURL>            <SCPDURL>/xml/AVTransport1.xml</SCPDURL>          </service>          <service>            <serviceType>urn:schemas-sonos-com:service:Queue:1</serviceType>            <serviceId>urn:sonos-com:serviceId:Queue</serviceId>            <controlURL>/MediaRenderer/Queue/Control</controlURL>            <eventSubURL>/MediaRenderer/Queue/Event</eventSubURL>            <SCPDURL>/xml/Queue1.xml</SCPDURL>          </service>          <service>            <serviceType>urn:schemas-upnp-org:service:GroupRenderingControl:1</serviceType>            <serviceId>urn:upnp-org:serviceId:GroupRenderingControl</serviceId>            <controlURL>/MediaRenderer/GroupRenderingControl/Control</controlURL>            <eventSubURL>/MediaRenderer/GroupRenderingControl/Event</eventSubURL>            <SCPDURL>/xml/GroupRenderingControl1.xml</SCPDURL>          </service>        </serviceList>        <X_Rhapsody-Extension xmlns="http://www.real.com/rhapsody/xmlns/upnp-1-0">          <deviceID>urn:rhapsody-real-com:device-id-1-0:sonos_1:RINCON_000E58A26D0A01400</deviceID>            <deviceCapabilities>              <interactionPattern type="real-rhapsody-upnp-1-0"/>            </deviceCapabilities>        </X_Rhapsody-Extension>        <qq:X_QPlay_SoftwareCapability xmlns:qq="http://www.tencent.com">QPlay:2</qq:X_QPlay_SoftwareCapability>        <iconList>          <icon>            <mimetype>image/png</mimetype>            <width>48</width>            <height>48</height>            <depth>24</depth>            <url>/img/icon-ZP90.png</url>          </icon>        </iconList>      </device>    </deviceList>  </device></root>', 'status': 'OK', 'Transfer-Encoding': 'chunked', 'status-type': 'HTTP/1.1', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZP90)', 'Connection': 'close', 'Content-Type': 'text/xml', 'status-code': '200'}"
SONOS.RINCON_000E58A036E401400.Volume u"vol-75 Loftstue"
SONOS.RINCON_000E58A036E401400.Mute u"mute-0 Loftstue"
Main.OnInit
TellStickDuo.Bad 1etg spotter.OFF u"selflearning-dimmer:nexa.253.0"
looking for ZP that is not invisible...
Getting Favorites List from Kjokken at 192.168.10.185
Sending Browse to Kjokken
Command Variables ObjectID:FV:2
Command Variables BrowseFlag:BrowseDirectChildren
Command Variables Filter:dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI
Command Variables RequestedCount:100
Command Variables StartingIndex:0
Command Variables SortCriteria:
POST /MediaServer/ContentDirectory/Control HTTP/1.1

Accept-Encoding: gzip

CONNECTION: close

HOST: 192.168.10.185:1400

CONTENT-TYPE: text/xml; charset="utf-8"

CONTENT-LENGTH: 518

SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"



<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ObjectID>FV:2</ObjectID><BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter>dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI</Filter><RequestedCount>100</RequestedCount><StartingIndex>0</StartingIndex><SortCriteria></SortCriteria></u:Browse></s:Body></s:Envelope>




58588 Sending Browse to Kjokken
Waiting for SendGetFavPlayList response...
====== Restarting Asyncore Now =====================
58588 handle_connect
58588 handle_write
58588 handle_read
58588-Data:

HTTP/1.1 200 OK

CONTENT-TYPE: text/xml; charset="utf-8"

EXT: 

TRANSFER-ENCODING: chunked

Server: Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)

Connection: close



1000

------End Of Data------
58588 length met 1 socket closing
Kjokken GetFavPlayList Response 
1000


**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}
SONOS.ERROR u"**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}"
SendCommandWait complete - Kjokken
ERROR StartPlayList: something went wrong list index out of range
SONOS.ERROR 'ERROR StartPlayList: something went wrong list index out of range'
As you can se here, the playlist is also empty. But you can see it found my ZP-s.

Image

Image

I have not to long ago reset all my sonos players/speakers because I had a really
unstable connection on last update. This helped against the unstabillity but not on
the sonos plugin.

I also have to computers with EG, and both are acting the same way.

Re: SONOS Plugin Official (download here)

Posted: Wed Jan 13, 2016 2:41 am
by techoguy
Hi Kalinkamaen,

Thanks for the larger output. That gives me the actual packet received from your Play3 (Kjokken).
I also noticed in the beginning there appears to be another error: SONOS.ERROR u"**Response Device XML Request Error from Uteområdet (not sure if this has anything to do with it).


I'm a little confused on what's going on right now. The first error post shows this error:

ERROR StartPlayList: something went wrong local variable 'tempuuid' referenced before assignment
SONOS.ERROR "ERROR StartPlayList: something went wrong local variable 'tempuuid' referenced before assignment"

But then on the last one you sent, the plugin did not have the same error and got past the point at which the error above would show up. But then hit another error shortly after for a different reason.

Is it possible to run this a couple more times to see which error usually shows up?
the two errors are:
1) ERROR StartPlayList: something went wrong local variable 'tempuuid' referenced before assignment
2) **Response HTML Error from Kjokken syntax error: line 1, column 0 response:

I'm going to examine this a little more and see if i can see anything. I hope it's not a special character issue again.

Re: SONOS Plugin Official (download here)

Posted: Wed Jan 13, 2016 6:11 am
by techoguy
Hi Kalinkamaen,
I made a small change. Can you test it again with this version?
https://github.com/techoguy/Full-SONOS- ... _init__.py

Re: SONOS Plugin Official (download here)

Posted: Wed Jan 13, 2016 6:51 am
by kalinkamaen
This is from you update.

Attempt nr 1:

Code: Select all

---> Welcome to EventGhost <---
looking for ZP that is not invisible...
Getting Favorites List from Treningsrom at 192.168.10.114
Sending Browse to Treningsrom
Command Variables ObjectID:FV:2
Command Variables BrowseFlag:BrowseDirectChildren
Command Variables Filter:dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI
Command Variables RequestedCount:100
Command Variables StartingIndex:0
Command Variables SortCriteria:
POST /MediaServer/ContentDirectory/Control HTTP/1.1

Accept-Encoding: gzip

CONNECTION: close

HOST: 192.168.10.114:1400

CONTENT-TYPE: text/xml; charset="utf-8"

CONTENT-LENGTH: 518

SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"



<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ObjectID>FV:2</ObjectID><BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter>dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI</Filter><RequestedCount>100</RequestedCount><StartingIndex>0</StartingIndex><SortCriteria></SortCriteria></u:Browse></s:Body></s:Envelope>




60207 Sending Browse to Treningsrom
Waiting for SendGetFavPlayList response...
====== Restarting Asyncore Now =====================
60207 handle_connect
60207 handle_write
60207 handle_read
60207-Data:

HTTP/1.1 200 OK

CONTENT-TYPE: text/xml; charset="utf-8"

EXT: 

TRANSFER-ENCODING: chunked

Server: Linux UPnP/1.0 Sonos/31.3-22220 (ZP90)

Connection: close



1000

------End Of Data------
60207 length met 1 socket closing
Treningsrom GetFavPlayList Response 
1000


**Response HTML Error from Treningsrom syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZP90)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}
SONOS.ERROR u"**Response HTML Error from Treningsrom syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZP90)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}"
SendCommandWait complete - Treningsrom
Attempt nr 2:

Code: Select all

---> Welcome to EventGhost <---
looking for ZP that is not invisible...
Getting Favorites List from Kjokken at 192.168.10.185
Sending Browse to Kjokken
Command Variables ObjectID:FV:2
Command Variables BrowseFlag:BrowseDirectChildren
Command Variables Filter:dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI
Command Variables RequestedCount:100
Command Variables StartingIndex:0
Command Variables SortCriteria:
POST /MediaServer/ContentDirectory/Control HTTP/1.1

Accept-Encoding: gzip

CONNECTION: close

HOST: 192.168.10.185:1400

CONTENT-TYPE: text/xml; charset="utf-8"

CONTENT-LENGTH: 518

SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"



<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ObjectID>FV:2</ObjectID><BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter>dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI</Filter><RequestedCount>100</RequestedCount><StartingIndex>0</StartingIndex><SortCriteria></SortCriteria></u:Browse></s:Body></s:Envelope>




60235 Sending Browse to Kjokken
Waiting for SendGetFavPlayList response...
====== Restarting Asyncore Now =====================
60235 handle_connect
60235 handle_write
60235 handle_read
60235-Data:

HTTP/1.1 200 OK

CONTENT-TYPE: text/xml; charset="utf-8"

EXT: 

TRANSFER-ENCODING: chunked

Server: Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)

Connection: close



1000

------End Of Data------
60235 length met 1 socket closing
Kjokken GetFavPlayList Response 
1000


**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}
SONOS.ERROR u"**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}"
SendCommandWait complete - Kjokken
Attempt nr 3:

Code: Select all

---> Welcome to EventGhost <---
looking for ZP that is not invisible...
Getting Favorites List from Kjokken at 192.168.10.185
Sending Browse to Kjokken
Command Variables ObjectID:FV:2
Command Variables BrowseFlag:BrowseDirectChildren
Command Variables Filter:dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI
Command Variables RequestedCount:100
Command Variables StartingIndex:0
Command Variables SortCriteria:
POST /MediaServer/ContentDirectory/Control HTTP/1.1

Accept-Encoding: gzip

CONNECTION: close

HOST: 192.168.10.185:1400

CONTENT-TYPE: text/xml; charset="utf-8"

CONTENT-LENGTH: 518

SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"



<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ObjectID>FV:2</ObjectID><BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter>dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI</Filter><RequestedCount>100</RequestedCount><StartingIndex>0</StartingIndex><SortCriteria></SortCriteria></u:Browse></s:Body></s:Envelope>




60272 Sending Browse to Kjokken
Waiting for SendGetFavPlayList response...
====== Restarting Asyncore Now =====================
60272 handle_connect
60272 handle_write
60272 handle_read
60272-Data:

HTTP/1.1 200 OK

CONTENT-TYPE: text/xml; charset="utf-8"

EXT: 

TRANSFER-ENCODING: chunked

Server: Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)

Connection: close



1000

------End Of Data------
60272 length met 1 socket closing
Kjokken GetFavPlayList Response 
1000


**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}
SONOS.ERROR u"**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}"
SendCommandWait complete - Kjokken
 connected to channel: <socket._socketobject object at 0x04C2CD18>
 connected to addr: ('192.168.10.152', 43159)
--- Event Handle_Read ---
--- Event Handle_Read ---
<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"><e:property><LastChange><Event xmlns="urn:schemas-upnp-org:metadata-1-0/AVT/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/"><InstanceID val="0"><TransportState val="PLAYING"/><CurrentPlayMode val="NORMAL"/><CurrentCrossfadeMode val="0"/><NumberOfTracks val="5"/><CurrentTrack val="1"/><CurrentSection val="0"/><CurrentTrackURI val="aac://mms-live.online.no/p4_norge"/><CurrentTrackDuration val="0:00:00"/><CurrentTrackMetaData val="&lt;DIDL-Lite xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot; xmlns:r=&quot;urn:schemas-rinconnetworks-com:metadata-1-0/&quot; xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot;&gt;&lt;item id=&quot;-1&quot; parentID=&quot;-1&quot; restricted=&quot;true&quot;&gt;&lt;res protocolInfo=&quot;sonos.com-http:*:application/octet-stream:*&quot;&gt;x-sonosapi-stream:s6728?sid=254&amp;amp;flags=8224&amp;amp;sn=0&lt;/res&gt;&lt;r:streamContent&gt;&lt;/r:streamContent&gt;&lt;r:radioShowMd&gt;&lt;/r:radioShowMd&gt;&lt;upnp:albumArtURI&gt;/getaa?s=1&amp;amp;u=x-sonosapi-stream%3as6728%3fsid%3d254%26flags%3d8224%26sn%3d0&lt;/upnp:albumArtURI&gt;&lt;dc:title&gt;x-sonosapi-stream:s6728?sid=254&amp;amp;flags=8224&amp;amp;sn=0&lt;/dc:title&gt;&lt;upnp:class&gt;object.item&lt;/upnp:class&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;"/><r:NextTrackURI val=""/><r:NextTrackMetaData val=""/><r:EnqueuedTransportURI val="x-sonosapi-stream:s6728?sid=254&amp;flags=8224&amp;sn=0"/><r:EnqueuedTransportURIMetaData val="&lt;DIDL-Lite xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot; xmlns:r=&quot;urn:schemas-rinconnetworks-com:metadata-1-0/&quot; xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot;&gt;&lt;item id=&quot;-1&quot; parentID=&quot;-1&quot; restricted=&quot;true&quot;&gt;&lt;dc:title&gt;P4 Radio Norge&lt;/dc:title&gt;&lt;upnp:class&gt;object.item.audioItem.audioBroadcast&lt;/upnp:class&gt;&lt;desc id=&quot;cdudn&quot; nameSpace=&quot;urn:schemas-rinconnetworks-com:metadata-1-0/&quot;&gt;SA_RINCON65031_&lt;/desc&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;"/></InstanceID></Event></LastChange></e:property></e:propertyset>
--- EVENT Received --- AVTransport from Bad
<?xml version="1.0" ?><Event xmlns="urn:schemas-upnp-org:metadata-1-0/AVT/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/"><InstanceID val="0"><TransportState val="PLAYING"/><CurrentPlayMode val="NORMAL"/><CurrentCrossfadeMode val="0"/><NumberOfTracks val="5"/><CurrentTrack val="1"/><CurrentSection val="0"/><CurrentTrackURI val="aac://mms-live.online.no/p4_norge"/><CurrentTrackDuration val="0:00:00"/><CurrentTrackMetaData val="<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="-1" parentID="-1" restricted="true"><res protocolInfo="sonos.com-http:*:application/octet-stream:*">x-sonosapi-stream:s6728?sid=254&amp;flags=8224&amp;sn=0</res><r:streamContent></r:streamContent><r:radioShowMd></r:radioShowMd><upnp:albumArtURI>/getaa?s=1&amp;u=x-sonosapi-stream%3as6728%3fsid%3d254%26flags%3d8224%26sn%3d0</upnp:albumArtURI><dc:title>x-sonosapi-stream:s6728?sid=254&amp;flags=8224&amp;sn=0</dc:title><upnp:class>object.item</upnp:class></item></DIDL-Lite>"/><r:NextTrackURI val=""/><r:NextTrackMetaData val=""/><r:EnqueuedTransportURI val="x-sonosapi-stream:s6728?sid=254&flags=8224&sn=0"/><r:EnqueuedTransportURIMetaData val="<DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="-1" parentID="-1" restricted="true"><dc:title>P4 Radio Norge</dc:title><upnp:class>object.item.audioItem.audioBroadcast</upnp:class><desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON65031_</desc></item></DIDL-Lite>"/></InstanceID></Event>
Bad Received ZP Transport State: PLAYING
Kjokken Pre Transport State: Playing
Kjokken Transport State: Playing
Bad Pre Transport State: Playing
Bad Transport State: Playing
Stue Pre Transport State: Playing
Stue Transport State: Playing
Bad currentPlayMode: NORMAL
failed list index out of range
Track: x-sonosapi-stream:s6728?sid=254&flags=8224&sn=0

Re: SONOS Plugin Official (download here)

Posted: Wed Jan 13, 2016 6:55 am
by kalinkamaen
Attempt nr 4:

Code: Select all

---> Welcome to EventGhost <---
looking for ZP that is not invisible...
Getting Favorites List from Kjokken at 192.168.10.185
Sending Browse to Kjokken
Command Variables ObjectID:FV:2
Command Variables BrowseFlag:BrowseDirectChildren
Command Variables Filter:dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI
Command Variables RequestedCount:100
Command Variables StartingIndex:0
Command Variables SortCriteria:
POST /MediaServer/ContentDirectory/Control HTTP/1.1

Accept-Encoding: gzip

CONNECTION: close

HOST: 192.168.10.185:1400

CONTENT-TYPE: text/xml; charset="utf-8"

CONTENT-LENGTH: 518

SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"



<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ObjectID>FV:2</ObjectID><BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter>dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI</Filter><RequestedCount>100</RequestedCount><StartingIndex>0</StartingIndex><SortCriteria></SortCriteria></u:Browse></s:Body></s:Envelope>




60319 Sending Browse to Kjokken
Waiting for SendGetFavPlayList response...
====== Restarting Asyncore Now =====================
60319 handle_connect
60319 handle_write
60319 handle_read
60319-Data:

HTTP/1.1 200 OK

CONTENT-TYPE: text/xml; charset="utf-8"

EXT: 

TRANSFER-ENCODING: chunked

Server: Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)

Connection: close



1000

------End Of Data------
60319 length met 1 socket closing
Kjokken GetFavPlayList Response 
1000


**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}
SONOS.ERROR u"**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}"
SendCommandWait complete - Kjokken
Attempt nr5:

Code: Select all

---> Welcome to EventGhost <---
looking for ZP that is not invisible...
Getting Favorites List from Kjokken at 192.168.10.185
Sending Browse to Kjokken
Command Variables ObjectID:FV:2
Command Variables BrowseFlag:BrowseDirectChildren
Command Variables Filter:dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI
Command Variables RequestedCount:100
Command Variables StartingIndex:0
Command Variables SortCriteria:
POST /MediaServer/ContentDirectory/Control HTTP/1.1

Accept-Encoding: gzip

CONNECTION: close

HOST: 192.168.10.185:1400

CONTENT-TYPE: text/xml; charset="utf-8"

CONTENT-LENGTH: 518

SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"



<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ObjectID>FV:2</ObjectID><BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter>dc:title,res,dc:creator,upnp:artist,upnp:album,upnp:albumArtURI</Filter><RequestedCount>100</RequestedCount><StartingIndex>0</StartingIndex><SortCriteria></SortCriteria></u:Browse></s:Body></s:Envelope>




60355 Sending Browse to Kjokken
Waiting for SendGetFavPlayList response...
====== Restarting Asyncore Now =====================
60355 handle_connect
60355 handle_write
60355 handle_read
60355-Data:

HTTP/1.1 200 OK

CONTENT-TYPE: text/xml; charset="utf-8"

EXT: 

TRANSFER-ENCODING: chunked

Server: Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)

Connection: close



1000

------End Of Data------
60355 length met 1 socket closing
Kjokken GetFavPlayList Response 
1000


**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}
SONOS.ERROR u"**Response HTML Error from Kjokken syntax error: line 1, column 0 response:
{'body': '1000\r\n', 'status': 'OK', 'TRANSFER-ENCODING': 'chunked', 'status-type': 'HTTP/1.1', 'Connection': 'close', 'Server': 'Linux UPnP/1.0 Sonos/31.3-22220 (ZPS3)', 'EXT': '', 'CONTENT-TYPE': 'text/xml; charset="utf-8"', 'status-code': '200'}"
SendCommandWait complete - Kjokken

Re: SONOS Plugin Official (download here)

Posted: Thu Jan 14, 2016 5:45 am
by techoguy
Hi Kalinkamaen,

Thanks for all the output. What's happening is that for the Favorite lists, SONOS actually sends "chunked" packets and I have to put them together to make one stream of data (because i'm handling my own HTTP packets and headers). For some reason yours is receiving the first packet and then closing down the connection. Your header received is exactly like mine yet mine is working as expected and yours is not. So I need to figure out what the differences are to fix the problem. I might have to just create some more changes and have you try them.

off hand, can you tell me how many "favorite playlists" you have in your list?

Re: SONOS Plugin Official (download here)

Posted: Thu Jan 14, 2016 8:59 am
by kalinkamaen
Hello Techoguy.

Here is my favourite list. I only have 4 now. This was only for testing, and when I get it working
again, there will be more!!

Image

Re: SONOS Plugin Official (download here)

Posted: Fri Jan 15, 2016 2:58 pm
by PaulBeauvais
I am having the same issues. If there is anything I can do to help track down the problems let me know.

Re: SONOS Plugin Official (download here)

Posted: Wed Jan 27, 2016 8:14 pm
by coricidin
Is there a way to get currently playing track/artist information? Or better yet fire an eventghost event containing that info every time the currently playing track changes?