We have moved at community.getvera.com

Author Topic: Sonos plugin  (Read 381601 times)

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Sonos plugin
« Reply #135 on: June 08, 2012, 04:46:50 am »
Screenshot of the Sonos Plugin in action.

1) Create New Scene
2) Call it 'Play Sonos'  - or go with what ever you want :-)
3) Go to the Advanced option/tab
4) Select the Sonos Living Room device (or what ever you've called it)
5) Click Add
6) Then from the drop down options list created below, Choose 'Setfiletoplay' and enter in the full location of that file on the NAS (pus I always ensure it's one Sonos can see too) -e.g.  //192.168.1.10/media/Music/Mp3s/Changes.mp3

Now you have selected the file, you now need to tell the Sonos you want to play it

7) Select the Sonos Living Room device again (or what ever you've called it)
8) Click Add
9) Then from the drop down option list created below,  Choose 'Play'
10) Confirm Changes & Save

Now you should have a scene that once run, will play the track you've selected.

* Interesting to note, the above will bypass the Sonos queue process and will just play the selected track only/
* if you know the length of the track being played you can set a delay to occur e.g 3.45mins and set another file to play - that seems to work well.
* The above avoids any use any coding, as I'm still learning so i hope the above helps

Screenshot below

@guessed - having this on the wiki would be a huge help, a picture tells a thousand words as they say :-)

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Sonos plugin
« Reply #136 on: June 08, 2012, 09:52:53 am »
.
At 11 pm every night
Arm motion and door sensors downstairs
If tripped, play <this> mp3 and send notification To me
At 6 am every morning
Disarm motion and door sensors downstairs
That's two different Scenes, both with time based event triggers.

The first has a time (scheduled) trigger for 11pm, with an action of Playing the Tune on the Sonos, and a Notification associated.  It needs a liitle bit of Lua to detect the Sensor Tripped state and, if set, it'll return false to stop the scene from continuing.

The second is similar, but simpler since its unconditional.  You just list the set of actions for the time trigger of 6am.

Quote
Is there good posting out there on (an idiots guide to) understanding Scenes, Triggers & Schedules ? I've looked at the MiOS guide and the Wiki, but they do not seem to help when things get a little more complex than just an on or off command.. Are Scedules and triggers only every aligned to a specific scene ?
Not that I've seen.  There are fragments of doc here and there but nothing really cohesive.

Offline big517

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: Sonos plugin
« Reply #137 on: June 08, 2012, 11:07:40 am »
So playing a file bypasses, the queue, but what does it do once the file is done being played?

If i'm playing Pandora for example, will it resume the song, or start over?

Can you specify a Radio station to play with this command?  I have a couple in favorites that I would love to specify directly.

Thank you,

Offline anker

  • Full Member
  • ***
  • Posts: 107
  • Karma: +0/-0
Re: Sonos plugin
« Reply #138 on: June 08, 2012, 04:00:19 pm »
The setfiletoplay uses the seturi... Fnction of the sonos upnp api, thus meaning that the queue is not touched. A sosos function for returning to previous has not been implemented though...

Playing radio stations and other streaming sources has not been implemented. Could fairly easy be, I will implement this as the next implementation.

Regards,

ankere

Offline big517

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: Sonos plugin
« Reply #139 on: June 08, 2012, 04:07:22 pm »
Thank you very much!  This is all i'm waiting for :)

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Re: Sonos plugin
« Reply #140 on: June 08, 2012, 04:27:45 pm »
@Anker = If you're able to make it select a Sonos Playlist i define, that would be cool too :)

@guessed - thanks again for your help, I've been doing my best to try and do as much as I can in MiOS via the Vera UI rather than resorting to code (a) because I'm not clever enough to be a programmer and b) I'm curious how far MCV are away from making their product usable by almost anyone :-) .

Ok, here goes - In an attempt to use my Sonos as a Siren (using siren.mp3) - I thought the following might work..

1) Create a scene called 'Armed' that arms the motion and door sensors at a Scheduled time of 11PM
2) Create another scene called 'Sonos Alarm' that is triggered bythe tripping any of any armed sensors and then plays a track on the Sonos.

Question : if multiple triggers are listed does it require all the listed triggers to be met or either of them (an AND or an OR) ?  If both then I guess I would have to create a 'Sonos Alarm' (with an armed only trigger + song) for all the sensors?

3) Create a scene called 'disarm' that puts all the motion and door sensors into Bypass state at a Scheduled time of 6AM

What do you think ?



Offline aschwalb

  • Hero Member
  • *****
  • Posts: 590
  • Karma: +0/-1
Re: Sonos plugin
« Reply #141 on: June 08, 2012, 05:09:33 pm »
@Anker = If you're able to make it select a Sonos Playlist i define, that would be cool too :)

@guessed - thanks again for your help, I've been doing my best to try and do as much as I can in MiOS via the Vera UI rather than resorting to code (a) because I'm not clever enough to be a programmer and b) I'm curious how far MCV are away from making their product usable by almost anyone :-) .

Ok, here goes - In an attempt to use my Sonos as a Siren (using siren.mp3) - I thought the following might work..

