I have Sonos integration set up with my SmartThings system.
When the Home Monitor is set to “armed” and there is an intrusion detected, there is an option to play an alarm on the Sonos speakers in the house.
However, the only options are “bell”, “dogs barking”, “fire alarm”, “piano”, “lightsaber” or to read a custom message.
I’ve selected “Fire Alarm”, but I’ve got two problems:
(1) the Fire Alarm sound is not high pitched enough for our needs. I’d like to upload my own siren sound but can’t work out how to do this.
(2) the Fire Alarm sounds for only about 20 seconds. I need it to last for a least 60 seconds to scare away any burglars.
Please would someone mind helping me with these issues?
I don’t believe there is a way to upload your own sounds for this purpose.
What you could do to get a longer alarm is create multiple Routines - one that sounds the fire alarm immediately, one that sounds the alarm 20 seconds after the intrusion, and another that sounds the alarm 40 seconds after the intrusion, giving you 60 total seconds.
The audioNotification capability of the new Sonos Edge Driver (still in Beta, and with some significant unresolved issues) incorporates the playTrack, playTrackAndResume, and the playTrackAndRestore commands, all of which are capable of playing a track of your choosing from a remote URL.
While none of these commands can be executed via Home Monitor or Routines, they are executable via a Rule or API call. So, as a workaround, you could have an intrusion turn on a virtual light switch that would in turn trigger a rule to play the desired sound. Probably not exactly the simple solution you were looking for, but it can be done.
@bthrock do you by any chance have a link to the Sonos Edge Driver documentation? I can’t seem to find it online
@RJGill84 good idea regarding the multiple routines. Please can you advise how to create this? In the Home Monitor, there is an option for “delay response”, but I can’t find this in Routines
There is no driver specific documentation. Like any device, you can explore its commands and capabilities using the SmartThings CLI or the API Browser+, and use that in combination with the API Production Capabilities to formulate your rule or API call.
Below is an example of a Rule that will play a designated track when triggered by a momentary switch. You would, of course, would need to replace the device placeholders for the virtual switch and the speaker with the actual device UUIDs. (For example, "{{sonosOffice}}" would have to be replaced with something like "6f65cb06-ce41-b794-6321502d343f") You would also have to supply an appropriate URL for the desired track.
However, I’m not certain this will work here, depending on how the API actually executes the commands (sequentially or in parallel). I haven’t actually tested this, and if your code is working, there’s no reason to bother with this. I just thought you might the concept useful as you develop more rules down the road.