Stop an action if a door for a period if the door has just closed

Team,

I seek your input on a complex rule!!! and yes this is a 3rd world issue. sorry...

I have a Number plate Camera that at this stage works in both directions. it will determine a number of different plates it will undertake tasks like open gates and garage doors etc. This also provides me the ability to do different actions in HE pending the Number plate recognised. in other words, My wife's Number plate will open gate and her garage door where mine will open gate and my garage door etc.

When I come home it is great works perfect - opens gate and garage door Please note - the garage door has only one trigger, open if closed and closed if open so I have had to put rules in place to only open if door or gate is closed. HE gets this information from the Gate and Door sensor conditions.
When I leave I close garage door but by the time I get to the gate and I drive past the camera it thinks I coming home and re opened garage door.

How can I stop a switch from working for say 5 minutes after it has just closed?

I have hundreds of devices but very much a home geek not a programming expert at all.

Thanks in advance.

Any time you ask this kind of question, you'll get the best help if you share the rule (or, in general, whatever app) you have so far. Can you do that? A screenshot normally works best (I like to edit the alt text to match and make it accessible, but plain text copy/paste tends to be hard to read).

1 Like

Off the top of my head without seeing your rule logic,
Only allow garage door to open if the gate has been closed for x duration on the way out. Trigger the garage door first then the gate open so on the way in it still opens.

Guys,

Good point re showing the rules. I have attached below images of rules and explanation. I have no doubt over complicated it but it works to date without the current issue of garage door closing.

Re the suggestion to use the gate as the trigger, unfortunately the gate remains open during the day.

Image 1 - Shows the rule to open the Garage door; The Trigger is ALARM 2 NVR however will not open if the Garage door is already open (because I only have 1 x trigger at the garage door for open/close) so I need to alleviate the door closing if already open.

The action then notifies my mobile and turns on the Garage door switch. this is perfect and works just fine when I am coming home. However when I am leaving this rule still opens the garage as it has closed by the time I get to the camera NVR trigger.

Image 2 - Shows the rule to open the Gate which is a parallel rule to the garage door but not an issue. just showing how I open gate and garage door from one trigger.

Thanks again and await your feedback.

Use the Private Boolean in your open rule. Have a required expression of it being false. In your first action, set the Boolean to be true.

Then, in your close rule add a wait for event- time elapsed of five minutes. The next action should be to set the Open Ruleโ€™s Private Boolean to False. This will allow the Open rule to run again, but have a five minute wait after the garage has closed in order to work.

There are a bunch of ways to accomplish this. Off the top of my head you could use a virtual switch. When the door opens (or closes, your choice) you can set the switch on. Then, five minutes later set the switch off. The rule would be setup to only trigger when the switch is off.

You could do the same thing with a hub variable.

Edit: Beaten to the punch. :wink:

Guys, will give these a go. Appreciate your advice. Never used Boolean so need to leanr this one.
I really appreciate you taking the time JB and LairdKnox and Crowefligth and Bert

Lairdknox, I have tried setting up the Virtual switch in this case called "NVR SINGLE GARAGE VIRTUAL DELAY" and I had to place it in actions instead of say a required expression as I already need to use the required expression.
Can you look at the below and tell me what I am doing wrong. The Virtual switch is set up to start a timer for say 2 minutes once the garage door closes. this therefore should lock off the "ON" command to turn on the SINGLE GARAGE RELAY - but it is not working. the virtual works and starts the timer but the way I have set up the rule doesn't stop the activation.

any ideas? thansk again.

I think I sorted it.

from your description, I came up with a logic flow I think might work. I never messed with a plate reader so I don't know how it gets data into Hubitat so this flow needs some tweeking for sure.

Trigger
Plate Reader known Plate

Actions

If plate reader = plate 1 then
if garage door 1 closed >= 5 minutes
Open Garage door 1
end if
Open Gate
notify phone
else if Plate Reader = plate 2 then
if garage door 2 closed >= 5 minutes
Open Garage door 2
end if
Open Gate
Notify phone
End If

Thanks Croweflight.