Help me make this RM 4.0 rule run faster (or more efficiently)

My back door opens to the garage and laundry area. When that door opens, I want either two switches (washer light/garage tube) to come on (from sunrise - 10 pm), or just one switch (washer light).

Previously, I had two RM 2.5 rules that were time-restricted, such that from sunrise-10 pm, an “on” was sent to both switches. The second rule ran from 10pm-sunrise and sent an “on” to just the washer light switch.

The previous rules didn’t check what the switch status was before sending an “on”.

I re-wrote the rules into a single RM 4.0 automation. It is now slower than before. When I open the back door, it takes a second for the washer light to come on, and then another second before the garage light comes on (its between sunrise-10pm).

38%20PM

How should I re-write the rule to make it faster?

Thanks!

I'm trying this version out now. Seems a little faster.

55%20PM

In your scenario, is it necessary to check the status of each light first? If it isn't, maybe a few milliseconds could be shaved there?

1 Like

It isn't. In my RM 2.5 rule, I wasn't checking anything, just turning the lights on. That was definitely faster.

I checked the status of the lights to make the z-wave radio "less busy", but that comes at a penalty of about 1-1.5 seconds.

I wonder if it will be faster if in place of checking the status of the light, I check a global variable that stores the lights status.

My idea is to use the same trigger.
If time is between sunrise-30 and 22:00 then turn on both lights.
Else- just turn on washer light
End-if

1 Like

That's very fast. I'm going back to using that!

2 Likes

What's probably happening is that the first light that you are commanding to On is taking a while to respond to the On command. HE won't proceed with the next command until that one is complete. They are executed sequentially. Some devices update their status when the command is issued and some wait for a response from the device before their status changes. I have a GE lamp module that takes a good 2 seconds to respond to an off command, even though the light is off. I would suspect that if that was built into a sequence of actions, it would appear to be a large pause.

1 Like