Page 3 of 10
Re: SONOS Plugin Official (download here)
Posted: Sat Apr 12, 2014 2:43 am
by techoguy
egbaud wrote:
Actually, the playbar input shows up as a separate option labeled "TV" in the Sonos App. There is no Line In option for it.
I've attached a file with the result of switching the playbar to TV. It looks like it might show up as SPDIF in the dump.
Hi egbaud,
Thanks so much! I kinda was thinking that might be the case (separate option to select TV). That should be exactly what I need. I'll make some changes and add an action to select "TV".
One question, can you tell if you select "TV" because that's the name of the playbar or? I guess I'm wondering if there were multiple playbars in a system how it will show up and if you can tell within the app at all.
Thanks again!
Re: SONOS Plugin Official (download here)
Posted: Sat Apr 12, 2014 4:47 pm
by egbaud
"TV" is a "Music Source". My playbar's name is "Bar". Here's a picture of what the Sonos controller screen looks like.
So, basically, you select the "Room" and if it is a playbar, the Music Source list gains a new entry called "TV". If I select "Living Room", which is a Play:5, "TV" disappears from the Music Source list.
Re: SONOS Plugin Official (download here)
Posted: Sat Apr 12, 2014 5:30 pm
by techoguy
"TV" is a "Music Source". My playbar's name is "Bar". Here's a picture of what the Sonos controller screen looks like.
So, basically, you select the "Room" and if it is a playbar, the Music Source list gains a new entry called "TV". If I select "Living Room", which is a Play:5, "TV" disappears from the Music Source list.
Right now I don't look at the type of ZPs or the models but looks like i'll have to start doing that so I know if a PlayBar is connected.
This is helpful.
I'll make an action that allows you to select the "TV" input but it will only be sent to the PlayBars.
Hopefully I can get something you can test this weekend.
Thanks!
Re: SONOS Plugin Official (download here)
Posted: Sun Apr 13, 2014 9:03 pm
by Telorast
techoguy wrote:Hi Telorast,
Thanks for testing this.
Sorry i'm just getting back to you, I didn't receive the typical notification and just happened to look at the thread again.
I still have one problem, there is no event generated when a new speaker is discovered:
When you are testing this, i'm assuming you have all 3 ZPs powered up and connected then you disconnect (power down) one of the ZPs (Kitchen) then power it back up?
When you test this, do you see a Zone Group topology and event that shows that the ZP has been removed from EG?
The reason i ask is that the SONOS network can take a long time (as long as 30 minutes) to realize that a ZP has been removed. The EG plugin is the same way. So if the plugin doesn't realize it's been removed then it's powered back on, it will see it come up but not realize it's new which is what triggers the event in EG. This was primarily programmed to capture new ZPs added, not necessarily capture ZPs that are powered down and back on.
Can you explain a little about how/why you are wanting this event trigger and maybe i can try to tweak the code to do what you're wanting better or add a new event.
The reason I'm interested in the event is because I bought a Play:1 that is designed to work in damp places. So I put it in my bathroom and the only power source in my bathroom is tied to the lights, so it only gets power when I turn the lights on in the bathroom. Meaning it will go on and off fairly often. This makes it lose track of what it was playing last so I was thinking I could see when it comes online and load a stream and pause it so I could start playing using the play button on the speaker. Or I could give a command to start playing as soon as it comes online if I plan to take a shower for example. Right now I have to wait for it to register on the network and everything before I can tell it to start. Solving it by retrying a few times and hope that at least one will work has the drawback of stopping playback every time it tries, at least the way I have it set up right now. Since I can't trust EventGhost to do it I ask my phone to start the stream through Macronos.
It usually only takes a minute or so before the speaker dissapears from the Sonos app. I'd have to test some more with longer in between reactivation attempts but I don't think it is ever removed in EventGhost even if receiving a topolygy message.
Example from last time with Living Room being turned on:
08:10:03   --- EVENT Received --- ZoneGroupTopology from BRIDGE
08:10:03   RINCON_B8E93751634201400   192.168.0.130    Bathroom :coordinator -uuid:RINCON_B8E93751634201400_sub0000000028-
08:10:03   RINCON_B8E9371800D601400   192.168.0.129    BRIDGE (Invisible) :coordinator --
08:10:16   Main.EventGhost.Speakers.On
08:10:16      Speakers On
08:10:16   TellStickDuo.Speakers.ON u"selflearning-switch:gao.6"
08:10:48   --- EVENT Received --- ZoneGroupTopology from BRIDGE
08:10:48   RINCON_000E58B9705D01400   192.168.0.150    Living Room :coordinator -uuid:RINCON_000E58B9705D01400_sub0000000015-
08:10:48   RINCON_B8E93751634201400   192.168.0.130    Bathroom :coordinator -uuid:RINCON_B8E93751634201400_sub0000000028-
08:10:48   RINCON_B8E9371800D601400   192.168.0.129    BRIDGE (Invisible) :coordinator --
Re: SONOS Plugin Official (download here)
Posted: Mon Apr 14, 2014 3:09 am
by techoguy
Hi Telorast and egbaud,
it's going to take me a couple more days to test, fix, and add a few features. I've been sick all weekend.
Telorast,
thanks for the details. I'm running some more tests and it doesn't seem to be doing what it used to when I originally tested it. So i'll have to fix it and possibly change how the plugin decides if a ZP is added and removed. I'll be adding an action to select the "TV" source from PlayBars as well.
eqbaud,
Hopefully I can have you a version to test soon, sorry I wasn't able to finish it this weekend. I'll also be looking at the addition of the grouping action.
Thanks guys for your help.
Re: SONOS Plugin Official (download here)
Posted: Fri Apr 18, 2014 11:41 am
by jonasbegood
Hi techoguy,
Your latest release is working wonderfull

