I’m sure its here somewhere but I cant find it I want to use a motion sensor outside my front door to trigger a specific track " dog barking" and play it on a specific sonos speaker when then returns to what it was playing after the track plays.
I never got it to do this. This is one of the frustrating characteristics of the Sonos interface. It also has issues when speakers are grouped. Also, the volume doesn’t return after the dogs bark, unless these issues were fixed without my knowledge.
There are four lines of code that need to be added for each new clip that you want to add.
The first is adding the name of the clip that you choose in the app.
Look for input actionType around line 80, add a name for the clip.
Ex: "Rave Horn",
The second set of lines is contained in the loadText method, this is where you set the URL that matches your new entry above.
case "Rave Horn":
state.sound = [uri: "http://www.myinstants.com/media/sounds/air-horn-club-sample_1.mp3",duration:"1"]
I get the duration from playing the clip in a browser.