Rule not firing

Noob here...

I set up the below rule with some help from folks on the Board...Generally what I want to do is flash a couple of lights if I leave the garage door open between certain hours. To test it I changed the open hours for the period I was testing. I also want the lights to stop blinking when I close the garage door.

I am using the Zoom tilt sensor on the garage to chime in on the rule.

I tested this afternoon - Garage was in the open state (has been all morning) and no bulbs flashed when I altered the time (it was 1255 and I set the time to observe the rule at 1257)

Your trigger for the rule requires the garage sensor to actually transition from closed to open during the window.
Just changing the window won’t trigger it.
Hubitat is pretty much event driven.

It might have been a little clearer if the trigger said ā€œā€¦ contact opensā€ instead of ā€œā€¦ contact openā€

2 Likes

I check the garage door 2 ways. In the first example you can put a time constraint required expression.

Trigger: Door opens
Actions:
wait for event elapsed time
If Door still open do something

And also

Trigger: at certain times (10am, 2pm, 7pm) or when living room tv turns off
Actions:
If Door open do something

How would I change it so that once I am in the window of time HE checks the state of that sensor and if it is open it fires the flashing bulbs?

I'm not necessarily concerned if it goes from one state to another (closed to open) but rather if it is open during that window.

Trying to alert us if we forget to close the garage door.

The window of time is because when working outside I often leave the garage open to get in and out easily...After 9pm there is much more of a likelihood that I forgot to close it.

It sounds like what you want is:

Trigger: time is 9 PM

Actions:
(conditional action)
If garage door is open
. Flash lights
. Wait for garage door closed
. Turn off lights
End if

Keep the original rule to cover if the door is opened after 9pm and left open.

Remember that you need some event to instigate the process.
You could tell it to trigger, for example, every 10 minutes during that window and run the check.

I think I figured out @Alan_F

As @TArman points out...I think I need to add something in here that triggers this rule to run say every 10 minutes in the event that someone comes home after 9 pm and forgets to close the garage door?

OR, if i leave the original rule does that handle the door opening after 9pm and being left open?

Closer, but you need to actually use that conditional in an if statement.

As it is now, the lights will always flash at 9pm.

I know this thread is more to do with the rule not firing, but isn't the 'flash' capability dependent upon the device driver?

@TArman

Do tell...I'm a little lost on where to add or correct the conditional.

Add a New Action, then select the "Conditional Actions" option to create the If-Then statement. Since your condition is already defined, you'll be able to just select it to use as the conditional portion.

The documentation for Rule Machine is quite good - you should check it out.

Thanks @hydro311 I try to get into the documents but sometimes they are not clear to someone without "skills"

I do think that I understood what you said though.

That looks good. Although it's not required in this particular case, I'd add an "End If" at the end -- it's always good form to close an If statement with an End If, and it becomes required in rules with nested Ifs, so might as well get in the habit of just doing it every time.

The end if jus tells the rule that there is no additional action or XX to come?

With the addition of the if statement inside of the actions can I remove the Manage Conditions statement above it? Seems repetitive.

It simply closes the If statement. You could now add any additional actions to the rule now, since that If stmt is properly isolated/contained (for lack of better words).

No, don't do that. That's just a listing of conditions used in the rule. If you remove the condition there, the rule will break.

A condition can be used more than once in a rule, so (among other things) that "Manage conditions" area makes it easy to update a condition without having to dig around in the rule itself.

You got it! Just takes a little practice and thinking ā€œlike a computerā€.

Note that this ONLY checks at 9pm.
You can add as many times as you like as triggers.
I also have a ā€œbedtime checkā€ routine that would run the actions in this rule to make sure door wasn’t opened after 9 and not closed by bedtime.

(My routine actually closes the door if it is open at bedtime.)

@TArman

mind sharing a screenshot of your bedtime routine?