Conditional execution in Smart App from multi sensor


(Wayne Myers) #1

Hi,

I’m new to the SmartThings family and have been trying to amend the existing Sonos Speaker app so that when vibration is detected on the door using the accelerometer function a ring is played across my speakers. In other words a make shift door bell.

The default app works for what I want but every time the door is opened a sound is played as well, so i thought tinkering with the code using some if statements would allow me to get the desired affect.

However, I can not figure out how to pass the state of the sensor.

What I would like to do is

If sensor is in closed state, and accelerometer is active then play sound on speaker else take no action.

Also, is it possible to host my own sound file in drop box or similar so that I can have a custom ring chosen. I see that the default Sonos app using S3?

Thanks in advance