Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
SONOS Plugin
-
kalinkamaen
- Experienced User
- Posts: 138
- Joined: Wed Dec 26, 2012 9:23 am
Re: SONOS Plugin
Here is the text fil.
But changing one of the player name from kj├©kken to kjokken helped.
SONOS Plugin SHUTTING DOWN...
SONOS Event Server has been Shut down, the end.
SONOS plugin starting...
192.168.1.51
Searching for SONOS ZonePlayers on network...
63288 handle_connect
63288 handle_write
writable
63288 handle_read
63288-Data:
HTTP/1.1 200 OK
Server: Linux UPnP/1.0 Sonos/24.0-71060 (ZPS3)
Connection: close
------
63288 Unsubscribed response 192.168.1.55 - ZoneGroupTopology
handle_error : 192.168.1.55:1400
EXCEPTION AT LINE: 76 = 'uuid:RINCON_000E587AC33401400_sub0000011783'
Exception in thread AsyncoreThread:
Traceback (most recent call last):
File "threading.pyc", line 532, in __bootstrap_inner
File "threading.pyc", line 484, in run
File "asyncore.pyc", line 202, in loop
File "asyncore.pyc", line 143, in poll
File "asyncore.pyc", line 80, in read
File "asyncore.pyc", line 76, in read
File "asyncore.pyc", line 416, in handle_read_event
File "C:\Program Files (x86)\EventGhost\plugins\EG_Sonos\__init__.py", line 194, in handle_read
self.callback(self.response)
File "C:\Program Files (x86)\EventGhost\plugins\EG_Sonos\__init__.py", line 304, in UnsubResponse
del globalServiceList[self.SID]
KeyError: 'uuid:RINCON_000E587AC33401400_sub0000011783'
New ZonePlayer Added: RINCON_000E58A036E401400 : 192.168.1.40
New ZonePlayer Added: RINCON_000E587AC37801400 : 192.168.1.59
New ZonePlayer Added: RINCON_000E587AC33401400 : 192.168.1.55
New ZonePlayer Added: RINCON_000E58A0BFBA01400 : 192.168.1.38
New ZonePlayer Added: RINCON_000E58FE544C01400 : 192.168.1.46
New ZonePlayer Added: RINCON_000E584B11EC01400 : 192.168.1.47
New ZonePlayer Added: RINCON_000E58A26D0A01400 : 192.168.1.44
MSEARCH socket closed
SONOS Event Server listening on port 63297
63298 sending subscribe request: 192.168.1.55 - ZoneGroupTopology
SONOS.NewZonePlayerAdded '192.168.1.40-RINCON_000E58A036E401400'
SONOS.NewZonePlayerAdded '192.168.1.59-RINCON_000E587AC37801400'
SONOS.NewZonePlayerAdded '192.168.1.55-RINCON_000E587AC33401400'
SONOS.NewZonePlayerAdded '192.168.1.38-RINCON_000E58A0BFBA01400'
SONOS.NewZonePlayerAdded '192.168.1.46-RINCON_000E58FE544C01400'
SONOS.NewZonePlayerAdded '192.168.1.47-RINCON_000E584B11EC01400'
SONOS.NewZonePlayerAdded '192.168.1.44-RINCON_000E58A26D0A01400'
But changing one of the player name from kj├©kken to kjokken helped.
SONOS Plugin SHUTTING DOWN...
SONOS Event Server has been Shut down, the end.
SONOS plugin starting...
192.168.1.51
Searching for SONOS ZonePlayers on network...
63288 handle_connect
63288 handle_write
writable
63288 handle_read
63288-Data:
HTTP/1.1 200 OK
Server: Linux UPnP/1.0 Sonos/24.0-71060 (ZPS3)
Connection: close
------
63288 Unsubscribed response 192.168.1.55 - ZoneGroupTopology
handle_error : 192.168.1.55:1400
EXCEPTION AT LINE: 76 = 'uuid:RINCON_000E587AC33401400_sub0000011783'
Exception in thread AsyncoreThread:
Traceback (most recent call last):
File "threading.pyc", line 532, in __bootstrap_inner
File "threading.pyc", line 484, in run
File "asyncore.pyc", line 202, in loop
File "asyncore.pyc", line 143, in poll
File "asyncore.pyc", line 80, in read
File "asyncore.pyc", line 76, in read
File "asyncore.pyc", line 416, in handle_read_event
File "C:\Program Files (x86)\EventGhost\plugins\EG_Sonos\__init__.py", line 194, in handle_read
self.callback(self.response)
File "C:\Program Files (x86)\EventGhost\plugins\EG_Sonos\__init__.py", line 304, in UnsubResponse
del globalServiceList[self.SID]
KeyError: 'uuid:RINCON_000E587AC33401400_sub0000011783'
New ZonePlayer Added: RINCON_000E58A036E401400 : 192.168.1.40
New ZonePlayer Added: RINCON_000E587AC37801400 : 192.168.1.59
New ZonePlayer Added: RINCON_000E587AC33401400 : 192.168.1.55
New ZonePlayer Added: RINCON_000E58A0BFBA01400 : 192.168.1.38
New ZonePlayer Added: RINCON_000E58FE544C01400 : 192.168.1.46
New ZonePlayer Added: RINCON_000E584B11EC01400 : 192.168.1.47
New ZonePlayer Added: RINCON_000E58A26D0A01400 : 192.168.1.44
MSEARCH socket closed
SONOS Event Server listening on port 63297
63298 sending subscribe request: 192.168.1.55 - ZoneGroupTopology
SONOS.NewZonePlayerAdded '192.168.1.40-RINCON_000E58A036E401400'
SONOS.NewZonePlayerAdded '192.168.1.59-RINCON_000E587AC37801400'
SONOS.NewZonePlayerAdded '192.168.1.55-RINCON_000E587AC33401400'
SONOS.NewZonePlayerAdded '192.168.1.38-RINCON_000E58A0BFBA01400'
SONOS.NewZonePlayerAdded '192.168.1.46-RINCON_000E58FE544C01400'
SONOS.NewZonePlayerAdded '192.168.1.47-RINCON_000E584B11EC01400'
SONOS.NewZonePlayerAdded '192.168.1.44-RINCON_000E58A26D0A01400'
Re: SONOS Plugin
Hi kalinkamaen,
The errors seen in the beginning are from stopping and starting the plugin too close together. I'm not closing every callback successfully yet. If possible it's best to completely restart EG. If you want to change the debug, it's best to deactivate the plugin first (with the x) then open the config window, and after pressing okay then reactivate the plugin. NOTE that when you open the plugin configure window and press "OK" or "APPLY" it stops the plugin and restarts it back to back.
if you see AsyncoreThread exception error, you usually have to restart EG to get it up and running again. It's controlled by EG not my plugin. But you shouldn't see this error when EG starts up or when restarting the plugin with at least 10 seconds between stoping and starting the plugin.
The errors seen in the beginning are from stopping and starting the plugin too close together. I'm not closing every callback successfully yet. If possible it's best to completely restart EG. If you want to change the debug, it's best to deactivate the plugin first (with the x) then open the config window, and after pressing okay then reactivate the plugin. NOTE that when you open the plugin configure window and press "OK" or "APPLY" it stops the plugin and restarts it back to back.
if you see AsyncoreThread exception error, you usually have to restart EG to get it up and running again. It's controlled by EG not my plugin. But you shouldn't see this error when EG starts up or when restarting the plugin with at least 10 seconds between stoping and starting the plugin.
The Latest SONOS Plugin:
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!
-
kalinkamaen
- Experienced User
- Posts: 138
- Joined: Wed Dec 26, 2012 9:23 am
Re: SONOS Plugin
Oki thanks for your help.
It is working for me now. It was because I used this letter "├ÿ" in p+layer name.
It is working for me now. It was because I used this letter "├ÿ" in p+layer name.
Re: SONOS Plugin
Hi jonasbegood,
check this plugin out:
http://eventghost.org/forum/viewtopic.p ... 2cb6e60cd3
this could make for all kinds of notification triggers as well.
check this plugin out:
http://eventghost.org/forum/viewtopic.p ... 2cb6e60cd3
this could make for all kinds of notification triggers as well.
The Latest SONOS Plugin:
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!
-
kalinkamaen
- Experienced User
- Posts: 138
- Joined: Wed Dec 26, 2012 9:23 am
Re: SONOS Plugin
I am trying to send mute to all my devices. But I am getting errors:

