Making a Sonos Play an Alert Message

Hi Lolodomo

Looking at your recent wiki update…

This functionality is exposed declaratively through the Alert action under Advanced Scenes. The functionality is also exposed programmatically via Lua code:

luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Alert", {URI="x-file-cifs:...", Volume=50, Duration=15, GroupDevices="667,668"}, 666)

This action will pause the current playback, play the alert, and then the playback will be resumed.

By using the GroupDevices parameter, it is even possible to play the alert on several Sonos zones at the same time. This parameter represents a CSV list of deviceId’s of other Sonos units that should be included during the save-play-restore model of the Alert command.

Is it possible to have the Alert mp3/wav file stored or Vera so it is all self contained, requiring no external dependancy on a NAS or PC etc.? (I seem to recall the SAY command downloads and stores the TTS file on Vera?)

If so where is the best location to put an Alert/Siren file on Vera and how could I call it is CIFS for example is not supported ?

You could put your files in /www or a subdirectory.
Then use file://veraip/… as URI.

Sorry, the URI to be used is more: x-rincon-mp3radio:///file.mp3
It is what it is done for the TTS feature. The MP3 file is produced in /www directory.