We have moved at community.getvera.com

Author Topic: Beta 2 version of the Sonos plugin released  (Read 8886 times)

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Beta 2 version of the Sonos plugin released
« on: November 10, 2013, 12:43:07 pm »
A new update of the Sonos plugin is now available.
You can download the ZIP file at the bottom of this page: http://code.mios.com/trac/mios_sonos-wireless-music-systems/browser/tags/beta2#
Please note that the "services" subdirectory in this archive is unnecessary.

Here are the changes:
  • Settings tab replaced: you can now discover your Sonos on the network and select one of them
  • New icons added for Playbar and Play:1
  • Fix for playback of Sonos playlists
  • Fix of selection box in the Player tab when using Internet Explorer
  • New table added at the bottom of the Help tab displaying the value of four variables
  • New actions added: StartSonosDiscovery, SelectSonosDevice and SearchAndSelectSonosDevice
  • New action implemented: GetPositionInfo; it updates the variable RelativeTimePosition
  • Variables suppressed: AbsoluteTimePosition, RelativeCounterPosition and AbsoluteCounterPosition
  • Alert action: default value for the duration parameter is now 0, meaning no duration limit
  • UPnP request fixed (order of arguments, used charset, check of action existence, ...)
  • Lots of code relative to UPnP/DLNA and UPnP event proxy management moved to the library L_Sonos1.lua
  • AVTransport and RenderingControl services enhanced with few missing DLNA state variables and actions

I updated the wiki to explain how to discover your Sonos: http://code.mios.com/trac/mios_sonos-wireless-music-systems/wiki/WikiStart#HowTo
« Last Edit: November 10, 2013, 01:22:22 pm by lolodomo »

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: Beta 2 version of the Sonos plugin released
« Reply #1 on: November 15, 2013, 06:13:28 pm »
hello lolodomo,

I finally had some time to work again a bit with vera and sonos. An older version was previously installed and I followed this guide:
http://code.mios.com/trac/mios_sonos-wireless-music-systems/wiki/WikiStart#HowTo  I did not remove any files , I just wrote over it I guess.

Sonos is working well and I see the changes.

But playing a file through a scene doesn't work for me, I don't have the option SetFileToPlay , the only thing what resembles it is Set URI to play

Initially I though I did something wrong , so I did the whole procedure once more. But still the same.
What did I do wrong?

Attached a screenshot of the first items I can select.


I also notice an option "set group volume" , "snapshot volume" and "set relative volume"     
My goal is to group all sonos devices and go all to 80% of volume play an mp3 sound afterwards go back to previous group or no group and also previous volume and play what was playing before or not.
Is this possible?

many thanks,
Cor

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: Beta 2 version of the Sonos plugin released
« Reply #2 on: November 18, 2013, 07:40:52 am »
Hmm, I tried toplay a file with "URI to play"   ,but no luck , nothing happends.
Attached a screenshot.

I also uploaded the file again according the the wiki.

Anyone knows what's wrong?

(In an old previous version of the sonosplugin it was working, I had to use this "x-file-cifs://HEUBERGAUMAIN
/media/sound_effects/doorbell.mp3
"
Hope someone can help ,because with this fresh installation of the plugin I don't have a doorbell anymore :-s

Thanks,
Cor

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 2 version of the Sonos plugin released
« Reply #3 on: November 18, 2013, 07:53:37 am »
As you mention, you have to use "x-file-cifs:..." as URI to play a file from one of your Sonos share.

Volume 5 is very very low...

The second command, Play, is not necessary, as PlayURI will start the playback.

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: Beta 2 version of the Sonos plugin released
« Reply #4 on: November 18, 2013, 09:09:32 am »
Great, it is working with the xfile url . ( in the wiki it says I should use the command  "set file to play")

The volume 5 ,is just to test ,since I am 5500nm away from home and don't want to scare the person watching my house  :P

Some more questions if you don't mind.

The plan is to make again a scene for a doorbell,with this new version of the plugin.

-Save what every sonos is playing and volume at the present time. (save playback content?)
-group all devices (living room= ID 150 , bedroom=ID154 , Hobbyroom=ID 153)
-the controlling sonos will be the hobbyroom
-set volume to 75% ( if possible)
-Play file: x-file-cifs://10.0.0.20 /media/sound_effects/doorbell.mp3
-after 15 seconds  go to previous grouping (most likely ,no grouping at all)
- restore what was playing before including the volume (restore playback content?)


I tried it with 2 sonos devices , but the grouping doesn't work and also not the restore playback content.
What I am doing wrong? ( attached a screenshot).

For the volume ,I see there is an option "set relative group volume"  do I understand it correctly , I can set the volume from all devices to for example 75%?  If yes , where do I insert this command? and I guess just the number 75?

And the last question, is it possible to play a radiostation from a scene? , which command would that be?

many thanks for your help,
Cor

« Last Edit: November 18, 2013, 09:12:27 am by Cor »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 2 version of the Sonos plugin released
« Reply #5 on: November 18, 2013, 10:02:50 am »
All your scenario can be done easily just calling action Alert with the right parameters (duration, volume, group zones, ...) ;)

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: Beta 2 version of the Sonos plugin released
« Reply #6 on: November 18, 2013, 10:12:59 am »
Oh perfect !!!! That works really well , much easier than how I had set it up.

A question though, since I cannot test the volume .... (I am a bit too far away from home for that  :P)
The volume, are those percentages of the max volume? If not , how does it work with the different sonos devices ( Play 5 , 3 and connect).


And the last question; is it possible to play a radiostation from a scene? , which command would that be?

Thanks,
Cor

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 2 version of the Sonos plugin released
« Reply #7 on: November 18, 2013, 11:55:06 am »
A question though, since I cannot test the volume .... (I am a bit too far away from home for that  :P)
The volume, are those percentages of the max volume? If not , how does it work with the different sonos devices ( Play 5 , 3 and connect).

I think the volume for all Sonos is a value from 0 to 100. But that is to be checked.

Quote
And the last question; is it possible to play a radiostation from a scene? , which command would that be?

Yes and no. It depends what kind of radio service you want to use.

Remember that I provided a Help page on each device that can help you finding the URI to be used.

For any radio station that is in your radio favorites, you can use "FR:<name>" whene <name" is the name of your station in your favorites.

For any web radio (if not in your favorites), just provide its HTTP URL, replacing http by x-rincon-mp3radio.

For any TuneIn radio, use "TR:<xxxx>" where <xxxx> is the ID of the TuineIn station. You can find this ID checking the URI displayed in the help page in the table at the bottom.

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: Beta 2 version of the Sonos plugin released
« Reply #8 on: November 18, 2013, 10:07:33 pm »
Excellent, everything working very well, also playing the radiostation. 

Many thanks, great update of this plugin , it works much easier!

Cor


Offline joe144

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Beta 2 version of the Sonos plugin released
« Reply #9 on: November 28, 2013, 04:12:35 pm »
I've installed sonos plugin beta2 but i have a problem when i try to control the volume of my play5.
When i click "mute" button in the UI5 or that i change the volume, a popup appears with "invalid service" message inside.

All the other buttons are working (play, pause, next, etc...).

What can i do to fix it ?


I'm using vera lite v1.5.622 (UI5) + UPNP proxy event v5.0.

Offline joe144

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Beta 2 version of the Sonos plugin released
« Reply #10 on: November 28, 2013, 04:27:14 pm »
Another thing, in the "Player" tab -> "Text To Speech", if i write a text and click "Say" button.
My play5 will stop playing music for few seconds. And Sonos plugin will display "Stream:   Say.124.mp3" but play5 doesn't play anything.
And Sonos application on my computer display this message : Unable to play 'Say.124.mp3' - Station not found.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Beta 2 version of the Sonos plugin released
« Reply #11 on: November 29, 2013, 06:56:18 am »
joe144 , that looks like a bad installation of the plugin.
Please follow the installation guide on the wiki page.

Offline joe144

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Beta 2 version of the Sonos plugin released
« Reply #12 on: November 29, 2013, 05:59:26 pm »
I've checked again the wiki and i've missed to upload few files :
S_SonosAVTransport1.xml
S_SonosContentDirectory1.xml
S_SonosGroupRenderingControl1.xml
S_SonosMusicServices1.xml
S_SonosRenderingControl1.xml
S_SonosZoneGroupTopology1.xml

I've uploaded them, deleted the device and created a new one.

Now i'm able to "mute" and change the sound volume.
But i still have the "Say" problem :
In the "Player" tab -> "Text To Speech", if i write a text and click "Say" button.
My play5 will stop playing music for few seconds. And Sonos plugin will display "Stream:   Say.125.mp3" but play5 doesn't play anything.
And Sonos application on my computer display this message : Unable to play 'Say.125.mp3' - Station not found.

Do you know what could be the problem ?

Offline SteveZ

  • Sr. Member
  • ****
  • Posts: 328
  • Karma: +4/-1
Re: Beta 2 version of the Sonos plugin released
« Reply #13 on: November 29, 2013, 06:03:23 pm »
Have you uploaded the silence.mp3 via winspc to vera? Also make sure the secure this vera in the setup tab in the vera ui is unchecked

Offline joe144

  • Sr. Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
Re: Beta 2 version of the Sonos plugin released
« Reply #14 on: November 30, 2013, 03:35:41 am »
Yes, the file Sonos_silence.mp3 is in the directory /etc/cmh-ludl/
The "secure this vera" was checked so i have unchecked it. But it still doesn't work.