TCP.OutgoingCall ['80.232.85.154', u'+4748175893']
Sonos: MuteOn: RINCON_000E587AC37801400
Sonos: MuteOn: RINCON_000E587AC37801400
Sending SetMute to Bad
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.59:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
60811 Sending SetMute to Badwritable
Sonos: MuteOn: RINCON_000E587AC33401400
Sending SetMute to Kjokken
60811 handle_connect
60811 handle_write
writable
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.55:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
60812 Sending SetMute to Kjokken
Sonos: MuteOn: RINCON_000E58FE544C01400
Sending SetMute to Treningsrom
writable
writable
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
60812 handle_connect
HOST: 192.168.1.46:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
60812 handle_write
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
writable
writable
60813 Sending SetMute to Treningsrom
Sonos: MuteOn: RINCON_000E58A0BFBA01400
Sending SetMute to Garasje
Exception in thread AsyncoreThread:
Traceback (most recent call last):
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.38:1400
CONTENT-TYPE: text/xml; charset="utf-8"
File "threading.pyc", line 532, in __bootstrap_inner
CONTENT-LENGTH: 352
File "threading.pyc", line 484, in run
File "asyncore.pyc", line 202, in loop
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
File "asyncore.pyc", line 132, in poll
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
error: (10038, 'An operation was attempted on something that is not a socket')
60814 Sending SetMute to Garasje
Sonos: MuteOn: RINCON_000E58A036E401400
Sending SetMute to Stue
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.40:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
60815 Sending SetMute to Stue
Sonos: MuteOn: RINCON_000E58A26D0A01400
Sending SetMute to Uteplass
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.44:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
60816 Sending SetMute to Uteplass

