Disable custom alarm system (not working properly)


#1

1) Give a description of the problem
I am trying to create my own alarm system where if my mode is “away” and any of my door sensors open there will be a 30 seconds timer before the Siren will go off, UNLESS you switch off the simulated switch “security alarm”.
The problem seems to be that if I don’t turn off my switch within the first 10 seconds the timer won’t go off.

2) What is the expected behavior?

  • If I turn off “security alarm” it should kill the timer.
  • If I turn off “security alarm” after 30s (alarm is going) it should turn the alarm off

3) What is happening/not happening?
If I turn the switch off before 10 seconds has passed everything seems to work fine, but if I turn it off after 10 seconds it does not kill the timer.

4) Post a Green Snapshot of the pistonimage


#3

Curious if you got this piston figured out yet. Looking to do something similar and was browsing some of the security pistons out there. Wanted to know if you got it fixed and what your piston looks like now that it’s running properly.


#4

I’m not sure what’s wrong with your piston - I’ve never really tried the “repeat” logic before.

But… I have a similar concept working with SHM that links a physical contact sensor to a virtual one. When the physical one opens (my back door for example), the virtual one opens 30 seconds later, triggering the alarm. If SHM is disarmed before 30 seconds, it is cancelled. I am just using the “wait” command for the timer and an “else if” action to cancel. I realize this isn’t exactly a solution to your problem but maybe it will be useful in thinking about it a different way. Seems like you might be overcomplicating it a bit with the “repeat” and using variables for the timer. You could figure out a way to replace SHM status with your virtual switch I’m sure.

If you’re interested, I’ve posted a screenshot of mine below: