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.

SONOS Plugin Official (download here)

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

Re: SONOS Plugin Official (download here)

Post 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!
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 »

"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.
sonosApp.JPG
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post 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!
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: 46
Joined: Wed Feb 27, 2013 2:44 pm

Re: SONOS Plugin Official (download here)

Post 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 --
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post 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.
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!
jonasbegood
Posts: 8
Joined: Sat Feb 22, 2014 10:32 pm

Re: SONOS Plugin Official (download here)

Post by jonasbegood »

Hi techoguy,

Your latest release is working wonderfull :D 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!
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post by techoguy »

Hi techoguy,

Your latest release is working wonderfull :D 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.
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!
arjanm
Posts: 13
Joined: Sun Feb 17, 2013 4:50 pm

Re: SONOS Plugin Official (download here)

Post 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!
Attachments
Sonos Plugin.png
egbaud
Posts: 35
Joined: Tue Mar 18, 2014 1:30 am

Re: SONOS Plugin Official (download here)

Post 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?
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post 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.
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!
arjanm
Posts: 13
Joined: Sun Feb 17, 2013 4:50 pm

Re: SONOS Plugin Official (download here)

Post 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?
Attachments
Wireshark_2.png
Wireshark_1.png
egbaud
Posts: 35
Joined: Tue Mar 18, 2014 1:30 am

Re: SONOS Plugin Official (download here)

Post 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...
Telorast
Posts: 46
Joined: Wed Feb 27, 2013 2:44 pm

Re: SONOS Plugin Official (download here)

Post 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.
arjanm
Posts: 13
Joined: Sun Feb 17, 2013 4:50 pm

Re: SONOS Plugin Official (download here)

Post 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.
Attachments
Sonos.png
techoguy
Experienced User
Posts: 157
Joined: Mon Mar 18, 2013 1:32 am

Re: SONOS Plugin Official (download here)

Post 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.
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