Sonos Custom Message

I’m very new to this but I’ve already created multiple IFTTT and SmartThings labs etc… but one thing I can’t figure out is how do I have my sonos speaker play a custom message at a given date/time?
When using IFTTT it only turns on the sonos.

Thoughts? Thanks in advance!

(What I own so far: Sonos, SmartThings water sensors, Hue bulbs, & have IFTTT login)

Here’s a most basic custom Sonos app whereby you can select a Sonos Player for standard modes.

  1. During Home/Away mode, you may want to use your Family Room Sonos.
  2. During night, you may want Bedroom Sonos to play notification.

Currently, this shabby app will allow you to select Sonos for modes, play any contact sensor status when changed from open/close and of course the mode changes. In the process of extending it but this will give you the basic idea… The messages are hardcoded as of now but you can change it and make it much friendlier… This is very basic.

// Automatically generated. Make future change here.
    name: "Sonos Notifier",
    namespace: "rsarkar",
    author: "Ron Sarkar",
    description: "Sonos Notifier",
    category: "My Apps",
    iconUrl: "",
    iconX2Url: "",
    iconX3Url: "")

preferences {
	section {
		input "sonos1", "capability.musicPlayer", title: "Sonos Device for Home Mode?", required: true
	section {
		input "sonos2", "capability.musicPlayer", title: "Sonos Device for Away Mode?", required: true
	section {
		input "sonos3", "capability.musicPlayer", title: "Sonos Device for Night Mode?", required: true
	section("Choose one or more doors..."){
		input "doors", "capability.contactSensor", title: "Doors?", required: false, multiple: true

def installed() {
	log.debug "Installed with settings: ${settings}"

def updated() {
	log.debug "Updated with settings: ${settings}"

def subscribeToEvents() {
	subscribe(doors, "contact", doorEventHandler)
    subscribe(location, modeChangeHandler)

def doorEventHandler(evt) {
	//log.debug "Current mode = ${location.mode}"
    def msg = "$evt.displayName is $evt.value";
    log.debug msg;
    switch (location.mode) {
        case 'Home':
        	log.debug ("Home Mode is Home");
            playNotification(sonos1, msg);
        case 'Away':
            log.debug ("Home Mode is Away");
            playNotification(sonos2, msg);
        case 'Night':
            log.debug ("Home Mode is Night");
            playNotification(sonos3, msg);

def modeChangeHandler(evt){
	playNotification(sonos2, "Home mode has changed to ${location.mode}");

private playNotification(player, msg){
    log.trace "Playing $msg on $player";
    state.sound = textToSpeech(msg instanceof List ? msg : msg)
    player.playTrackAndRestore(state.sound.uri, state.sound.duration, 50);	

Just do the Sonos Custom Message, and just select on a schedule. I do it to remind me to take the garbage to the curb each week and it works great.

THRASH99ER, what am I missing? I can’t seem to do it that easily. Go into SmartThings app, then what? It seems I have to go into the water sensor and activate the alarm using sonos custom message. What’s the path you’re taking? THANKS!!!

Crap, I think I just figured it out. It was too easy. Thanks THRASH99ER and SMARt for responding

This is a great use of the Sonos notifications, @thrash99er. I am definitely trying this.

For other readers, this can done done with the SmartApp “Sonos Notify with Sound” in SmartThings Labs.