Thanks, you are doing a great job!
BTW, is there any way to group some ZP with EventGhost? I am building a Web GUI to make the my setup more user(wife) friendly, and I have added a button to start a playlist. But because of the delay I cant send a startplaylist command to each ZP as they would be out of sync. A command to Group ZP would be very usefull!
Re: SONOS Plugin Official (download here)
Posted: Sat Apr 19, 2014 6:40 am
by techoguy
Hi techoguy,
Your latest release is working wonderfull

Thanks, you are doing a great job!
BTW, is there any way to group some ZP with EventGhost? I am building a Web GUI to make the my setup more user(wife) friendly, and I have added a button to start a playlist. But because of the delay I cant send a startplaylist command to each ZP as they would be out of sync. A command to Group ZP would be very usefull!
Hi jonasbegood,
Thanks!
I'm currently working on a new action to add the ability to group.
In the mean time, if you want you can group ZPs by using the "PlayTrackURI".
To do this, record the UID of the ZP that will be the coordinator (the player the music will come from). The UID can be found in any of the ZP drop down lists in the actions. It'll look like this RINCON_000XXXXXXXXXX1400.
Now add the action "PlayTrackURI". Select the ZP you want to add to the group. in the URI text field put x-rincon:RINCON_000XXXXXXXXXX1400. Add another PlayTrackURI action for all other ZPs you want to add and use the same text for the URI feild: x-rincon:RINCON_000XXXXXXXXXX1400.
After this you should wait a few seconds to allow the ZPs to group before sending any more commands. Then you can send the StartPlayList action if you'd like.
Re: SONOS Plugin Official (download here)
Posted: Sat Apr 19, 2014 3:53 pm
by arjanm
Hello technoguy,
First of all, thank you for your work on this Sonos plugin,
Today I tried to use it with my Sonos Play:1, but unfortunately I haven't got it to work, yet.
If I can help you to do debugging, I am gladly willing to do so.
Below is a screenshot of what is happening.
My situation:
- Play:1 + Bridge
- Windows 7 x64
- EventGhost 0.4.1.r1640
- Before I started the testing, I disabled two other network devices, leaving only one wifi connection enabled.
- Downloaded the official Sonos Application, that one is working.
- Tried restarting my PC.
- Tried disabling the Windows Firewall and restarting EG.
I'm looking forward to control my Sonos device with Eventghost!
Re: SONOS Plugin Official (download here)
Posted: Sat Apr 19, 2014 4:18 pm
by egbaud
In the mean time, if you want you can group ZPs by using the "PlayTrackURI".
This works great! Thanks.
Do you plan to add a Master volume control action that will affect all the members of a group?
Re: SONOS Plugin Official (download here)
Posted: Sat Apr 19, 2014 6:06 pm
by techoguy
Do you plan to add a Master volume control action that will affect all the members of a group?
Hi egbaud,
I didn't have plans of doing that. Are you looking for a relative adjustment like the app or adjust all to a specific value? I can look into adding this.
Today I tried to use it with my Sonos Play:1, but unfortunately I haven't got it to work, yet.
Hi arjamn,
Thanks for the great details. You've tested everything that usually fixes the problem.
Is the 192.168.178.x the same subnet the Sonos system is on?
Do you know how to use wireshark? I would have see if you can capture the MSEARCH to see if the PC is actually sending it and the plugin is actually using the correct network.
Thanks guys.
Re: SONOS Plugin Official (download here)
Posted: Sat Apr 19, 2014 6:27 pm
by arjanm
Hello technoguy,
Thank you for your fast response,
192.168.178.xxx is the subnet of my Wifi-Modem/Router.
The PC is on 192.168.178.18, the Sonos Bridge is on 192.168.178.35 and the Sonos Play 1 is on 192.168.178.36.
I've never used Wireshark before, but I installed it and took a few screenshots displaying the two M-SEARCH actions, happening when the plugin is started.
Is this information useful for you?
Re: SONOS Plugin Official (download here)
Posted: Sun Apr 20, 2014 12:23 am
by egbaud
techoguy wrote:
Are you looking for a relative adjustment like the app or adjust all to a specific value? I can look into adding this.
Actually, I think I can make do with the functions you've already provided. Keeping track of what is grouped and adjusting the volume on each device separately should be fine.
Oh, except that there's no event to indicate when the Sonos controller has grouped or ungrouped. So maybe some additional thinking is needed about this...
Re: SONOS Plugin Official (download here)
Posted: Mon Apr 21, 2014 7:32 am
by Telorast
arjanm wrote:Hello technoguy,
First of all, thank you for your work on this Sonos plugin,
Today I tried to use it with my Sonos Play:1, but unfortunately I haven't got it to work, yet.
If I can help you to do debugging, I am gladly willing to do so.
Below is a screenshot of what is happening.
My situation:
- Play:1 + Bridge
- Windows 7 x64
- EventGhost 0.4.1.r1640
- Before I started the testing, I disabled two other network devices, leaving only one wifi connection enabled.
- Downloaded the official Sonos Application, that one is working.
- Tried restarting my PC.
- Tried disabling the Windows Firewall and restarting EG.
I'm looking forward to control my Sonos device with Eventghost!
I had the same problem. The way I solved it was to discconect all Sonos devices (it's usually the router that's the problem) and then connect them one by one again starting with the router.
A quick fix that mostly works is to just readd the router in the sonos app. Just click add device, click the router button and restart eventghost, see if it works.
Only problem is that the problem will re-appear as soon as you cut power to a device.
Re: SONOS Plugin Official (download here)
Posted: Mon Apr 21, 2014 9:44 am
by arjanm
Hi Telorast,
Thank you for your reply,
I've also been discussing this issue with technoguy in a pm conversation, but I'm open to any solution.
What do you mean with "Just click add device, click the router button"?
When I try to add a device, I see the screen as displayed in the screenshot.
Re: SONOS Plugin Official (download here)
Posted: Mon Apr 21, 2014 2:36 pm
by techoguy
Hi Telorast,
Do you mean re adding the Sonos bridge instead of the router?
And that's odd for you to have to do this anytime power is lost. I'm trying to figure out how I might be able to see what's going on to adjust the search.
Thanks both of you for helping debug this.