using a scene to play a mp3 with Sonos

Hello,

I have found this wiki for the sonos pluging:
[url=http://code.mios.com/trac/mios_sonos-wireless-music-systems/wiki#]Sonos Wireless HiFi Music Systems

But the explanation is quite different as the options I have in my vera.
I cannot find the " SetFileToPlay" , the only thing which resembles is “SetURIToPlay” is that the same?
also the “play” option has other options as in the wiki :-s , I have “PlayURI” and “play”, but play has options speed and instance ID…

Do I have an older version , how do I check,or am I doing something very wrong?

Attached a screenshot

Many thanks,
Cor

Been busy the whole day trying to sort it out , but no luck. :frowning:

The last thing I did now was delete the sonos device, downloaded the zip file from the wiki page and uploaded again all the files to the vera and restarted luup. Created a new device and tried to make a new scene , but i don’t have the SetFileToPlay option , also I have different “play” options , on play option in “…serviceID:AV transport” and also a play option in “… serviceID:medianavigation” … which one to use?

I attached a screenshot of the first options where the “SetFileToPlay” should be.

Anyone has an idea where it is gone? :frowning:

Thanks,
Cor

Hello

Here is my test scene that works. Mp3 file is saved in my NAS-box. Very important is to use text in red “circle” x-file-cifs:// in the begin of the file path name. Without that Sonos can’t find my files.

@ Jukka:

Thanks for looking into this for me … so how it is explained in the wiki with “SetFileToPlay” that is wrong …
I will try to do this tomorrow, since I am about to go to work now.

All these options I have in my advanced settings, so I am very curious!

Thanks for your help,
Cor

I am getting there :slight_smile:

Jukka’s solution worked almost for me. I noticed the file was not played , just loaded.
When I used th option “PlayURI” this worked best ,I also could insert a volume and the file was automaticallyplayed :slight_smile:

[s]BUT:
I noticed when a music station or library is played and than via a scene in vera this mp3 file is played, all stops afterwards, the music does not continue to play.

How can I change this. For info , I use this scene as a doorbell.

-Music is playing in the kitchen (radio station or from music libary)
-scene is activated via vera to play doorbell.mp3 file (10 seconds)
-I would like that the sonos continues to play what is has been playing before.[/s]

*EDIT: I found the option “SavePlaybackContext” and " RestorePlaybackContext", this does this exactly.

Is there also an option to play an mp3 sound 2 or 3 times before the radio station or music libabry is started again?

Another thing I see, you can group via the option “PlayURI” it would be nice if all sonos in my house would play the doorbell at once and than continue what they were doing.
How do I use this “group” function? do I insert device ID , or device name?

Many thanks, ;D
Cor

Attached the screenshot about the option I would like to use , grouping 2 or more sonos devices , so they play the mp3 file in sync.

Anyone has an idea what to insert in the option "group devices

Thanks,
Cor

SetFileToPlay was recently suppressed. The wiki was not updated. SetURIToPlay can be used rather than SetFileToPlay.

IMHO, the main entry point to be used is PlayURI.

SetURIToPlay is slighty different: main difference is that the URI is loaded but playback is not started. And you cannot manage the volume or group several Sonos at the same time, everything you can do using PlayURI.

No, this option does not yet exist. What could be the usage ?

Another thing I see, you can group via the option "PlayURI" it would be nice if all sonos in my house would play the doorbell at once and than continue what they were doing. How do I use this "group" function? do I insert device ID , or device name?

Device ID.

http://forum.micasaverde.com/index.php/topic,12860.msg96511.html#msg96511
It was explained by guessed for the Say action, but it is now the same principle for PlayURI.

@ Lolodomo , wondefull , it works !!!

somehow I missed that thread :-s

For playing a file 2 or 3 times, that would be usefull for a doorbell for example, but i can also easily make the mp3 file a bit longer… so , it is not important :slight_smile:

For a future reference , if I have another sonos , what do I insert in the group function, do I seperate with a space, coma, coma + space etc.

like this:

92, 103?

Many thanks,
Cor

Hey Jukka !

please put here a example of url to play a mp3 from a network hard drive.

thanks…

Hello Piwtorak

Here is my url to play mp3 from my nas: (URIToPlay) x-file-cifs://192.168.1.xx/Disk 1/Vera/Messages/Worf.mp3

I am using above to test my messages (test scene to test my Sonos messages)

Hi Jukka

perfect … thanks that code is running fine

now the challenge is a line to play a determined radio on line. do you have this ? this radio appears in favorite radios in vera already.

the idea is have scenes to change radio and start it by the homewave app avoiding to enter in sonos app

FR:station name

I have created a help tab on the device, you can look at it to get some of the required url

Anybody know how/where to store a small mp3 on the Vera itself and have it playback like this? i.e. use the PlayURI and point it to a URL on Vera?

In /www (or a sub-directory) which corresponds to the root of the Vera WEB server.