SONOS Plugin Official (download here)

Questions and comments specific to a particular plugin should go here.
Post Reply
User avatar
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

SONOS Plugin Official (download here)

Post by techoguy » Sat Mar 22, 2014 6:17 am

Hey everyone,
below is the latest SONOS plugin. I decided to create a new topic so i can keep the latest version at the top and hopefully make it easier to find and download.

Update: 5/6/2016 - Fixed Play Favorite Playlist action, added events for Album, title, Sourece, and Cover Art URL.
You can also un-comment lines 763 and 764 and it'll download the cover are jpg and store it at the location specified:
Line 44

Code: Select all

albumartloc = "C:\\SONOS_Covers\\" #make sure to include dual \\ and include it at the end.
Line 763 and 764

Code: Select all

#picfileloc = albumartloc + uuid + ".jpg" #2/3/2016 uncomment to save cover art to the albumartloc
            #urllib.urlretrieve(albumarturl, picfileloc) #2/3/2016 uncomment to save cover art to the albumartloc
Update: 1/10/2016 - SONOS changed the formatting of some messages which broke the favorites actions. 0.9.2 fixes that issue. Also from this point on, the latest version can be found in GitHub. Feel free to comment and request changes there as well.

Update: 5/4/2014 - I've been working on a handful of bugs and adding a few commands. Big changes is that the search at the beginning should be more robust and be better at finding SONOS ZPs no matter the network. See below for more details. Also, if you have multiple active network cards, you can now open the _init_.py file and enter the IP address of the interface that you want the plugin to use. If you have only one active interface, the plugin will use it.

Update: 4/11/2014 - I've been testing the plugin against the latest SONOS beta app and the addition of the Google Play Music addition. When you Cast music from the Google Play Music app to SONOS, the notification actions can't restart the music as it does with all other music sources. More testing will be done to see if there is a way to fix this.

Features:
Complete control of SONOS system
Accurately controls Zone Players even when grouped
gets instant events from SONOS (no polling)
automatically finds your SONOS system (better as of 0.9)
Commands are stored and sent based on the MAC not IP (IP of ZP can change and command will still work)
TTS Notifications
Supports all Zone Players including the Playbar.
accurately knows when a zone player is playing or not even when grouped (great for automatically turn on and off a receiver connected to a Connect)

Actions:
as of version 0.8:
Play, Pause, Stop, Next, Previous, Relative Volume, Set Volume, Mute On, Mute Off, Play Mode, Start Favorite Playlist/Station
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
as of version 0.9:
Group Zps
Change ZP Name (great when sharing one Connect between two rooms and having EG route the audio to the specific room)
Group Relative Volume, Group Set Volume, Group Mute Off, Group Mute On
Select TV source on Playbars

Events Supported:
New Zone Player added to network:
Generic Add: SONOS.ZonePlayerAdded u"<ip>-<uuid>"
Unique Add based on UUID of ZP: SONOS.ADDED.<uuid> u"<ip>"
Zone Player removed from network. (note this can take up to 30 minutes for the plugin to realize the ZP has been removed)
Generic Delete: SONOS.ZonePlayerDeleted u"<ip>-<uuid>"
Unique Delete based on UUID of ZP: SONOS.DELETED.<uuid> u"<ip>"
Zone Player Playing
Zone Player Stopped/Paused
event for volume adjustments (could be used to control max volume of a zone)
Weather information when running the NotificationWeather action
(new) event when errors occur (can be used to trigger a notification of some kind, in my case I have it email me)
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.
as of version 0.9.5:
events for Title, Artist, Source, and Cover URL changes.

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
3) the weather notification is beta and still under development. This action will be updated.
5) If a notification is triggered before a previous notification has completed, the new notification will over write the previous notification and not allow the music to be restored putting SONOS into an unknown state.
6) If the plugin is restarted while still running (like when opening the configuration window and changing the debug value, then pressing ok) this will cause it to crash (work around is to stop the plugin first, then make changes, then restart
9) When you Cast music from the Google Play Music app to SONOS, the notification actions can't restart the music as it does with all other music sources. More testing will be done to see if there is a way to fix this. (there is no problem when streaming google play music from within the SONOS app.
10) occasionally you might receive an error from the asyncore.py file, this will cause all other plugins that use this modules to also stop working. EG has to be restarted. Cause is still unknown.

Fixed issues:
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. (update 5/4/2014) this still occurs occasionally, added issue number 10.
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.
7) searching for sonos can use the wrong network interface if there are multiple active interfaces. problem will be fixed in next release. (addressed in version 0.9, can manually enter ip address by editing _init_.py file for the plugin)
8) Line In currently doesn't seem to work when selecting the PlayBar input (looking into issue with the help of others) version 0.9 fixes this with a new action specific for TV input on playbars.
11) MSEARCH that is the UPNP network search only searched on the standard broadcast address but not 255.255.255.255, version 0.9 addresses this and now should be fixed.
12) Events for ZPs being removed or added were not working as expected (in some cases not triggering at all). This was fixed in version 0.9 see details above

How to use notifications:
Refer to image below to see how notification actions need to be configured.
nots.JPG
notifications examples
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.


Instructions on using plugin:
NOTE: if you have multiple active network cards, please manually add your IP address of the adapter you want to use to the _init_.py file around line 52:

Code: Select all

