Need help with stopping alarm for wake-up alarm


#1

I’m trying to set up a wake-up alarm using the Dome siren for my kids. I’d ideally like to have the siren continue until the kid does something – activates a motion sensor, pushes a button (though I don’t have one yet) – to prove that they are actually awake and out of bed.

I’ve used the siren/strobe function and have set it to last 5 minutes by default, but that’s just too long – I need a way for them to be able to silence it by performing an action.

I’d ideally like to use a shorter-length sound and have it loop indefinitely (continue to make the sound over and over again).

Then, I want the siren or sound to stop looping when it checks and sees that a certain motion sensor has detected motion in the last few seconds (not sure what’s optimal there).

I’ve included my likely sorry attempt here – I don’t understand exactly what happens with “repeat piston” when the original trigger was a particular time. Anyway… your help is appreciated.


#2

Inside the every day do you could add a while loop.


#3

Thanks for the quick response. Unfortunately, I don’t know how to put a While loop in at all, much less within the timer trigger. Can you tell why I belong in the “Help!” section :wink:

Could you spell it out in a little more detail, please? It looks to me like the timer trigger doesn’t allow me to specify other conditions (like that the motion sensor is inactive), but this seems like something that should be do-able.


#4

From the piston editor in the top right fund the options and enable advanced statements.

Now the same way you added your other actions and IF statement inside the timer select add a statement. You should have several options. Find while loop.

Now you will select your motion sensor for the while. Then you will select motion for the capability. Then you will be able to choose is inactive.

Inside this while you want to have your action of playing the siren and a wait command. A few seconds should be sufficient.

Now if you don’t have to issue a stop command for the siren then that should work. If you do have to send a stop command then add that action outside of the loop but still inside the timer.

I am currently on mobile right now so it’s a little more difficult to help fully with an example.


#5

Thanks for this! However, now I’ve tried this out and it’s not stopping properly. I think I’ve implemented it all as you suggested. Including a screenshot below of the piston and of the logs.

Is it not recognizing that the sensor has sensed motion? I’ve checked and it seems like ST is recording motion, and I’ve deleted and re-added the sensor to webCORE, thinking that might reset things somehow. (When I originally started all this, it turned out the sensor needed a new battery, but that’s now been done.)


#6

You confirmed that the motion sensor was changing to active?


#7

Uh… I had confirmed it was working but it appears to only be working intermittently. Changed the motion sensor I was using and now it works like a charm. Thanks!