TCP.OutgoingCall ['80.232.85.154', u'+4748175893']
Sonos: MuteOn: RINCON_000E587AC37801400
Sonos: MuteOn: RINCON_000E587AC37801400
Sending SetMute to Bad
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.59:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
60811 Sending SetMute to Badwritable
Sonos: MuteOn: RINCON_000E587AC33401400
Sending SetMute to Kjokken
60811 handle_connect
60811 handle_write
writable
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.55:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
60812 Sending SetMute to Kjokken
Sonos: MuteOn: RINCON_000E58FE544C01400
Sending SetMute to Treningsrom
writable
writable
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
60812 handle_connect
HOST: 192.168.1.46:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
60812 handle_write
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
writable
writable
60813 Sending SetMute to Treningsrom
Sonos: MuteOn: RINCON_000E58A0BFBA01400
Sending SetMute to Garasje
Exception in thread AsyncoreThread:
Traceback (most recent call last):
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.38:1400
CONTENT-TYPE: text/xml; charset="utf-8"
File "threading.pyc", line 532, in __bootstrap_inner
CONTENT-LENGTH: 352
File "threading.pyc", line 484, in run
File "asyncore.pyc", line 202, in loop
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
File "asyncore.pyc", line 132, in poll
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
error: (10038, 'An operation was attempted on something that is not a socket')
60814 Sending SetMute to Garasje
Sonos: MuteOn: RINCON_000E58A036E401400
Sending SetMute to Stue
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.40:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
60815 Sending SetMute to Stue
Sonos: MuteOn: RINCON_000E58A26D0A01400
Sending SetMute to Uteplass
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.44:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelop ... <u:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
60816 Sending SetMute to Uteplass
Re: SONOS Plugin
Kalinkamaen's error is from sending all the commands back to back in EG. Until I determine exactly what is going on and create a fix, it is best to add delays between commands.
Kalinkamaen was able to fix the issue by using a 0.6 second delay.
Hopefully this will also be fixed in the upcoming release.
Thanks Kalinkamaen for the error and output.
Kalinkamaen was able to fix the issue by using a 0.6 second delay.
Hopefully this will also be fixed in the upcoming release.
Thanks Kalinkamaen for the error and output.
The Latest SONOS Plugin:
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!
-
jonasbegood
- Posts: 8
- Joined: Sat Feb 22, 2014 10:32 pm
Re: SONOS Plugin
Hi! Sorry for the late response. First off, the debugging.
Scenario: TV is on with Playbar output TV sound. I start Eventghost and try add a new action for muting a ZP. This is what I get:
I'll then reload the Evenghost tree. No change in and same error messages.
I then exit Eventghost completely. The music is still playing in the Playbar. I open Eventghost and try to add a action, everythings is working properly. I turn off the TV and start it again to force audio input from TV. The Playbar starts to output the TVs audio and the music stops.
I add a new action. I can now choose a ZP from the dropdown. I tried with ZP connected to TV and this is the result:
But the action is not accepted by the ZP (it does not mute).
Hope this helps, love your plugin
Scenario: TV is on with Playbar output TV sound. I start Eventghost and try add a new action for muting a ZP. This is what I get:
Code: Select all
Autostart
Plugin: Ping
Ping is started with parameter: =32
Plugin: Switch King
Starting Switchking V0.1.0
Starting Switchking event listener
Plugin: Sonos
SONOS plugin starting...
192.168.1.2
Searching for SONOS ZonePlayers on network...
New ZonePlayer Added: RINCON_000E587744A201400 : 192.168.1.94
New ZonePlayer Added: RINCON_000E5877442601400 : 192.168.1.223
New ZonePlayer Added: RINCON_000E5884AAE801400 : 192.168.1.187
New ZonePlayer Added: RINCON_000E58B1728701400 : 192.168.1.161
New ZonePlayer Added: RINCON_000E5899182A01400 : 192.168.1.118
New ZonePlayer Added: RINCON_000E5884F96A01400 : 192.168.1.9
New ZonePlayer Added: RINCON_000E58E9F27E01400 : 192.168.1.209
MSEARCH socket closed
SONOS Event Server listening on port 53045
53046 sending subscribe request: 192.168.1.187 - ZoneGroupTopology
Plugin: Scheduler
Plugin started
Scheduler: "jonas-morgen"
Scheduler: "rebecca-morgen"
Scheduler: "Reset"
Scheduler: "ResetTV"
Ping: Add Host: 192.168.1.211
Ping Plugin : Adding host 192.168.1.211 to the list of managed hosts.
Ping Plugin : Thread 192.168.1.211 is starting !
Ping: Add Host: 192.168.1.210
Ping Plugin : Adding host 192.168.1.210 to the list of managed hosts.
Ping Plugin : Thread 192.168.1.210 is starting !
SONOS.NewZonePlayerAdded '192.168.1.94-RINCON_000E587744A201400'
SONOS.NewZonePlayerAdded '192.168.1.223-RINCON_000E5877442601400'
SONOS.NewZonePlayerAdded '192.168.1.187-RINCON_000E5884AAE801400'
SONOS.NewZonePlayerAdded '192.168.1.161-RINCON_000E58B1728701400'
SONOS.NewZonePlayerAdded '192.168.1.118-RINCON_000E5899182A01400'
SONOS.NewZonePlayerAdded '192.168.1.9-RINCON_000E5884F96A01400'
SONOS.NewZonePlayerAdded '192.168.1.209-RINCON_000E58E9F27E01400'
Switchking.Kommodelys,.gang.OFF '0%'
Main.OnInit
Ping.jonas.is.away
Ping.rebs.is.away
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
When I try to choose a ZP the dropdownlist is empty. I go in to the Sonos app on my phone and change the output to Spotify, but still no dropdown and this messages shows:
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.I'll then reload the Evenghost tree. No change in and same error messages.
I then exit Eventghost completely. The music is still playing in the Playbar. I open Eventghost and try to add a action, everythings is working properly. I turn off the TV and start it again to force audio input from TV. The Playbar starts to output the TVs audio and the music stops.
I add a new action. I can now choose a ZP from the dropdown. I tried with ZP connected to TV and this is the result:
Code: Select all
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Sonos: MuteOn: RINCON_000E58B1728701400
Sending SetMute to Stue
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.161:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?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:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
55648 Sending SetMute to StueHope this helps, love your plugin
-
jonasbegood
- Posts: 8
- Joined: Sat Feb 22, 2014 10:32 pm
Re: SONOS Plugin
I try to mute another ZP playing music, and it is working:
I then again try to send mute to the ZP playing TV, it then work:
I unmute Stue:
Code: Select all
--- EVENT Received --- AVTransport from Soverom
<?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="SHUFFLE_NOREPEAT"/><CurrentCrossfadeMode val="0"/><NumberOfTracks val="19"/><CurrentTrack val="4"/><CurrentSection val="0"/><CurrentTrackURI val="x-sonos-spotify:spotify%3atrack%3a6xcpkEEppRQOqmo5MWflyF?sid=9&flags=32"/><CurrentTrackDuration val="0:07:47"/><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-spotify:*:audio/x-spotify:*" duration="0:07:47">x-sonos-spotify:spotify%3atrack%3a6xcpkEEppRQOqmo5MWflyF?sid=9&flags=32</res><r:streamContent></r:streamContent><r:radioShowMd></r:radioShowMd><upnp:albumArtURI>/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a6xcpkEEppRQOqmo5MWflyF%3fsid%3d9%26flags%3d32</upnp:albumArtURI><dc:title>The Unforgiven III</dc:title><upnp:class>object.item.audioItem.musicTrack</upnp:class><dc:creator>Metallica</dc:creator><upnp:album>Death Magnetic</upnp:album></item></DIDL-Lite>"/><r:NextTrackURI val="x-sonos-spotify:spotify%3atrack%3a0qBvoubmrmKDsknLBbOtUg?sid=9&flags=32"/><r:NextTrackMetaData 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-spotify:*:audio/x-spotify:*" duration="0:06:06">x-sonos-spotify:spotify%3atrack%3a0qBvoubmrmKDsknLBbOtUg?sid=9&flags=32</res><upnp:albumArtURI>/getaa?s=1&u=x-sonos-spotify%3aspotify%253atrack%253a0qBvoubmrmKDsknLBbOtUg%3fsid%3d9%26flags%3d32</upnp:albumArtURI><dc:title>Turn The Page</dc:title><upnp:class>object.item.audioItem.musicTrack</upnp:class><dc:creator>Metallica</dc:creator><upnp:album>Garage, Inc.</upnp:album></item></DIDL-Lite>"/><r:EnqueuedTransportURI val="x-rincon-cpcontainer:10060a6cspotify%3auser%3ajebfx%3aplaylist%3a2e4RDGLKwmG6tPqZSXvEbk"/><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="10060a6cspotify%3auser%3ajebfx%3aplaylist%3a2e4RDGLKwmG6tPqZSXvEbk" parentID="100a0664playlists" restricted="true"><dc:title>Concert</dc:title><upnp:class>object.container.playlistContainer</upnp:class><desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/">SA_RINCON2311_jebfx</desc></item></DIDL-Lite>"/></InstanceID></Event>
Soverom Transport State: PLAYING
XML error: ZonePlayer instance has no attribute 'invisible'Code: Select all
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Sonos: MuteOn: RINCON_000E58B1728701400
Sending SetMute to Stue
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.161:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?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:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>1</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
writable
60699 Sending SetMute to Stue
60699 handle_connect
60699 handle_write
writable
60699 handle_read
60699-Data:
HTTP/1.1 200 OK
CONTENT-LENGTH: 251
CONTENT-TYPE: text/xml; charset="utf-8"
EXT:
Server: Linux UPnP/1.0 Sonos/24.0-71060 (ZPS9)
Connection: close
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"></u:SetMuteResponse></s:Body></s:Envelope>
------
Stue Standard Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"></u:SetMuteResponse></s:Body></s:Envelope>Code: Select all
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Plugin has not received Group Topology info yet.
Sonos: MuteOff: RINCON_000E58B1728701400
Sending SetMute to Stue
POST /MediaRenderer/RenderingControl/Control HTTP/1.1
Accept-Encoding: gzip
CONNECTION: close
HOST: 192.168.1.161:1400
CONTENT-TYPE: text/xml; charset="utf-8"
CONTENT-LENGTH: 352
SOAPACTION: "urn:schemas-upnp-org:service:RenderingControl:1#SetMute"
<?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:SetMute xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"><InstanceID>0</InstanceID><DesiredMute>0</DesiredMute><Channel>Master</Channel></u:SetMute></s:Body></s:Envelope>
61622 Sending SetMute to Stue
writable
61622 handle_connect
61622 handle_write
writable
61622 handle_read
61622-Data:
HTTP/1.1 200 OK
CONTENT-LENGTH: 251
CONTENT-TYPE: text/xml; charset="utf-8"
EXT:
Server: Linux UPnP/1.0 Sonos/24.0-71060 (ZPS9)
Connection: close
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"></u:SetMuteResponse></s:Body></s:Envelope>
------
Stue Standard Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:SetMuteResponse xmlns:u="urn:schemas-upnp-org:service:RenderingControl:1"></u:SetMuteResponse></s:Body></s:Envelope>-
kalinkamaen
- Experienced User
- Posts: 138
- Joined: Wed Dec 26, 2012 9:23 am
Re: SONOS Plugin
Someone have had issue with, adding playlist and it locks eventghost?. And need to restart program?
Regards Kali
Regards Kali
Re: SONOS Plugin
3/21/2014
Latest version has been moved to a new topic:
http://eventghost.org/forum/viewtopic.p ... 05f#p30309
Hey everyone,
below is the latest revision to the SONOS plugin.
Actions:
Play, Pause, Stop, Next, Previous, Relative Volume, Set Volume, Mute On, Mute Off, Play Mode, Start Favorite Playlist/Station
New Actions:
MuteAllOn
MuteAllOff
SetCrossfade
SetSleepTimer
PlayTrackURI
PlayLineIn
UnGroup
***Notifications***
NotificationStart
NotificationLineIn
NotificationTrackURI (local track or located on the web)
NotificationGoogleTTS (note: google restricts this to a max of 100 characters)
NotificationWeather (BETA at the moment, uses googleTTS)
NotificationRestore
Events Supported:
New Zone Player added to network (generic for all ZP, payload carries ZP information)
Zone Player removed from network.
Zone Player Playing
Zone Player Stopped/Paused
(new) event for volume adjustments (could be used to control max volume of a zone)
Note: i'm currently receiving MetaData information for all currently playing music but I am not doing anything with it other than storing it in the plugin.
Weather information when running the NotificationWeather action
Fixed issues:
1) proper play/stop state when un-grouping and grouping ZPs is now fixed
2) StartPlayList configuration window should no longer lock up or freeze eventghost.
3) ZP names can now have special characters
4) when sending many commands, the plugin will wait to for the previous command to complete before sending the next one.
Known issues:
1) If you only have 1 zone player, the plugin might not automatically update the IP address if it changes or if you add another zone
2) occasionally you might receive an error from the asyncore.py file. Currently the reason for this is unknown. If this happens, EG needs to be restarted. Currently this has not happened on my own PC in the latest revision but I have also not done anything to fix this specific problem, so if anyone sees this let me know. (update 3/17/2014) this has been fixed and the next release will have the solution.
3) the weather notification is beta and still under development. This action will be updated.
added 3/17/2014
4) If you have a playbar and have any other ZP grouped as a surround speaker or subwoofer, the grouptopology is handled incorrectly which causes errors with other actions like startplaylist.This will be fixed in the next release.
How to use notifications:
Refer to image below to see how notification actions need to be configured. 1) All notifications should start with NotificationStart
this notification allows you to select which ZPs the notification goes to, set the volume, and decide if you want to over ride the current mute state of the ZP. This action also stores the current ZP music state.
2) Send the actual notification using one of the notification actions (GoogleTTS, LineIn, TrackURI, or Weather)
if using LineIn, then you'll need another action after this one to play the notification through the selected ZP's Line In (in most cases this could be your PC connected to Line-In and you use the Speech plugin to have the PC handle TTS)
3) All notification should end with NotificationRestore
here music is restored to the state before the notifications were started. This is also where you place the delay in which the plugin will wait to restore the music. The delay is based on the time it takes to play your notification.
General Overview on how the notifications work:
Notification will be sent only to the ZPs that are selected unless a selected ZP is part of a group, then the whole group will receive the notification regardless if the other ZPs in the group are selected or not.
Also, the current group topology will not be affected. This also means that if multiple Zps are playing the notification and the ZPs are not grouped, they will not be synced, but in testing this doesn't seem to be a problem.
The restore action has a time you enter to delay the ZPs to restore to the previous state. To get this time you'll have to play your notification and see how long it takes and then set the restore time. Note that Google TTS can take time to buffer in the SONOS players at times so the length of time needed might not be consistent. As of right now there is no way to know when the TTS stream is finished playing.
NOTE: The NotificationWeather Action is still under development to make it easier and fully adjustable to use. Currently it will allow you to set your location, grab the current weather and uses GoogleTTS to announce the current weather conditions over SONOS (currently only English is supported). The plan is to allow you to decide what you want said like the forecast or current conditions. Also, you'll be able to decide if you want to use GoogleTTS or the Speech Plugin to announce the weather.
NOTE: that I have tested all notifications but have not extensively tested them in all scenarios so please be aware that there could be issues.
Please let me know what you guys think and of course let me know if you find any issues.
Hopefully I can get the weather action tested and fully implemented soon.
I will also be starting a new thread soon so these updates will always be at the top of the thread. I'll provide a link when the happens.
3/21/2014
Latest version has been moved to a new topic:
http://eventghost.org/forum/viewtopic.p ... 05f#p30309
Latest version has been moved to a new topic:
http://eventghost.org/forum/viewtopic.p ... 05f#p30309
Hey everyone,
below is the latest revision to the SONOS plugin.
Actions:
Play, Pause, Stop, Next, Previous, Relative Volume, Set Volume, Mute On, Mute Off, Play Mode, Start Favorite Playlist/Station
New Actions:
MuteAllOn
MuteAllOff
SetCrossfade
SetSleepTimer
PlayTrackURI
PlayLineIn
UnGroup
***Notifications***
NotificationStart
NotificationLineIn
NotificationTrackURI (local track or located on the web)
NotificationGoogleTTS (note: google restricts this to a max of 100 characters)
NotificationWeather (BETA at the moment, uses googleTTS)
NotificationRestore
Events Supported:
New Zone Player added to network (generic for all ZP, payload carries ZP information)
Zone Player removed from network.
Zone Player Playing
Zone Player Stopped/Paused
(new) event for volume adjustments (could be used to control max volume of a zone)
Note: i'm currently receiving MetaData information for all currently playing music but I am not doing anything with it other than storing it in the plugin.
Weather information when running the NotificationWeather action
Fixed issues:
1) proper play/stop state when un-grouping and grouping ZPs is now fixed
2) StartPlayList configuration window should no longer lock up or freeze eventghost.
3) ZP names can now have special characters
4) when sending many commands, the plugin will wait to for the previous command to complete before sending the next one.
Known issues:
1) If you only have 1 zone player, the plugin might not automatically update the IP address if it changes or if you add another zone
2) occasionally you might receive an error from the asyncore.py file. Currently the reason for this is unknown. If this happens, EG needs to be restarted. Currently this has not happened on my own PC in the latest revision but I have also not done anything to fix this specific problem, so if anyone sees this let me know. (update 3/17/2014) this has been fixed and the next release will have the solution.
3) the weather notification is beta and still under development. This action will be updated.
added 3/17/2014
4) If you have a playbar and have any other ZP grouped as a surround speaker or subwoofer, the grouptopology is handled incorrectly which causes errors with other actions like startplaylist.This will be fixed in the next release.
How to use notifications:
Refer to image below to see how notification actions need to be configured. 1) All notifications should start with NotificationStart
this notification allows you to select which ZPs the notification goes to, set the volume, and decide if you want to over ride the current mute state of the ZP. This action also stores the current ZP music state.
2) Send the actual notification using one of the notification actions (GoogleTTS, LineIn, TrackURI, or Weather)
if using LineIn, then you'll need another action after this one to play the notification through the selected ZP's Line In (in most cases this could be your PC connected to Line-In and you use the Speech plugin to have the PC handle TTS)
3) All notification should end with NotificationRestore
here music is restored to the state before the notifications were started. This is also where you place the delay in which the plugin will wait to restore the music. The delay is based on the time it takes to play your notification.
General Overview on how the notifications work:
Notification will be sent only to the ZPs that are selected unless a selected ZP is part of a group, then the whole group will receive the notification regardless if the other ZPs in the group are selected or not.
Also, the current group topology will not be affected. This also means that if multiple Zps are playing the notification and the ZPs are not grouped, they will not be synced, but in testing this doesn't seem to be a problem.
The restore action has a time you enter to delay the ZPs to restore to the previous state. To get this time you'll have to play your notification and see how long it takes and then set the restore time. Note that Google TTS can take time to buffer in the SONOS players at times so the length of time needed might not be consistent. As of right now there is no way to know when the TTS stream is finished playing.
NOTE: The NotificationWeather Action is still under development to make it easier and fully adjustable to use. Currently it will allow you to set your location, grab the current weather and uses GoogleTTS to announce the current weather conditions over SONOS (currently only English is supported). The plan is to allow you to decide what you want said like the forecast or current conditions. Also, you'll be able to decide if you want to use GoogleTTS or the Speech Plugin to announce the weather.
NOTE: that I have tested all notifications but have not extensively tested them in all scenarios so please be aware that there could be issues.
Please let me know what you guys think and of course let me know if you find any issues.
Hopefully I can get the weather action tested and fully implemented soon.
I will also be starting a new thread soon so these updates will always be at the top of the thread. I'll provide a link when the happens.
3/21/2014
Latest version has been moved to a new topic:
http://eventghost.org/forum/viewtopic.p ... 05f#p30309
Last edited by techoguy on Sat Mar 22, 2014 6:21 am, edited 3 times in total.
The Latest SONOS Plugin:
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!
-
kalinkamaen
- Experienced User
- Posts: 138
- Joined: Wed Dec 26, 2012 9:23 am
Re: SONOS Plugin
Thank you bro.
You did it again. Fixed my freezing when adding playlist.