localip = ""
1) download the latest __init__.py file from GitHub.
2) Create a folder in C:\Program Files (x86)\EventGhost\plugins called 'Sonos'.
3) place the __init__.py file into the SONOS folder
4) On the EG menu bar, click add plugin, from the list select SONOS.
5) Set the debug level in the configuration window (normal is 0).
6) select a SONOS action that was automatically added to your tree and open the config. window to select the ZP and the options for the action.

Please let me know what you guys think and of course let me know if you find any issues.

Feel free to send me request for added features or commands as well.

The latest version can be found here:
https://github.com/techoguy/Full-SONOS- ... EventGhost



=== Older Versions not in GitHub =====================================================
there as an error in version 0.9 so it has been replaced with 0.9.1.
Latest Version 0.9.1:
SONOS_091.zip
SONOS Plugin Version 0.9.1 5/5/2014 (7:45pm PST)
(28.73 KiB) Downloaded 536 times
version 0.8:
SONOS.zip
SONOS Plugin Version 0.8 3/21/2014 (11:10pm PST)
(25.18 KiB) Downloaded 293 times
Last edited by techoguy on Fri May 06, 2016 7:23 am, edited 11 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!

egbaud
Posts: 35
Joined: Tue Mar 18, 2014 1:30 am

Re: SONOS Plugin Official (download here)

Post by egbaud » Sat Mar 22, 2014 4:24 pm

Even after making the firewall changes I mentioned in the previous thread, I was still having a lot of problems getting the plugin to connect successfully. This new version seems to have fixed all that. I can now start and stop EG and the plugin connects successfully.

So far at least.

Thanks.

egbaud
Posts: 35
Joined: Tue Mar 18, 2014 1:30 am

Re: SONOS Plugin Official (download here)

Post by egbaud » Sat Mar 22, 2014 4:32 pm

Nope. Spoke too soon. Still having exactly the same problem as before.

Code: Select all

12:28:54   SONOS plugin starting...
12:28:54   192.168.1.5
12:28:54   Searching for SONOS ZonePlayers on network...
12:28:56   MSEARCH socket closed
12:28:56   Searching for SONOS ZonePlayers on network...
12:28:57   MSEARCH socket closed
12:28:57   SONOS Event Server listening on port 52373
12:28:57   error while executing...
12:28:57   list index out of range
12:28:57   EXCEPTION AT LINE: 1498 = list index out of range
12:28:57   calling closesockets due to exception...
12:28:57   
12:28:57   SONOS Plugin SHUTTING DOWN...
12:28:57   caller name: __start__
12:28:57   unsubscribing to all services...
12:28:57   SONOS Event Server has been Shut down, the end.
12:28:57   SONOS.ERROR 'EXCEPTION AT LINE: 1498 = list index out of range'
12:28:57   SONOS.ERROR 'error while executing...'

egbaud
Posts: 35
Joined: Tue Mar 18, 2014 1:30 am

Re: SONOS Plugin Official (download here)

Post by egbaud » Sat Mar 22, 2014 5:17 pm

Sometimes I can make it connect by rebooting my machine. That worked this time. Here's the log of a successful connection.

Code: Select all

13:03:56      Plugin: Sonos
13:03:56         SONOS plugin starting...
13:03:56         192.168.1.5
13:03:56         Searching for SONOS ZonePlayers on network...
13:03:56         New ZonePlayer Added: RINCON_000E584DF11401400 : 192.168.1.6
13:03:56         New ZonePlayer Added: RINCON_000E585C06C001400 : 192.168.1.13
13:03:56         New ZonePlayer Added: RINCON_000E58B0C20801400 : 192.168.1.8
13:03:57         MSEARCH socket closed
13:03:57         SONOS Event Server listening on port 49464
13:03:57         49465 sending subscribe request: 192.168.1.6 - ZoneGroupTopology
13:03:57   49465 writable len:173
13:03:57   LIRC Client: Received an erroneous response from the LIRC-server
13:03:57   Message data: ['Unknown LIRC Command received: VERSION']
13:03:57   49465 handle_connect
13:03:57   49465 handle_write
13:03:57   49465 writable len:0
13:03:57   49465 handle_read
13:03:57   49465-Data:

13:03:57   HTTP/1.1 200 OK

13:03:57   SID: uuid:RINCON_000E584DF11401400_sub0000000011

13:03:57   TIMEOUT: Second-3600

13:03:57   Server: Linux UPnP/1.0 Sonos/26.1-75050a (BR100)

13:03:57   Connection: close

13:03:57   

