Repeat alarm sound until SMH is disarmed


#1

Hi all new here, have been using Webcore now for a few weeks and im loving it. Im not an advance user in anyway so my pistons are very basic but im hoping someone can tell me why a repeat wont work. I have created this piston to trigger an alarm using my google home if the alarm isnt deactivated within 30 seconds or if the alarm is active and any other sensor is opened. Now it works fine except i would like it to repeat the alarm sound if the SHM remains Armed, but everytime i try to add one it it doesnt even sound the alarm once and i have tried wrapping it arround the IF and the WITH and im just not sure what to do.

Hope someone can help
Jason


#2

Well, you have a trigger (lightning bolt) inside the logic for another trigger which is pretty much a recipe for disaster. No telling what will happen. Right now, what you have is a check for contact sensor 1 changing to pen but by that time the SHM status will likely have already been past the 20 seconds in Armed/Stay or Armed/Away so that second trigger will rarely if ever evaluate to true. Also, you have the warning triggered off of Contact sensor 1 but the alarm based on contact sensors 2, 4, 5, 6, 7, and 8. not sure if this is just because you are testing or intentional. Seems inconsistent.

As for fixing, I would suggest after the speak text warning, add a 20 second wait. Then change the if if SHM stays to if SHM is any of Armed/Stay or Armed/Away so now it will be a condition and not conflict with the surrounding trigger. For your final if, you can change that to a while loop. So what you want is while SHM is Armed and any contact sensor is open, play your alarm, wait X seconds. X here should be however long your alarm sound is so it will repeat until SHM is disarmed.

Hope this makes sense and is helpful.


#3

Thank you for your help, I have been messing around with it all day and didnt realise I had left that trigger there. I think i have done what you said. The trigger at the bottom works fine thats just for all windows where as the first part is for the front door, working in conjunction with SMH delay app. Its late so wont be testing now but have attached the image for reference

Thank you for your help


#4

Looks good. I think you can eliminate the if SHM is armed as the while should accomplish the same thing. Enjoy.


#5

This doesn’t seem to work, I get the speech notification but thats as far as it goes. any ideas?


#6

Sorry, I forgot to warn you: the ‘changes to’ only remains true for a short time (few seconds) so when it comes back into the piston after the wait, the if is no longer true so it doesn’t finish. What I usually do is make a conditional group: {if contact sensor changes to open or is open}. That way when it comes back from the wait, it can still get in but the piston is initially only triggered by the change.


#7

Try this.

You also probably could use the default task cancellation policy. You shouldn’t need the never cancel but I’m not sure. If someone closes the door, do you still want the alarm to continue? Not sure this accomplishes that. The door has to stay open. To keep the alarm running with the door closed, we would need additional variable logic to track that the door had been opened. Sorry, just thought about this.


#8

Here is another version with added logic for the door closing but alarm not turned off: