Is there a way to make this simple rule act faster?

I have a pretty basic bahtroom light automation in rule machine. Everything works well except the light takes almost a second to light up.

I've took a video of the motion sensor and it takes 59 frames filmed at 60fps between the motion sensor triggering and the actual light lighting up.

It's more than 50% faster when done in Room Lighting app, but I can't get it to turn off the light there. Because of that I think the issue is not with the physical sensor but rather with rule machine.

That seems pretty good to me.

Agree...I would not be too concerned about that. :slight_smile:

@tips.mirror.0d - you have Required Expression turned on but you aren't using it.

Example or RL using Mode:

I think you're generally better off using Motion rather than the door...at least I've had the best results doing it that way.

Based on the logs, it looks like it takes .07 second for the rule to go from the event to the action of turning on the switch. If you enable logging on the Room Lighting app, so you see the same delay, or is it even faster?

IMO this is pretty bad user experience wide. By the time it takes to turn on the light you already start looking for the switch, which the bathroom doesn't have.

The required expression was enabled accidentally while taking the screenshot but i'll try adding the mode check as required expression.

Room lighting is not working for me because i can't get it to turn off the light when the door contact opens, before the motion sensor reports inactive.

Alternatively, keep both the Room Lighting and RM rules. Remove the action to turn on the switch form the RM rule, but keep the rest.

With that change, RL will turn on the switch, and RM will turn it off.

2 Likes

Rule Machine will often be a bit slower than a smaller app built for a specific purpose, as it's a very large app written for arbitrary automations.

Room Lighting can probably do what you want. If that isn't working, I'd share a screenshot of your setup and a description of exactly what you want to happen (I know you have the rule above, which might be close, but that's not clear either--you have several things set up that you aren't using and may or may not be intentional).

Based on the rule, if you wanted to use Room Lighting, it would look something like the following:

Means to Activate - Motion sensor active
Limit Activation - Mode you do not want it to run
Means to Turn Off - Contact sensor opens (do not select the motion sensor)

Make sure you have both the ACT and OFF boxes checked for the light in the table. I think, based on the quote, you have both the motion sensor and contact sensor as Means to Turn Off. Removing the motion sensor should cause Room Lighting to act similar to the rule.

1 Like

Did you try using any other apps like this one? I know that it worked great when I used it and never noticed delays except for motion sensor delays. It also has a few features that might interest you like the "Dim before off".

Another thing to consider that might introduce delays is the switch or smart light you are using, what protocol does it use, etc. ?

I prefer motion and mode lighting app.. for simple things.. not sure you can still install it.. as it was a built in app.
If not i think i can send an export of the rule and it will enable/install it?

It takes Hubitat only 163ms from the motion trigger to commanding the light to turn on. That is fast. So either the delay is in the motion sensor, or the signal to the light. Maybe both. What communication technology are you using for your devices? Because if they are via cloud integration that could account for the delay. If they are kept local such as Z-Wave, Zigbee, Matter, then perhaps it is the motion sensor flashing its LED a while before it transmits the event to hubitat or hubitat is taking half a second to get the motion event through its scheduler. Try leaning it out by not having more than one app acting on the same event. Just check the disable box on the other(s) for the test.

Did you try this?

Also, maybe this never happens in your house, but if you're only managing the light via the contact sensor, unless the door is always closed, there won't be an Open event and the light will never turn off. So you'll need both Contact and Motion-based actions to turn off the light.

4 Likes

Check to see if it's your bulbs. I have Sengled bulbs that take SECONDS to turn on or off. Like the old saying, I can turn the light off and literally be in bed before it's dark. Use the admin interface or a dashboard and turn the light on. Try it with other bulbs in your house, too. If there's a delay, I'd guess it's the bulb and not your rule.

1 Like

Just tried a couple of my Sengled (element classic) from the hubitat app. They begin ramping up or down within about 1/4 second of tapping their tile.

Good point, but reminds me that the delay could be because of a set transition time in the device details.

Mine are set with a transition time to make ramping smoother, so that's likely what I'm seeing. Funny that it still takes 5 seconds to go from 1% to off, which is just enough time to jump in bed.

1 Like

As I mentioned above, this is not the case.
Yes there is some delay in the zigbee devices I use but when I use Room Lighting app for the same automation it's considerably faster. Although the events in the log are approx the same.

But there are some good tips in this thread that i've yet to try. Currently a great workaround that I didn't think of myself is turning the light on via Room Lightning and turning it off via Rule Machine.

Not the prettiest solution but it works and that's why a platform like Hubitat is pretty awesome because you can do stuff like this...

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.