13:03:57   ------End Of Data------
13:03:57   49465 socket closing
13:03:57   uuid:RINCON_000E584DF11401400_sub0000000011
13:03:57   Subscribed to ZoneGroupTopology on 192.168.1.6
13:03:57   49465 subscribed response 192.168.1.6 - ZoneGroupTopology
13:03:57    connected to channel: <socket._socketobject object at 0x0429DEA0>
13:03:57    connected to addr: ('192.168.1.6', 3282)
13:03:57   --- Event Handle_Read ---
13:03:57   <e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"><e:property><ZoneGroupState><ZoneGroups><ZoneGroup Coordinator="RINCON_000E58B0C20801400" ID="RINCON_000E58B0C20801400:2"><ZoneGroupMember UUID="RINCON_000E58B0C20801400" Location="http://192.168.1.8:1400/xml/device_description.xml" ZoneName="Bar" Icon="x-rincon-roomicon:living" Configuration="1" SoftwareVersion="26.1-75050a" MinCompatibleVersion="24.0-00000" LegacyCompatibleVersion="24.0-0000" BootSeq="42"/></ZoneGroup><ZoneGroup Coordinator="RINCON_000E585C06C001400" ID="RINCON_000E585C06C001400:11"><ZoneGroupMember UUID="RINCON_000E585C06C001400" Location="http://192.168.1.13:1400/xml/device_description.xml" ZoneName="Living Room" Icon="x-rincon-roomicon:living" Configuration="1" SoftwareVersion="26.1-75050a" MinCompatibleVersion="24.0-00000" LegacyCompatibleVersion="24.0-0000" BootSeq="69"/></ZoneGroup><ZoneGroup Coordinator="RINCON_000E584DF11401400" ID="RINCON_000E584DF11401400:0"><ZoneGroupMember UUID="RINCON_000E584DF11401400" Location="http://192.168.1.6:1400/xml/device_description.xml" ZoneName="BRIDGE" Icon="x-rincon-roomicon:zoneextender" Configuration="1" Invisible="1" IsZoneBridge="1" SoftwareVersion="26.1-75050a" MinCompatibleVersion="24.0-00000" LegacyCompatibleVersion="24.0-0000" BootSeq="40"/></ZoneGroup></ZoneGroups></ZoneGroupState></e:property><e:property><AvailableSoftwareUpdate><UpdateItem xmlns="urn:schemas-rinconnetworks-com:update-1-0" Type="Software" Version="26.1-75050" UpdateURL="http://update-firmware.sonos.com/firmware/beta/26.0-75051a-v5.0-fzvqqm-Beta2a/^26.1-75050" DownloadSize="0" ManifestURL="http://update-firmware.sonos.com/firmware/beta/26.0-75051a-v5.0-fzvqqm-Beta2a/update_1394697579.upm"/></AvailableSoftwareUpdate></e:property><e:property><ZoneGroupName></ZoneGroupName></e:property><e:property><ZoneGroupID></ZoneGroupID></e:property><e:property><ZonePlayerUUIDsInGroup></ZonePlayerUUIDsInGroup></e:property></e:propertyset>
13:03:57   --- EVENT Received --- ZoneGroupTopology from 192.168.1.6
13:03:58       Subscribing to Bar
13:03:58   RINCON_000E58B0C20801400   192.168.1.8      Bar :coordinator --
13:03:58       Subscribing to Living Room
13:03:58   SONOS.NewZonePlayerAdded '192.168.1.6-RINCON_000E584DF11401400'
13:03:58   RINCON_000E585C06C001400   192.168.1.13     Living Room :coordinator --
13:03:58       Subscribing to BRIDGE
13:03:58   RINCON_000E584DF11401400   192.168.1.6      BRIDGE (Invisible) :coordinator --
13:03:58   SONOS.NewZonePlayerAdded '192.168.1.13-RINCON_000E585C06C001400'
13:03:58   Subscribing to AVTransportEvent on Bar
13:03:58   SONOS.NewZonePlayerAdded '192.168.1.8-RINCON_000E58B0C20801400'
13:03:58   49466 sending subscribe request: Bar - AVTransport
13:03:58   Main.OnInit
13:03:58   Subscribing to AVTransportEvent on Living Room
13:03:58   49467 sending subscribe request: Living Room - AVTransport
13:03:58   49468 sending subscribe request: Bar - RenderingControl
13:03:58   49469 sending subscribe request: Living Room - RenderingControl
13:03:58   49467 writable len:182
13:03:58   49468 writable len:186
13:03:58   49469 writable len:187
13:03:58   49466 writable len:181
13:03:58   49468 handle_connect
13:03:58   49468 handle_write
13:03:58   49467 writable len:182
13:03:58   49468 writable len:0
13:03:58   49469 writable len:187
13:03:58   49466 writable len:181
13:03:58   49469 handle_connect
13:03:58   49469 handle_write
13:03:58   49467 writable len:182
13:03:58   49468 writable len:0
13:03:58   49469 writable len:0
13:03:58   49466 writable len:181
13:03:58   49468 handle_read
13:03:58   49468-Data:

13:03:58   HTTP/1.1 200 OK

13:03:58   SID: uuid:RINCON_000E58B0C20801400_sub0000000103

13:03:58   TIMEOUT: Second-3600

13:03:58   Server: Linux UPnP/1.0 Sonos/26.1-75050a (ZPS9)

13:03:58   Connection: close

13:03:58   

13:03:58   ------End Of Data------
13:03:58   49468 socket closing
13:03:58   uuid:RINCON_000E58B0C20801400_sub0000000103
13:03:58   Subscribed to RenderingControl on Bar
13:03:58   49468 subscribed response Bar - RenderingControl
13:03:58   49467 writable len:182
13:03:58   49469 writable len:0
13:03:58   49466 writable len:181
13:03:58    connected to channel: <socket._socketobject object at 0x0429DEA0>
13:03:58    connected to addr: ('192.168.1.8', 54992)
13:03:58   49467 writable len:182
13:03:58   49469 writable len:0
13:03:58   49466 writable len:181
13:03:58   --- Event Handle_Read ---
13:03:58   <e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"><e:property><LastChange><Event xmlns="urn:schemas-upnp-org:metadata-1-0/RCS/"><InstanceID val="0"><Volume channel="Master" val="45"/><Volume channel="LF" val="100"/><Volume channel="RF" val="100"/><Mute channel="Master" val="0"/><Mute channel="LF" val="0"/><Mute channel="RF" val="0"/><Bass val="-1"/><Treble val="9"/><Loudness channel="Master" val="0"/><OutputFixed val="0"/><HeadphoneConnected val="0"/><SpeakerSize val="6"/><SubGain val="0"/><SubCrossover val="0"/><SubPolarity val="0"/><SubEnabled val="1"/><DialogLevel val="0"/><SurroundLevel val="0"/><AudioDelay val="0"/><AudioDelayLeftRear val="0"/><AudioDelayRightRear val="0"/><NightMode val="0"/><SurroundEnabled val="1"/><SurroundMode val="0"/><PresetNameList val="FactoryDefaults"/></InstanceID></Event></LastChange></e:property></e:propertyset>
13:03:58   --- EVENT Received --- RenderingControl from Bar
13:03:58   <?xml version="1.0" ?><Event xmlns="urn:schemas-upnp-org:metadata-1-0/RCS/"><InstanceID val="0"><Volume channel="Master" val="45"/><Volume channel="LF" val="100"/><Volume channel="RF" val="100"/><Mute channel="Master" val="0"/><Mute channel="LF" val="0"/><Mute channel="RF" val="0"/><Bass val="-1"/><Treble val="9"/><Loudness channel="Master" val="0"/><OutputFixed val="0"/><HeadphoneConnected val="0"/><SpeakerSize val="6"/><SubGain val="0"/><SubCrossover val="0"/><SubPolarity val="0"/><SubEnabled val="1"/><DialogLevel val="0"/><SurroundLevel val="0"/><AudioDelay val="0"/><AudioDelayLeftRear val="0"/><AudioDelayRightRear val="0"/><NightMode val="0"/><SurroundEnabled val="1"/><SurroundMode val="0"/><PresetNameList val="FactoryDefaults"/></InstanceID></Event>
13:03:58   SONOS.RINCON_000E58B0C20801400.Volume u"vol-45 Bar"
13:03:58   49467 writable len:182
13:03:58   49469 writable len:0
13:03:58   SONOS.RINCON_000E58B0C20801400.Mute u"mute-0 Bar"
13:03:58   49466 writable len:181
13:03:58   49469 handle_read
13:03:58      Mute Volume
13:03:58         49469-Data:

13:03:58         ------End Of Data------Toggle Mute
13:03:58         HTTP/1.1 200 OK

13:03:58            SID: uuid:RINCON_000E585C06C001400_sub0000000085

13:03:58            TIMEOUT: Second-3600

13:03:58            Server: Linux UPnP/1.0 Sonos/26.1-75050a (ZPS5)

13:03:58            Connection: close

13:03:58            

13:03:58            
13:03:58            49469 socket closing
13:03:58            uuid:RINCON_000E585C06C001400_sub0000000085
13:03:58            Subscribed to RenderingControl on Living Room
13:03:58            49469 subscribed response Living Room - RenderingControl
13:03:58             connected to channel: <socket._socketobject object at 0x0455AF10>
13:03:58             connected to addr: ('192.168.1.13', 1429)
13:03:58            49467 writable len:182
13:03:58            49466 writable len:181
13:03:58            --- Event Handle_Read ---
13:03:58            <e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0"><e:property><LastChange><Event xmlns="urn:schemas-upnp-org:metadata-1-0/RCS/"><InstanceID val="0"><Volume channel="Master" val="77"/><Volume channel="LF" val="100"/><Volume channel="RF" val="100"/><Mute channel="Master" val="0"/><Mute channel="LF" val="0"/><Mute channel="RF" val="0"/><Bass val="0"/><Treble val="0"/><Loudness channel="Master" val="1"/><OutputFixed val="0"/><HeadphoneConnected val="0"/><SpeakerSize val="3"/><SubGain val="0"/><SubCrossover val="0"/><SubPolarity val="0"/><SubEnabled val="1"/><PresetNameList val="FactoryDefaults"/></InstanceID></Event></LastChange></e:property></e:propertyset>
13:03:58            --- EVENT Received --- RenderingControl from Living Room
13:03:58            <?xml version="1.0" ?><Event xmlns="urn:schemas-upnp-org:metadata-1-0/RCS/"><InstanceID val="0"><Volume channel="Master" val="77"/><Volume channel="LF" val="100"/><Volume channel="RF" val="100"/><Mute channel="Master" val="0"/><Mute channel="LF" val="0"/><Mute channel="RF" val="0"/><Bass val="0"/><Treble val="0"/><Loudness channel="Master" val="1"/><OutputFixed val="0"/><HeadphoneConnected val="0"/><SpeakerSize val="3"/><SubGain val="0"/><SubCrossover val="0"/><SubPolarity val="0"/><SubEnabled val="1"/><PresetNameList val="FactoryDefaults"/></InstanceID></Event>
13:03:58            49467 writable len:182
13:03:58            49466 writable len:181
13:03:58            49467 writable len:182
13:03:58            49466 writable len:181
13:03:58   SONOS.RINCON_000E585C06C001400.Volume u"vol-77 Living Room"
13:03:58   SONOS.RINCON_000E585C06C001400.Mute u"mute-0 Living Room"
13:03:58      Mute Volume
13:03:58         Toggle Mute
13:03:58   System.Mute '50.41'
13:03:58      Mute Volume
13:03:58         Toggle Mute
13:03:58   System.UnMute '50.41'
13:03:58   System.Mute '50.41'
13:03:58      Mute Volume
13:03:58         Toggle Mute
13:03:58   System.UnMute '50.41'
13:04:01   49466 handle_connect
13:04:01   49466 handle_write
13:04:01   49467 writable len:182
13:04:01   49466 writable len:0
13:04:01   49467 handle_connect
13:04:01   49467 handle_write
13:04:01   49467 writable len:0
13:04:01   49466 writable len:0
13:04:01   49466 handle_read
13:04:01   49466-Data:

