Simple Lighting vs Rule Machine

So I had a few automations setup using simple lighting which turned bathroom and closet lights on with motion. I also had a few rules in rule machine which set the various light levels depending on mode and also which turned the lights off if they're on and there's no motion (so if they were turned on via dashboard, the automation will still turn them off). But the issue I was having is that sometimes I'd be 2 to 3 steps into the room before the lights came on.

At first I thought the issue was the motion sensors weren't fast enough. I have a few of new smartthings sensors and 1 iris sensor (used in kids room to turn lights off). I even swapped the iris to turn the bathroom lights on and the results were the same. But just now I decided to remove smart lighting altogether and just create trigger in rule machine for each room to turn the lights on with motion and what a difference it made! Now instead of 2 to 3 steps before the lights turn on, the lights are on before my first step hits the ground properly!

Not sure why simple lighting has a slight delay, but if you run into these issues, try using rule machine instead.

2 Likes

You might want to look at Motion Lighting as well. I tend to break up my rules as such:

  • Automated/Time based lighting: Simple Lighting
  • Motion based lighting (not requiring notifications): Motion Lighting
  • Non-lighting Routines/Announcements: Rule Machine

I was using Simple Lighting for motion lighting when I first started out on HE and had similar results. Once I moved over to Motion Lighting, all my motion based lighting as been lightning fast with my motion sensors.

2 Likes

I'll test it out now!

1 Like

This is simply not true,

Simple Lighting is not slower than Rule Machine or Motion Lighting. Whatever was causing you to perceive this was not the app. If anything, Simple Lighting is the fastest of the three, as it is the smallest app of the three. The timing involved has mostly to do with the time it takes to load the app and execute it.

I'll upload a video later because it's noticeably faster in rule machine. When testing before switching from smart light I noticed in the logs the motion sensor would activate then the rule machine rules regarding the lights would get evaluated then the light would come on so I'm not sure if it is that rule machine is evaluated before smart lighting which would cause the speed difference. Unfortunately I didn't check the logs after changing lights on with motion over to rule machine.

Set them both up, and then pause one of them. Then switch which is paused.

That's what I did. And there was a noticeable difference. I just hadn't check the logs while evaluating using rule machine. I even paused all my RM rules at one point because I thought maybe all those rules was slowing things down but that had no effect on the speed of simple lighting. I'll check later though and post a video with my findings.

Look at the logs.

I just did this experiment. Redid a second time. From Motion active on the sensor to dimmer driver reporting On command:

With Simple Lighting: motion at 20.830, light on at 21.958 = 1.128 sec
With Motion Lighting: motion at 18.669, light on at 20.337 = 1.668 sec
With Rule Machine: motion at 50.498, light on at 52.178 = 1.680 sec

There is not a perceptible difference. However, Simple Lighting is the fastest. Simple Lighting has the most streamlined code of the three, as it has the least amount of checking of things to do.

I should comment that with all three it doesn't seem to take over a second for the light to come on. It seems pretty much instantaneous. In this case I stand outside a door and wave my arm through the door opening. Light comes on as soon as I wave my arm.

what motion detectors are you using, out of curiosity?
I just got an ecolink PIRZWAVE2.5-ECO and am extremely disappointed in its responsiveness.

I mounted it in a hallway so it would turn on a light when there was motion, and I can walk from one end of the hallway to the other before anything happens.

Time for me to start digging into the logs, but I don't think this thing is working as intended.

More on topic, I was surprised not to see many mentions of the Simple Lighting or Motion Lighting Apps being discussed. i think we could use some Sticky posts on the top of the Getting Started section, rather than having the most recently replied to threads on top. Something to help noobies get started without having to search through the forums. Just my $.01.

If I recall correctly, that has a sensitivity adjustment. A jumper . . .

I just walked past my motion detector and it took about 5 seconds before the light turned on.

Something is funky. Is it normal to have 2 entries for each activity?

dev:132019-03-20 04:06:08.776 pm infoUpstairs Hallway Dimmer was turned on [digital]
app:432019-03-20 04:06:01.474 pm infoTurning on switch [Upstairs Hallway Dimmer]
app:432019-03-20 04:06:01.462 pm infoTurning on switch [Upstairs Hallway Dimmer]
app:432019-03-20 04:06:01.422 pm infoMotion active Upstairs Hallway Motion
app:432019-03-20 04:06:01.406 pm infoMotion active Upstairs Hallway Motion
dev:342019-03-20 04:06:01.281 pm infoUpstairs Hallway Motion is active
dev:342019-03-20 04:06:01.277 pm infoUpstairs Hallway Motion is active

No, that's not normal. Look at the device Events from the device page.