1) Create a scene called 'Armed' that arms the motion and door sensors at a Scheduled time of 11PM
2) Create another scene called 'Sonos Alarm' that is triggered bythe tripping any of any armed sensors and then plays a track on the Sonos.

Question : if multiple triggers are listed does it require all the listed triggers to be met or either of them (an AND or an OR) ?  If both then I guess I would have to create a 'Sonos Alarm' (with an armed only trigger + song) for all the sensors?

3) Create a scene called 'disarm' that puts all the motion and door sensors into Bypass state at a Scheduled time of 6AM

What do you think ?




Pretty sure they are OR.  Like your idea, be sure to post results as I want to do the same thing...

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Sonos plugin
« Reply #142 on: June 10, 2012, 06:35:03 pm »
I've added the example Scene script & screenshot from @parkerc to the wiki.  Thanks for that, it should help future users!

Offline big517

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 576
  • Karma: +1/-4
Re: Sonos plugin
« Reply #143 on: June 26, 2012, 08:07:06 am »
Hello, any update on the "play radio station" or pandora station? 


Thanks!
 2

Offline vda

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Sonos plugin
« Reply #144 on: July 03, 2012, 05:30:35 pm »
Hi, Got a pb installing the plugin files. Need some support.

No drop down options list created ! Only Poll, Remove... nothing specific to sonos plugin as  SetFileToPlay or Play...

Do you know how to check good upload of files ? I have Plugin 15 files with UI5.
Can you send me a capture of your device parameters if it works for you ?

Thx

Offline mclass

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +6/-1
Re: Sonos plugin
« Reply #145 on: July 04, 2012, 03:43:59 am »
Hi, Got a pb installing the plugin files. Need some support.

No drop down options list created ! Only Poll, Remove... nothing specific to sonos plugin as  SetFileToPlay or Play...

Do you know how to check good upload of files ? I have Plugin 15 files with UI5.
Can you send me a capture of your device parameters if it works for you ?

Thx

Like vda, I'm experiencing an identical problem with Vera2 (firmware 1.5.346).  I have read (and re-read!) this thread (some of which is a bit beyond me as a newcomer!) and have followed the instructions in the code.mios.com/trac/mios_sonos-wireless-music-systems wiki.

The wiki has me a little confused, as it states "Vera with UI4 has only been tested", but this thread indicates success with U15. 

The wiki also states to download the "4 plugin files in the trunk version 13", but following the link gets me to trunk version 15.

Is it possible I've got the wrong plug-in files, or does the wiki need an update?

I am also a little confused about which IP address I should be using - I have a Sonos Zone Bridge, with two Player 5's paired as a stereo pair.  Each device has its own IP address, and I am confused as to which of these I should be using.  If I "unpair" the P5's, I still get the three IP addresses.

Any assistance would be appreciated!

Offline jtmoore

  • Full Member
  • ***
  • Posts: 171
  • Karma: +2/-1
Re: Sonos plugin
« Reply #146 on: July 07, 2012, 04:43:16 pm »
Hi, Got a pb installing the plugin files. Need some support.

No drop down options list created ! Only Poll, Remove... nothing specific to sonos plugin as  SetFileToPlay or Play...

Do you know how to check good upload of files ? I have Plugin 15 files with UI5.
Can you send me a capture of your device parameters if it works for you ?

Thx

I got the same missing items in dropdown list on Vera Lite UI5 v1.5.346 with the Sonos trunk 15 files.  I then tried the trunk 14 files from trunk-14_UIV5.zip  that I found on page 7 of this other thread: http://forum.micasaverde.com/index.php/topic,8505.msg62780.html#msg62780
This fixed the problem for me and now I am happily using the Sonos plugin. Hope this helps.
Regards,
jtmoore.
jtmoore

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: Sonos plugin
« Reply #147 on: July 08, 2012, 10:19:04 am »
I'm on UI4, followed the wiki instructions, and don't have the proper 'play' options in the scene.  Do I need different config files?  help!

Offline mclass

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +6/-1
Re: Sonos plugin
« Reply #148 on: July 10, 2012, 01:43:56 am »
Thanks to jtmoore's post above, I've now got the commands back in the "Advanced" scene creation page in UI5 (this may also solve Intrepid's problem although he's using UI4).  There appears to be an issue with the Trunk 15 files?

Now to get the Sonos responding.  Any tips on which of the three IP addresses I should be using (see my post of July 3)?

Offline anker

  • Full Member
  • ***
  • Posts: 107
  • Karma: +0/-0
Re: Sonos plugin
« Reply #149 on: July 10, 2012, 01:58:48 am »
Thanks to jtmoore's post above, I've now got the commands back in the "Advanced" scene creation page in UI5 (this may also solve Intrepid's problem although he's using UI4).  There appears to be an issue with the Trunk 15 files?

Now to get the Sonos responding.  Any tips on which of the three IP addresses I should be using (see my post of July 3)?

Hi,

Glad you figured it out yourself. I only have UI4 myself and trunk 15 has not been made by me... I believe that it was made to make it compatiple with UI5.

Anyway - I do not have the setup you have, but pls test the various possibilities and report back. I can update the wiki with your findings.

regards,

Anker