13:04:01   HTTP/1.1 200 OK

13:04:01   SID: uuid:RINCON_000E58B0C20801400_sub0000000104

13:04:01   TIMEOUT: Second-3600

13:04:01   Server: Linux UPnP/1.0 Sonos/26.1-75050a (ZPS9)

13:04:01   Connection: close

13:04:01   

13:04:01   ------End Of Data------
13:04:01   49466 socket closing
13:04:01   uuid:RINCON_000E58B0C20801400_sub0000000104
13:04:01   Subscribed to AVTransport on Bar
13:04:01   49466 subscribed response Bar - AVTransport
13:04:01   49467 writable len:0
13:04:01   49467 handle_read
13:04:01   49467-Data:

13:04:01   HTTP/1.1 200 OK

13:04:01   SID: uuid:RINCON_000E585C06C001400_sub0000000086

13:04:01   TIMEOUT: Second-3600

13:04:01   Server: Linux UPnP/1.0 Sonos/26.1-75050a (ZPS5)

13:04:01   Connection: close

13:04:01   

13:04:01   ------End Of Data------
13:04:01   49467 socket closing
13:04:01   uuid:RINCON_000E585C06C001400_sub0000000086
13:04:01   Subscribed to AVTransport on Living Room
13:04:01   49467 subscribed response Living Room - AVTransport
13:04:01    connected to channel: <socket._socketobject object at 0x0429DEA0>
13:04:01    connected to addr: ('192.168.1.8', 54993)
13:04:01   --- Event Handle_Read ---
13:04:01   --- Event Handle_Read ---
13:04:01    connected to channel: <socket._socketobject object at 0x0455AED8>
13:04:01    connected to addr: ('192.168.1.13', 1430)
13:04:01   --- Event Handle_Read ---
13:04:01   <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="1"/><CurrentTrack val="1"/><CurrentSection val="0"/><CurrentTrackURI val="x-sonos-htastream:RINCON_000E58B0C20801400:spdif"/><CurrentTrackDuration val=""/><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;x-sonos-htastream:*:*:*&quot;&gt;x-sonos-htastream:RINCON_000E58B0C20801400:spdif&lt;/res&gt;&lt;r:audioInputIcon&gt;&lt;/r:audioInputIcon&gt;&lt;r:streamInfo&gt;2&lt;/r:streamInfo&gt;&lt;dc:title&gt; &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=""/><r:EnqueuedTransportURIMetaData val=""/><PlaybackStorageMedium val="NETWORK"/><AVTransportURI val="x-sonos-htastream:RINCON_000E58B0C20801400:spdif"/><AVTransportURIMetaData 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;spdif-input&quot; parentID=&quot;0&quot; restricted=&quot;false&quot;&gt;&lt;dc:title&gt;RINCON_000E58B0C20801400&lt;/dc:title&gt;&lt;upnp:class&gt;object.item.audioItem&lt;/upnp:class&gt;&lt;res protocolInfo=&quot;spdif&quot;&gt;x-sonos-htastream:RINCON_000E58B0C20801400:spdif&lt;/res&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;"/><NextAVTransportURI val=""/><NextAVTransportURIMetaData val=""/><CurrentTransportActions val="Set, Play, Pause"/><TransportStatus val="OK"/><r:SleepTimerGeneration val="0"/><r:AlarmRunning val="0"/><r:SnoozeRunning val="0"/><r:RestartPending val="0"/><TransportPlaySpeed val="NOT_IMPLEMENTED"/><CurrentMediaDuration val="NOT_IMPLEMENTED"/><RecordStorageMedium val="NOT_IMPLEMENTED"/><PossiblePlaybackStorageMedia val="NONE, NETWORK"/><PossibleRecordStorageMedia val="NOT_IMPLEMENTED"/><RecordMediumWriteStatus val="NOT_IMPLEMENTED"/><CurrentRecordQualityMode val="NOT_IMPLEMENTED"/><PossibleRecordQualityModes val="NOT_IMPLEMENTED"/></InstanceID></Event></LastChange></e:property></e:propertyset>
13:04:01   --- EVENT Received --- AVTransport from Bar
13:04:01   <?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="1"/><CurrentTrack val="1"/><CurrentSection val="0"/><CurrentTrackURI val="x-sonos-htastream:RINCON_000E58B0C20801400:spdif"/><CurrentTrackDuration val=""/><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="x-sonos-htastream:*:*:*">x-sonos-htastream:RINCON_000E58B0C20801400:spdif</res><r:audioInputIcon></r:audioInputIcon><r:streamInfo>2</r:streamInfo><dc:title> </dc:title><upnp:class>object.item</upnp:class></item></DIDL-Lite>"/><r:NextTrackURI val=""/><r:NextTrackMetaData val=""/><r:EnqueuedTransportURI val=""/><r:EnqueuedTransportURIMetaData val=""/><PlaybackStorageMedium val="NETWORK"/><AVTransportURI val="x-sonos-htastream:RINCON_000E58B0C20801400:spdif"/><AVTransportURIMetaData 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="spdif-input" parentID="0" restricted="false"><dc:title>RINCON_000E58B0C20801400</dc:title><upnp:class>object.item.audioItem</upnp:class><res protocolInfo="spdif">x-sonos-htastream:RINCON_000E58B0C20801400:spdif</res></item></DIDL-Lite>"/><NextAVTransportURI val=""/><NextAVTransportURIMetaData val=""/><CurrentTransportActions val="Set, Play, Pause"/><TransportStatus val="OK"/><r:SleepTimerGeneration val="0"/><r:AlarmRunning val="0"/><r:SnoozeRunning val="0"/><r:RestartPending val="0"/><TransportPlaySpeed val="NOT_IMPLEMENTED"/><CurrentMediaDuration val="NOT_IMPLEMENTED"/><RecordStorageMedium val="NOT_IMPLEMENTED"/><PossiblePlaybackStorageMedia val="NONE, NETWORK"/><PossibleRecordStorageMedia val="NOT_IMPLEMENTED"/><RecordMediumWriteStatus val="NOT_IMPLEMENTED"/><CurrentRecordQualityMode val="NOT_IMPLEMENTED"/><PossibleRecordQualityModes val="NOT_IMPLEMENTED"/></InstanceID></Event>
13:04:01   Bar Received ZP Transport State: PLAYING
13:04:01   Bar Pre Transport State: 
13:04:01   Bar Transport State: Playing
13:04:01   SONOS.RINCON_000E58B0C20801400.Playing u"Bar"
13:04:01   Bar currentPlayMode: NORMAL
13:04:01   Bar playbackStorageMedium: NETWORK
13:04:01   Bar Stream Title: RINCON_000E58B0C20801400
13:04:01   failed list index out of range
13:04:01   Track:  
13:04:01   --- Event Handle_Read ---
13:04:01   <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="STOPPED"/><CurrentPlayMode val="NORMAL"/><CurrentCrossfadeMode val="0"/><NumberOfTracks val="3"/><CurrentTrack val="1"/><CurrentSection val="0"/><CurrentTrackURI val="aac://wamu-1.streamguys.com/wamu-1.aac"/><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:s27111?sid=254&amp;amp;flags=32&lt;/res&gt;&lt;r:streamContent&gt;&lt;/r:streamContent&gt;&lt;r:radioShowMd&gt;This American Life,p28&lt;/r:radioShowMd&gt;&lt;upnp:albumArtURI&gt;/getaa?s=1&amp;amp;u=x-sonosapi-stream%3as27111%3fsid%3d254%26flags%3d32&lt;/upnp:albumArtURI&gt;&lt;dc:title&gt;x-sonosapi-stream:s27111?sid=254&amp;amp;flags=32&lt;/dc:title&gt;&lt;upnp:class&gt;object.item&lt;/upnp:class&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;"/><r:NextTrackURI val="x-rincon-mp3radio://wamu-1.streamguys.com/wamu-1"/><r:NextTrackMetaData 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;x-rincon-mp3radio:*:*:*&quot;&gt;x-rincon-mp3radio://wamu-1.streamguys.com/wamu-1&lt;/res&gt;&lt;dc:title&gt;wamu-1&lt;/dc:title&gt;&lt;upnp:class&gt;object.item&lt;/upnp:class&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;"/><r:EnqueuedTransportURI val="x-sonosapi-stream:s27111?sid=254&amp;flags=32"/><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;WAMU&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;"/><PlaybackStorageMedium val="NETWORK"/><AVTransportURI val="x-sonosapi-stream:s27111?sid=254&amp;flags=32"/><AVTransportURIMetaData 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;WAMU&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;"/><NextAVTransportURI val=""/><NextAVTransportURIMetaData val=""/><CurrentTransportActions val="Set, Play, Stop, Pause, Seek, Next, Previous"/><TransportStatus val="OK"/><r:SleepTimerGeneration val="0"/><r:AlarmRunning val="0"/><r:SnoozeRunning val="0"/><r:RestartPending val="0"/><TransportPlaySpeed val="NOT_IMPLEMENTED"/><CurrentMediaDuration val="NOT_IMPLEMENTED"/><RecordStorageMedium val="NOT_IMPLEMENTED"/><PossiblePlaybackStorageMedia val="NONE, NETWORK"/><PossibleRecordStorageMedia val="NOT_IMPLEMENTED"/><RecordMediumWriteStatus val="NOT_IMPLEMENTED"/><CurrentRecordQualityMode val="NOT_IMPLEMENTED"/><PossibleRecordQualityModes val="NOT_IMPLEMENTED"/></InstanceID></Event></LastChange></e:property></e:propertyset>
13:04:01   --- EVENT Received --- AVTransport from Living Room
13:04:01   <?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="STOPPED"/><CurrentPlayMode val="NORMAL"/><CurrentCrossfadeMode val="0"/><NumberOfTracks val="3"/><CurrentTrack val="1"/><CurrentSection val="0"/><CurrentTrackURI val="aac://wamu-1.streamguys.com/wamu-1.aac"/><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:s27111?sid=254&amp;flags=32</res><r:streamContent></r:streamContent><r:radioShowMd>This American Life,p28</r:radioShowMd><upnp:albumArtURI>/getaa?s=1&amp;u=x-sonosapi-stream%3as27111%3fsid%3d254%26flags%3d32</upnp:albumArtURI><dc:title>x-sonosapi-stream:s27111?sid=254&amp;flags=32</dc:title><upnp:class>object.item</upnp:class></item></DIDL-Lite>"/><r:NextTrackURI val="x-rincon-mp3radio://wamu-1.streamguys.com/wamu-1"/><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="x-rincon-mp3radio:*:*:*">x-rincon-mp3radio://wamu-1.streamguys.com/wamu-1</res><dc:title>wamu-1</dc:title><upnp:class>object.item</upnp:class></item></DIDL-Lite>"/><r:EnqueuedTransportURI val="x-sonosapi-stream:s27111?sid=254&flags=32"/><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>WAMU</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>"/><PlaybackStorageMedium val="NETWORK"/><AVTransportURI val="x-sonosapi-stream:s27111?sid=254&flags=32"/><AVTransportURIMetaData 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>WAMU</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>"/><NextAVTransportURI val=""/><NextAVTransportURIMetaData val=""/><CurrentTransportActions val="Set, Play, Stop, Pause, Seek, Next, Previous"/><TransportStatus val="OK"/><r:SleepTimerGeneration val="0"/><r:AlarmRunning val="0"/><r:SnoozeRunning val="0"/><r:RestartPending val="0"/><TransportPlaySpeed val="NOT_IMPLEMENTED"/><CurrentMediaDuration val="NOT_IMPLEMENTED"/><RecordStorageMedium val="NOT_IMPLEMENTED"/><PossiblePlaybackStorageMedia val="NONE, NETWORK"/><PossibleRecordStorageMedia val="NOT_IMPLEMENTED"/><RecordMediumWriteStatus val="NOT_IMPLEMENTED"/><CurrentRecordQualityMode val="NOT_IMPLEMENTED"/><PossibleRecordQualityModes val="NOT_IMPLEMENTED"/></InstanceID></Event>
13:04:01   Living Room Received ZP Transport State: STOPPED
13:04:01   Living Room Pre Transport State: 
13:04:01   Living Room Transport State: Stopped
13:04:01   SONOS.RINCON_000E585C06C001400.Stopped u"Living Room"
13:04:01   Living Room currentPlayMode: NORMAL
13:04:01   Living Room playbackStorageMedium: NETWORK
13:04:01   Living Room Stream Title: WAMU
13:04:01   Track: x-sonosapi-stream:s27111?sid=254&flags=32

User avatar
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post by techoguy » Sat Mar 22, 2014 5:44 pm

Hi egbaud,
What are you usually doing before and after you are restarting the plugin or EG, why are you having to restart EG? If you are closing and re-opening EG how much time do you wait before re-opening EG? And lastly, what kind of PC are you using, specs?

usually when this happens it has something to do with the PC (otherwise it's not common), like the firewall before. If this is happening right when you restart the computer, can you delay the startup of EG?
Also, if you have and know how to use wireshark, i would see if you can capture the MSEARCH broadcast message that is sent out on port 1900. When it fails, it's sent twice by the plugin. That will greatly help in determining if it's a plugin issue or a PC issue.

If none of this seems to work or help, I would be willing to do a hangout session where you share your screen so I can see exactly what's going on and possibly troubleshoot in real time. Let me know if you are interested and we can setup a time (I'm on PST).
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!

egbaud
Posts: 35
Joined: Tue Mar 18, 2014 1:30 am

Re: SONOS Plugin Official (download here)

Post by egbaud » Sat Mar 22, 2014 7:44 pm

OK. I installed WireShark and captured the M-Search traffic. It's going over the wrong network I think. In addition to my network card, I have two TV tuner cards installed in my machine. They appear as network cards to the OS. Wireshark shows that the M-Search is going over one of the Tuner cards.

