As the topic of the title says, I’d like to suggest adding functionality to the existing Sonos device integration, specifically, add the capability.alarm siren() function.
This would allow us to use our existing Sonos zone players and speakers as sirens with, amongst other things, the new Smart Home Monitor smartapp.
I envisage the implementation utilising a SmartThings hosted MP3 file for the siren sound.
The Devicetype should allow the user to select the volume to be used for the siren function (default it to something high, but not so high as to give first time users a heart attack when they test… ).
For bonus points , provide a selection of siren recordings to choose from (e.g. old style alarm bell, klaxons, air raid siren, modern wailing siren, sci-fi / electronic siren, etc.).
For double-bonus points , in addition to the above, allow the user to specify their own siren file via URL (which, of course, needs to be resolvable by the Sonos device in question).
For triple-bonus points , add intelligence to the off() function as follows - if the Sonos device was playing anything prior to the Siren() call (other than another prior Siren() call), rather than turning the Sonos off (stopping all playback) it should resume playing whatever was originally playing. (This would be my attempt to overcome the overloading of the off() function across capabilities).
Given the way off() is overloaded across multiple capabilities, it may be necessary to mark/track certain functionality as “resumable” vs. “non-resumable”. Normal music, from whatever source, should be resumable. Sirens, though, should probably be non-resumable - a siren event may be overridden by a speech-synthesis event (announcement), in which case the siren probably shouldn’t resume (I’m trying to think through use-cases…). Maybe this also needs to be a user selectable option to cater for other peoples’ use-cases.