I'm using the new smartthings motion sensors which are very responsive (responds as quickly as iris sensors in my testing). I had figured out the issue I was having and it was related to the brightness level of the bulbs. If the bulb was below 20% brightness when it was last turned on, the responsiveness was decreased when turning on next. Not sure why. But I set all my automations to not go below 25% brightness and I've been happy with it.

app:432019-03-20 04:28:33.485 pm infoDelaying off for 1 minute
app:432019-03-20 04:28:33.430 pm infoMotion inactive Upstairs Hallway Motion
dev:342019-03-20 04:28:33.348 pm infoUpstairs Hallway Motion is inactive
dev:132019-03-20 04:28:22.479 pm infoUpstairs Hallway Dimmer was turned on [digital]
app:432019-03-20 04:28:21.929 pm infoTurning on switch [Upstairs Hallway Dimmer]
app:432019-03-20 04:28:21.884 pm infoMotion active Upstairs Hallway Motion
dev:342019-03-20 04:28:21.809 pm infoUpstairs Hallway Motion is active

app:432019-03-20 04:30:14.979 pm infoDelaying off for 1 minute
app:432019-03-20 04:30:14.930 pm infoMotion inactive Upstairs Hallway Motion
dev:342019-03-20 04:30:14.851 pm infoUpstairs Hallway Motion is inactive
dev:132019-03-20 04:30:03.438 pm infoUpstairs Hallway Dimmer was turned on [digital]
app:432019-03-20 04:30:02.884 pm infoTurning on switch [Upstairs Hallway Dimmer]
app:432019-03-20 04:30:02.839 pm infoMotion active Upstairs Hallway Motion
dev:342019-03-20 04:30:02.757 pm infoUpstairs Hallway Motion is active

app:432019-03-20 04:31:47.822 pm infoDelaying off for 1 minute
app:432019-03-20 04:31:47.763 pm infoMotion inactive Upstairs Hallway Motion
dev:342019-03-20 04:31:47.687 pm infoUpstairs Hallway Motion is inactive
dev:132019-03-20 04:31:33.373 pm infoUpstairs Hallway Dimmer was turned on [digital]
app:432019-03-20 04:31:32.829 pm infoTurning on switch [Upstairs Hallway Dimmer]
app:432019-03-20 04:31:32.789 pm infoMotion active Upstairs Hallway Motion
dev:342019-03-20 04:31:32.704 pm infoUpstairs Hallway Motion is active
--- Live Log Started, waiting for events ---

It does seem to be getting more responsive.
Do previous rules linger in some kind of cache?

app:432019-03-20 04:35:55.343 pm infoDelaying off for 1 minute
app:432019-03-20 04:35:55.253 pm infoMotion inactive Upstairs Hallway Motion
dev:342019-03-20 04:35:55.172 pm infoUpstairs Hallway Motion is inactive
dev:132019-03-20 04:35:44.502 pm infoUpstairs Hallway Dimmer was turned on [digital]
app:432019-03-20 04:35:43.908 pm infoTurning on switch [Upstairs Hallway Dimmer]
app:432019-03-20 04:35:43.828 pm infoMotion active Upstairs Hallway Motion
dev:342019-03-20 04:35:43.691 pm infoUpstairs Hallway Motion is active
--- Live Log Started, waiting for events ---

No.

Well, so nearly 5 months later, and I'm observing that Simple Lighting is EXTREMELY slow in responding to what should be a simple trigger, while Rule Machine is outrageously faster.

A/B test case:

Simple Lighting:

  • when this switch turns on, also turn on that switch
  • also turn that off when this switch turns off

Rule Machine 4.0:

  • when this switch changes
    • if this is on, turn that on
    • else turn that off

Simple Lighting: 5-30 seconds
Rule Machine: 1 second

If I run the Simple Lighting case repeatedly, it gets faster, but never better than 3-5 seconds; if I don't run it for 5-10 minutes then turn this on again, that will take the 15-30 seconds again.

Rule Machine ALWAYS runs faster (from 0-1 second), no matter if I run it back to back, or after a 10 minute pause...

Call me crazy, but that's what I am seeing - and the logs confirm that the that switch isn't receiving the on/off command with Simple Lighting for 5-30 seconds after this changed

Also, FWIW, you will get different results if the Trigger and the Switch are both Zigbee, vs. a combo of Zwave & Zigbee.

Is Hubitat/Simple Lighting using Zigbee device affiliation or something to make the Zig/Zig combo noticeably faster?

That's strange. I am getting the opposite. I had a rule if door opened turn on light. In Rm it usually took 3-5 secs for the light to come on. Changed it to Simple Lighting and it is almost instaneous.

So, after more testing today, I've come to the following conclusion

  • Contacts trigger --> Switch action -- Simple Lighting is faster, especially if both Contact & Switch are Zigbee

  • Motion trigger --> Switch action -- Motion Lighting seems to be faster

  • Switch action --> Switch action -- Rule Machine is significantly faster