How to interrupt a rule machine rule?


(Bethany) #1

I have a rule that I’m using as an alarm. I don’t like smart alarm because I can’t play a sound during the delay, so I don’t want to use that option.

I have a rule set to set off a 1st siren (that has been modified to make a nice beeping sound) immediately, then set a siren off a 2nd after 20 seconds. The problem is I don’t know how to interrupt the rule once the triggers and conditions have been put into place.

I’ve tried using the “Switch to disable Rule” and have tried changing the conditions and triggers for that rule but nothing prevents the second siren from going off.


#2

How about adding a virtual switch in the rule so that the second siren only activates when it’s on. So if you want to cancel the siren all you have to do is turn off the virtual switch.

I hope that made sense, it’s late and I will check back in the morning and see if my post still makes sense lol.


#3

I was looking at trying to disable a routine once it was logically processing. I also tried “switch to disable rule”, and got the same results as you

I have a ten second delay before my alarm sounds, I would also like another siren to provide a beeping sound before the main siren!

What siren did you use to provide the beeping sounds Bethany_Lefor, and how did you mod it?

Thanks eibyer, I will try what you said!


(Bruce) #4

If you use “seconds of delay” (not milliseconds), the disable switch should work. Or you might try using “cancel” for the delay, assuming you put this in a rule, and have an additional condition that can flip the rule-truth, thus cancelling the delay. These are roughly equivalent.

I should point out that 20 seconds delay runs the risk of the relative timing of events being off, and this not working correctly.


(Bethany) #5

Full disclosure I am REALLY new to this but…

Are you suggesting that I make a separate rule with a virtual switch? I am not aware of a way to have actions determined by different conditions within the same rule. However, yes, although it’s messy, it seems as such it would be quite easy to add a second separate rule and accomplish this.

Thank you!


(Bethany) #6

My set-up isn’t very pretty but it gets the job done!

I have an Aeon labs siren, set to ring #5 and volume #1, plugged into an extension cord, wrapped with electrical tape, and stuff into a tiny box packed with some insulation. I just used the denim type which is good for sound that I had laying around.

I hide it behind books on a bookshelf. It’s a silly solution but until someone makes a chime it’s what I’ve come up with.


(Bethany) #7

Thanks for the response!

(I also don’t know how to quote your reply in my response yet…)

So, I thought the option for seconds was only available when I use the “Delay These Actions”, and I thought that it would apply to all of the actions for that rule.

Also, with respect to using the “cancel”, I only see options for the delay in minutes and don’t know how to put in decimals, or if that it would except anything but an integer.

Could you explain more about why a 20 second delay runs the risk of the relative timing being off. Many things I’ve done seem really buggy, work sometimes and not others, and I wonder if understanding that would help me figure things out.


(Bruce) #8

To quote text, just highlight it in the post, and “quote reply” should pop up.

Not seeing your rules, I was making basic comments. Yes, cancel is only available for Delay These Actions (all of them) or Turn on/off after x minutes. So, depending on what you’re doing, you might need to break this up into multiple rules. Sometimes virtual switches can help communicate context information from one rule to another.

The issue with 20 seconds is the risk of lag. There can be lag in the cloud, and there can be lag in your mesh networks. Sometimes, those can add up to 20 seconds. In theory it should work, but there is no guarantee associated with 20 seconds.


(BoruGee) #9

Although not the same topic, thought relevent. So I will ask my question here.

I passage with 2 doors at the 2 ends, and 1 bulb in the middle.

SW1 ----------------> BULB -------------------> SW2

What I like to do is if someone walks from SW1 (Door1) to Door2 Light should stay on, and turn off immediately after SW2 open and close.

i.e. SW1 open ; Bulb On ; (Turn on a delay of 15 mins) ; If previous is true, Turn off immediately if SW2 closes.

(I can write a similar rule for anyone walking from SW2 to SW1).

I feel like this has something to do with interrupting the 15 min delay that I started. Should I mess around with a virtual switch to achieve this or is there any straight forward way to do this?


(Bruce) #10

Just use delay with CANCEL


(Fernando Herrera) #11

Not sure if this plays into this discussion but i do fell as if I have a similar issue.

I setup a trigger;
Select trigger events: front door lock unlock, garage door lock unlocked
Select Action: alarm: Disarm

The issue I’m having is the alarm goes off if you open the door immediately open the door because the alarm needs a second to disarm. If it is given the second to disarm and then opened it works fine with out setting off the alarm. i have it setup this way so the alarm is always on till the door is unlocked and rearmed as it is locked.

How do I setup a way to have the alarm have a second or two delay so it realizes it is being disarmed so it does not go off when the door is unlocked and opened immediately.