Multiple motion sensor / proximity dimmer brightness

So I'm trying to use 2 motion sensors to turn on some under cabinet lighting in my kitchen to different levels based on proximity / # of sensors detecting motion (i.e. more motion sensors activated = brighter room).

I'm looking to have one Aqara motion, when triggered, raise the dim level from 0-15, then as I pass by a second Aqara motion further entering the kitchen, raise the level from 15-30 (about as bright as I need these).

What I'm getting though is that the second motion lighting rule reports "app:457 2024-01-14 09:00:45.372 AM info Not turning on: disabled by button".

When I click "info" it takes me to the second motion lighting rule but nothing is checked in the "disable by button" options

I have tried enabling options on the second rule like "do turn on if already on" and the "overrides" and "don't turn off if 1st Aqara motion is still active" but no luck. I feel like the logic is there but the tricky "button" thing is getting me.

Could you add screenshots of both those rules?

Unfortunately it's not allowing me to embed media or include links in my posts

Let me try to get all the configs typed out

1 Like

Join the "Owners" group (in your community profile settings here) - then you can post screenshots.

That's just a spam / bot mitigation thing for new accounts.



First Rule "Dining Room - Kitchen Cabinets"

Second Rule "Kitchen - Kitchen Cabinets"

In your logs, what is the time separation between the two motion active events? Is it less than 3 seconds? One thing I see about the two motion rules is that there is a small chance that the first rule (dining room) might override the Kitchen rule if activation occurs under three seconds. Basically, if the Dining Room has not finished its fade and a step up occurs when the second rule starts to run, it will override the second rule due to the dimmer change. Try selecting "Use Physical Level Change for Override" and see if that helps.

If that doesn't work, you could probably set this up in Rule Machine to accomplish your goals.


No change using that override, and the placement is such that I can wait an additional 10-15 seconds out of view and then cross into the other sensors range and get the same message

I'm attempting to set it up in rule machine but finding the logic complicated, I need to study up on Wait For Event rules because I want to both wait for the other sensors to be activated while also waiting for it to not be activated for 20 minutes and then turning off

I'm also wondering if I'm having an issue with it being a dimmer, i.e. I'm only dimming it to 0,I don't think it's actually turning off or going to 0 as 1% is the lowest minimum value I can choose. But if I only turn it Off then it retains the last Level setting. The next time it activates would it not start out at the high Level, then drop to the initial low Level setting for the first sensor?

Like I said I need to study up on the logic, I can't be the first person to use "n" sensors to gauge proximity to a light and adjust accordingly

What type of motion sensors do you have? How fast do they go inactive and what’s their cooldown period?

As for the light, what type are you using? When you get a chance, turn on the light. Then, send it a setLevel 0 command. What happens? Does it turn off and Hubitat show it as off?

Okay I did a quick test, set the light to
Level 100 - light faded up to max brightness
Level 0 - light turned off but kept Level 100
Level 15 - light turned on at Level 15

I don't think it will be an issue to just use a fade raise/lower to turn them on, optionally brighten, and eventually turn off.

Using GLEDOPTO GL-C-008P powering warm white LED light strips, and Aqara P1 Motion Sensors (Xiaomi Aqara Mijia Sensors and Switches drivers).

Testing the following logic

Required Expression: None
Trigger: Dining Room Motion - Active

  1. Raise Cabinets level 15 fade 3
  2. Wait for Event - Kitchen Motion - Active
  3. If Kitchen Motion - Active
    A. Then Raise Cabinets level 30 fade 3
    i. Wait for Dining Room Motion & Kitchen Motion - Inactive and Stays for 20 minutes
    ii. Lower Cabinets level 0 fade 3
    B. Else Wait for Dining Room Motion & Kitchen Motion - Inactive and Stays for 20 minutes
    C. Lower Cabinets level 0 fade 3
    D. End If

Edit - okay this didn't work, I think as it would dim to 0 it would trigger one of the motions and re-start the wait.... I'm going to flash the lights and see if that triggers motion

Actually, reviewing the logs this did work finally after we'd all gone to bed, I think the primary motion sensor is too exposed and needs to be more targeted to see this happen during the day

Issue solved