You did it again. Fixed my freezing when adding playlist.
Re: SONOS Plugin
New to EG and to this plugin, so I'm probably doing something stupid, but...
When the plugin starts, it appears to be finding my SONOS system on a completely wrong network. Here's what the log says.
22:45:42 SONOS plugin starting...
22:45:42 25.176.130.96
22:45:42 ERROR [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
My zoneplayers are on 192.168.1.6 and .8, not 25.176.130.96.
Any ideas?
When the plugin starts, it appears to be finding my SONOS system on a completely wrong network. Here's what the log says.
22:45:42 SONOS plugin starting...
22:45:42 25.176.130.96
22:45:42 ERROR [Errno 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
My zoneplayers are on 192.168.1.6 and .8, not 25.176.130.96.
Any ideas?
Re: SONOS Plugin
Nevermind my previous post about a bad IP address. I had been playing around with Hamachi and I guess that confused things. After I disabled Hamachi, it works fine.
Re: SONOS Plugin
Actually, I'm still having problems getting the plugin to recognize my SONOS system. Here's what I get.
Code: Select all
20:56:01 Plugin: Sonos
20:56:01 SONOS plugin starting...
20:56:01 192.168.1.5
20:56:01 Searching for SONOS ZonePlayers on network...
20:56:02 MSEARCH socket closed
20:56:02 Searching for SONOS ZonePlayers on network...
20:56:04 MSEARCH socket closed
20:56:04 SONOS Event Server listening on port 50577
20:56:04 error while executing...
20:56:04 list index out of range
20:56:04 EXCEPTION AT LINE: 1334 = list index out of range
20:56:04 calling closesockets due to exception...
20:56:04
20:56:04 SONOS Plugin SHUTTING DOWN...
20:56:04 caller name: __start__
20:56:04 unsubscribing to all services...
20:56:04 SONOS Event Server has been Shut down, the end.Re: SONOS Plugin
Code: Select all
Actually, I'm still having problems getting the plugin to recognize my SONOS system. Here's what I get.can you restart you computer and try again?
I see this sometimes when EG or the plugin is restarted shortly after the plugin has been stopped. It seems that either the SONOS equipment is not responding the broadcast or the PC isn't sending the broadcasts. If the PC isn't sending the broadcasts, restarting the PC usually fixes it. This is not normal though and it seems to rarely happen.
Just to be sure, your sonos ZPs are on the 192.168.1.x network and have addresses within this range, correct?
The Latest SONOS Plugin:
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!
Latest version can be found here: http://eventghost.org/forum/viewtopic.p ... 05f#p30309
EventGhost Lets me automate my home the way I want it, I love using it!