My computer is on the 192.168.1.x subnet. The tuner cards are on different subnets: 192.168.67.210 and 192.168.8.98. Wireshark shows the M-Search on the first tuner card.

So, even though the plugin correctly detects the IP of my machine as 192.168.1.5, it's doing its SSDP stuff on 192.168.67.210.

When I disable both tuner cards, the plugin works fine. When I re-enable them, the plugin fails.

User avatar
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post by techoguy » Sun Mar 23, 2014 1:29 am

egbaud has given me more information regarding this issue. it is issue number 7 above and I have found a fix that will be added to the next release.

Until then, this plugin works only when there is one active network interface.

Thanks egbaud for the support.
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!

Telorast
Posts: 45
Joined: Wed Feb 27, 2013 2:44 pm

Re: SONOS Plugin Official (download here)

Post by Telorast » Sun Mar 23, 2014 1:35 pm

Is it possible to use the Playbar IR repeater to send commands to the TV or do I still need to use USB-UIRT for that?

User avatar
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post by techoguy » Sun Mar 23, 2014 2:39 pm

Telorast,
I believe the IR blaster on the playbar is only a repeater so I don't believe it is possible to send IR commands to it. But I also don't have a playbar to test with right now.

If anyone finds out that the IR blaster is controllable let me know and I'll see how it can be added.
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!

