What automation app should I use?

Hey all, I'm new to the Hubitat game and I'm loving it so far. I'm curious what app do you use for non-motion based lighting automations?

Here's a sample one that I can't seem to do within Rule Machine

IF(Garage Door = Closed AND Plug Power<10W AND Garage Light = ON for 10 minutes) {
Turn off Garage Lights}

Sorry for the basic question.

1 Like

I'd suggest you make the garage door and the plug power as required expressions, then the garage light being on for 10 mins as the trigger. Cos all three of those triggers can't happen as events at
the same time.

This is in Rule Machine:

Obviously those are the devices I happened to have handy, so your rule won't be exactly the same :smiley:

It may depend on how the 10 mins is determined... I don't know the answer to that... But it may be worth testing. Is it 10 mins since the light moved to the on state, or 10 mins since the rule started checking. Or even, what happens if the light is already on, does the counter start at all?

Looking at your screenshot @Inge_Jones, I expect is the light is already on, that trigger may not fire.

1 Like

Good point!

Probably need to go back to an old wait or delay with a cancel.... I haven't kept pace with all the new-age options :slight_smile:

1 Like

Yeah and my idea doesn't work if a person is supposed to turn on the light first then operate the door and plug, or the reqexp will already have allowed the rule to begin and the light will turn off after 10 minutes anyway

It's a difficult one because it is a mixture of state and events, and the order of events or state changes may vary....

A motion or presence sensor may be useful :slight_smile:

1 Like

What if we remove the required expression and just focus on triggers and a conditional, assuming the reporting of the power flipping above and below 10W is limited.

So Triggers would be
Garage door changing
Power dropping below 10W
Power going above 10W
Light changing

Actions
Cancel Actions from this rule
Conditional Action : IF Garage Door Closed AND Power Reporting below 10W and Light Is ON
THEN Turn Off Light -> delayed 10mins (cancellable)
END-IF

Ok so the person turns on the light - the rule starts counting down at this point because the door is closed and the plug is off. Then during the 10 minutes the person opens the door or turns on the plug. The rule is triggered again by the door or plug event, cancels the delayed light off action, but this time all the conditions are not met so the rule ends. Looks good! As long as the person was not there to do something other than open the door or turn on the power :smiley:

1 Like

There's one way we could detect that.... :slight_smile:

Thank you everyone for the help/brianstorm! I ended up going with the below, very similar to what @Inge_Jones suggested. It worked for a while but lately the light has not been turning off. I'm checking it's conflicting with another rule but it's baffling me. Any thoughts?

PS: Agree, a motion sensor should help a lot. Might be transitioning soon.

Might want to look at the new Room Lighting app as well...if you add motion sensor(s) (which I support) then that app might have what you need.

If I was you I'd add a couple motion sensors aggregated in a Motion Zone and trigger events off when no motion and door closed for x minutes. Much simpler.

1 Like

Someone smarter correct me if I'm wrong, but I suspect the rule (as you posted) may be more limited than you intend, namely the trigger...

The trigger is the GL light being on for 10 minutes -- that means the rule will trigger at that 10-min mark exactly. At that time, it'll check the integrity of the Req'd Expression -- if true, the rule will fire the Actions to Run. If false, the rule won't fire the Action.

Is your intent to trigger at that exact 10-min mark every time? I suspect not, but maybe...

I think the required expression essentially stops the rule being triggered whilst ever the conditions are not met. Only when the expression is true will the trigger events have any impact.

I would expect that if the required expression is false when the light turns on, the rule won't fire, even if the expression becomes true between the light turning on and the 10 min mark. But I could also be wrong....:slightly_smiling_face:

Could this be your issue @ashma14 ?

1 Like

Thank you for the correction -- I'm sure you're right about the Req'd Exp / Trigger relationship... That makes much more sense... Otherwise, why would the rule bother displaying Req'd Exp validity info in the Rule title?

I got lost in the weeds overthinking it -- my apologies to OP for the false steer!