Rule for Open garage door

I'm trying to set a rule which will change a certain light a different color based on if my garage door is open after a certain time. Once the door is open and the time reaches the set time it doesn't do any thing. If I click Run Action when both conditions are true, it works just fine. Any reason it's not automatically running? I tried putting in a picture of the set up in rule machine but the forum won't let me add a picture. Today's just not my day with tech I guess.

Thanks
Greg

Hi, welcome to the forums! Can you post a picture of your rule?

Yes, you have to be a member for a couple days before you can do that. Otherwise, if you take the DiscoBot tutorial you got in your messages, that should also let you upload pics right away.

I actually figured it out. I was using the garage door being open as the trigger. Once I used time as the trigger it worked just fine. Thanks in advance.

Greg

1 Like

Just to be sure: did you add time as a trigger or replace the door changing (or opening, but you probably want changing) as a trigger? If I'm interpreting what you want correctly (door open at that time or opened after that time), you likely want both and may have only fixed one problem but created another. If you got it all figured out, nevermind! Just thought I'd mention this in case you didn't. :slight_smile:

Basically my kids have a tendency to leave to garage door open when they come in from playing. The garage door could be open for hours. I don't care the the door is open, I can that it's open after sunset. Therefore I wanted a certain light to change to red if at sunset the garage door was listed as open. Now as it's written, at sunset it checks to see if the garage door is open and if so, the light comes on and turns red.

Greg

2 Likes

Instead of telling you that the door is open, you could also just have it automatically shut the door if it's open for too long? Save you the trouble of having to close it manuall.

What would be the simplest way to create a rule to close garage door after it's been open a certain time? I am mainly going to use it during winter (wife always forgets to close).

I'd trigger the rule using the Garage open event, and then set a Wait for x minutes. If door still open then issue the close(), else exit.

1 Like

That worked! Here is how it turned out:

1 Like

Your first if is redundant since the trigger already checks for that.
Also, I understand from your 5 minutes delay that you instead wanted to check if the door was still open 5 minutes after it first opened. At this moment the garage opener will be turned on even if at some point in those 5 minutes you closed the door.
There are multiple solutions possible if that is the case you are looking for.

1 Like

That makes sense, I am going to move the IF statement from the beginning to right after the delay, that should fix that?

Yes, that should work. The only other problem with your rule is if you end up closing and opening it again, it would run once more and the delays would run concurrently.
An easy way to fix and which is always a good measure if you use delays is to set all delays to cancellable, and start the rule with "cancel delayed actions"

1 Like

Thanks. That's another good point. Does "cancel delayed actions" only cancel those for that rule, or globally? Just wondering so this doesn't interfere with other rules that could be running.

Just for that rule.
If you want to make it simpler, you can use wait for event and choose elapsed time.
It's basically the same thing as a delay, but it doesn't need to be cancelled - it cancels itself each time the rule is run again if still running

1 Like

Sounds good, thanks again for the help.

1 Like