We have moved at community.getvera.com

Author Topic: Making a Sonos Play an Alert Message  (Read 2018 times)

Offline parkerc

  • Beta Testers
  • Sr. Hero Member
  • *****
  • Posts: 2479
  • Karma: +35/-48
  • Life Moves Pretty Fast....
Making a Sonos Play an Alert Message
« on: March 11, 2013, 06:55:41 pm »
Hi Lolodomo

Looking at your recent wiki update..

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

Code: [Select]
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 ?

« Last Edit: March 11, 2013, 06:57:12 pm by parkerc »

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Making a Sonos Play an Alert Message
« Reply #1 on: March 11, 2013, 07:01:49 pm »
You could put your files in /www or a subdirectory.
Then use file://veraip/... as URI.

Offline lolodomo

  • Moderator
  • Master Member
  • *****
  • Posts: 3484
  • Karma: +74/-10
Re: Making a Sonos Play an Alert Message
« Reply #2 on: March 12, 2013, 09:30:31 am »
Sorry, the URI to be used is more: x-rincon-mp3radio://<veri IP>/file.mp3
It is what it is done for the TTS feature. The MP3 file is produced in /www directory.