egbaud
Posts: 35
Joined: Tue Mar 18, 2014 1:30 am

Re: SONOS Plugin Official (download here)

Post by egbaud » Tue Mar 25, 2014 12:10 am

I guess it's my job to test the edge cases. :)

I renamed one of my ZPs from "Living Room" to "Play5-1". When I try to make it do anything with that ZP, I get the error message shown at the bottom of the window below. I've tried deleting the plugin, saving the EG xml file, restarting EG, and adding the plugin again, with the same result. I also tried rebooting and following all those steps. Same result.

UPDATE: I change it back to "Living Room" and all functionality was restored.

Code: Select all

19:57:03   initializing SONOS plugin...
19:57:06   SONOS plugin starting...
19:57:06   Searching for SONOS ZonePlayers on network...
19:57:08   MSEARCH socket closed
19:57:08   SONOS Event Server listening on port 49929
19:57:08   SONOS.NewZonePlayerAdded '192.168.1.6-RINCON_000E584DF11401400'
19:57:08   SONOS.NewZonePlayerAdded '192.168.1.8-RINCON_000E58B0C20801400'
19:57:08   SONOS.NewZonePlayerAdded '192.168.1.13-RINCON_000E585C06C001400'
19:57:08   Plugin: Sonos
19:57:08   SONOS.RINCON_000E58B0C20801400.Stopped u"Bar"
19:57:08   SONOS.RINCON_000E585C06C001400.Stopped u"Play5-1"
19:57:08   SONOS.RINCON_000E58B0C20801400.Volume u"vol-39 Bar"
19:57:08   SONOS.RINCON_000E58B0C20801400.Mute u"mute-0 Bar"
19:57:08   SONOS.RINCON_000E585C06C001400.Volume u"vol-41 Play5-1"
19:57:08   SONOS.RINCON_000E585C06C001400.Mute u"mute-0 Play5-1"
19:57:44   Getting Favorites List from Bar at 192.168.1.8
19:57:53   Sonos: StartPlayList: 1
19:57:53      !!! zone player no longer in globalZPList (not found on network) !!!

User avatar
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post by techoguy » Tue Mar 25, 2014 1:59 am

I renamed one of my ZPs from "Living Room" to "Play5-1"
This is failing because of the dash in the name "-". Remove the dash in Play5-1 and it should work fine. I'm using that in my code to split strings with so it's throwing it off. I will have to fix that so you can still have "-" in the name of a ZP.
That was short sighted on my part.

Thanks for catching this, it will be fixed in the next release.
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!

Vitch
Posts: 1
Joined: Wed Mar 26, 2014 12:33 pm

Re: SONOS Plugin Official (download here)

Post by Vitch » Wed Mar 26, 2014 12:54 pm

Hi there

Awesome plugin! Very impressed and very happy :)

I'm going to have a lot of fun with this... (My dog is really confused! lol!)

I'm an EventGhost newbie, learning how to use terRemote to send network messages from Android. This may be a really dumb question but is there a way to pass a text variable to the NotificationGoogleTTS so that it says what's in the variable?

Cheers
Vitch

egbaud
Posts: 35
Joined: Tue Mar 18, 2014 1:30 am

Re: SONOS Plugin Official (download here)

Post by egbaud » Wed Mar 26, 2014 2:56 pm

Take a look at the eg.event object here: http://www.eventghost.net/docs/scripting.html

egbaud
Posts: 35
Joined: Tue Mar 18, 2014 1:30 am

Re: SONOS Plugin Official (download here)

Post by egbaud » Wed Mar 26, 2014 3:05 pm

I think I misunderstood your question. I think the way you do that is to right click the action and then click Configure Item.

User avatar
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post by techoguy » Wed Mar 26, 2014 4:14 pm

Hi Vitch,

Currently there is not a direct way to do what you ask. The work around is shown below. The long term plan is to add the ability to include short codes like <payload> or <eventstring> to the text input to make this easier. But for now this is how you would do it, see below.

egbaud is correct, look at http://www.eventghost.net/docs/scripting.html
specifically, you'll want to look at eg.event. Depending on what event you are triggering off of, the eg.event.payload is probably what you want but I haven't used terRemote to know for sure. To use the TTS in my plugin, you'll have to create a EventGhost -> python script action. The script will look something like this:

Code: Select all

import eg
ttsString = "this is my message, %s" % eg.event.payload
eg.plugins.Sonos.NotificationGoogleTTS(ttsString, u'en')
The configuration tree will look like this:
tts_example.JPG
tts_scr_exm
tts_example.JPG (18.88 KiB) Viewed 11939 times
The ttsString in the example can be used to customize your string before passing it to the TTS. Remember that this string can only be 100 characters long (google API restriction) and if it's longer my plugin will cut it off at 100 characters. If you need longer messages, you have to use the TTS plugin which uses the PCs TTS and then use the line-in on SONOS.

hope this helps.
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!

Post Reply