RM 4.0 Rule Questions and Optimizations

You could leave your Simple Lighting rule and update the RM rule to

Trigger Event: Pantry turns on
Actions:
Wait for events: Pantry Door closed --> timeout: 0:15:00
Off: Pantry

It'll send two off events when the door is closed, I don't think that'll be a problem, but will make sure it is off after 15 minutes.

1 Like

Oh! I like that! Let me try that after I get back from running around.

I love this platform and community!

Which delays? It only cancels delays that are in the rule, it doesn't cancel delays on other rules if that's what you're asking?

1 Like

Ok. Thanks. That is what I was asking. I was assuming it was global. Thanks for the clarification.

1 Like

I went this this solution from @pseudonym

I liked this solution from @bravenel...

but if I combined the two rules into one, it wouldn't account for the light being turned on manually with the physical switch.

Thanks all!

Simply add that as a second trigger event: Physical Switch.

You can combine them and use the wait this way:

Trigger Events:  Pantry Door open, Pantry light Physical on
Actions:
   IF(Pantry light off) On: Pantry light
   Wait for Pantry Door closed --> timeout 15:00  
   Off: Pantry Light

The Simple Conditional for Pantry light off is a bit of overkill -- it wouldn't hurt to just turn on the light even though it's already on. So, if the door is left open longer than 15 minutes, the light turns off. Then when it's turned on with the switch, that starts the 15 minute timer again. If the door closes first, then the light is turned off, irrespective of how it was turned on.

I have the following Rule that doesn't seem to be firing anymore, any assistance is appreciated.

The Logs show after the scheduled 1 hour delay it was supposed to turn the fan on.

The Event Logs for the Rule Show the last event logged was the "start" of the 1 hour delay.

The Device Events show the same thing the last event logged was the "start" of the 1 hour delay.

So the very top line of the "logs" showing Delay over and the fan turning on doesn't happen?

Any thoughts?

And the logs show the fan being turned on at 8:30 with the "Delay Over" log entry. So it looks like the rule did what you asked it to do.

Except the fan doesn't turn on as shown by the event logs of the rule and the device events

I'll look into it tomorrow, but I doubt this is a rule problem. Why don't you try a simple experiment, minus all of the rule overhead. Create a simple action that turns on the fan and sets the thermostat mode to off. Save that rule, then open it again. Hit Run Actions (with logging on). See what happens.

Also, look at the App Status for the rule above, and see if there is a setting called "thermoFanMainX", where X is some number.

It works perfectly fine.

But it didin't log any events for the rule

But DID log an event for the device

Did you change the rule option 'Logging' to enable events logging?

Any idea what might be happening above?

So it worked in a simple way, right? So try that simple rule with a 1 minute delay and see if that works also. If not, let me know. If it does, then that would rule out RM as having a problem, and the problem lies somewhere else. I don't have a clue, but these are the steps I would take.

1 Like

Re: Change Color Temperature Over Time

How does this work? Will the process of raising/lowering be interrupted if the bulb is turned off? Could this be used over very long periods (ie: 8 hours)?

Yes it still works with the 1 minute delay. Should I just delete the rule and re-create it?

If the bulb is turned off, the raising/lowering will most likely turn it back on again upon the next step. It will work over a long period of time. If you want this affect and the ability to turn the light off for some period during the transition, use a virtual CT bulb for the rule that does the transition, and figure out a rule to link it to a real light -- one that can be turned off. In that rule you would simply test if it was on before you'd send the new CT value to it, only sending it when the light is on.

Trigger Event:  CT of virtual-ct *changed*
Actions:
   IF(real-light on) THEN
      Set local-variable-ct:  %value%
      Set real-light CT: %local-variable-ct%
   END-IF
1 Like

Ok. I have another rule engine question to solve that I can't quite figure out the logic on. I have a motion sensor that I have triggering lights on if motion is detected in my basement. What I would like to do I create a rule that will turn the lights off if the motion sensor goes inactive and remains inactive for 15 minutes. If motion is detected again during the 15 minutes, I would like to cancel lights turning off.

Can you help a Hubitat Brother out?.

Thanks in advance.

Simple lighting
Entry for both your on and off requirement


entry for just the turn off

1 Like

Wow. Ok. I forget how powerful the Simple Lighting functionality is. I'll give that a shot.

Thanks for the quick response!

1 Like