Problem with motion sensors

Ok, so I am really not having as much luck as I thought with my Hubitat migration.

My new issue is that I am trying to use the Hubitat simple lighting to turn on/off my lights. I have it set up to toggle the lights on when it detects motion, then turn them off after 5 minutes of no motion detected.

The lights do not come on, nor do they shut off. The motion sensor is an iris gen2, the lights are BR30 lights.

This worked (with some differences in the way it was scripted) in Iris.

I also have a Samsung smart button that does turn the lights on/off - albeit with some issues (see my other post).

It would be a lot easier for people to help if you posted a screenshot and maybe logs so people can see how you have configured the rule.
Just a suggestion. :slight_smile:

Can you post screenshots of the events tabs from the motion sensor and light bulbs? It would also be helpful to see the config of the rules.

However, that said, I know you reported duplicate events so it's likely the Zigbee mesh instability is affecting your automations. I does look like the fix will be out in the next release so I suggest hanging in there a few more days.

Just curious how far is your motion sensor from your hub?

Yes, I would've posted but I am not at home. I'll post when I get home.

Motion sensor is about 10-15 feet from the hub. The hub is in the basement but at ceiling level.

Ok, I am attaching them. Hopefully you can see the rule configuration. I shrunk it so it could all fit on my laptop screen. Also, it's not shown here but I have almost the exact same rule that turns the lights on but at 50% from 10:01 PM to 6:31 AM.

Motion%20rule%20settings

Can you get rule machine do this? I have one rule where motion triggers a virtual switch. Then switch will go off after 5 minutes. Then I have a rule on my light where it reads the virtual switch and true is on and false is off. Works like a dream. I couldn't get motion/mode lighting to work consistently during my first few days, so I stuck with rule machine.

The Virtual Switch doing something else??? You don't need it to do ONLY what you wrote.

Motion "directly" turns on the light, then when motion ends, a 3 min (cancelable) timer starts. As long as no new motion occurs in that 3 min window, it will shut off. Every motion event IN that window, simply restarts the entire thing over again.

Rule machine was my next option to try but I thought I would try this first since it seemed like it was designed for what I wanted to accomplish.

So I had an issue with SL delay not working for turning off a switch based on the action of another switch. I think there may be a bug in the delay some where. When I shifted the rule to RM it started working. RM is more flexible but I like keeping the simple rules in one place like in SL.

another iris transition user here....I was able to setup the old iris Sylvania br30 lights to turn on/off relatively fast based on either motion sensing or amazon echo using simple lighting....I haven't tried to get detailed with rules engine yet. What I did do is throw out the iris motion sensors and replace them with aeotec trisensor devices which seem to trigger fast, and I put in a bunch of other zwave devices and pulled out the old iris repeaters which might be buggy. I think a big part of transition is just determining which network you are building (zigabee/zwave/mixed/etc) and ensuring that it stays in the appropriate health. I've probably seriously weakened my zigabee network, and built up a strong zwave plus network....but the only remaining zigabee devices are the light bulbs and they seem to be flexible enough.

I'm trying Rule machine and setting up the same rule logic. What does the False indicator mean?

Rule%20Machine

Also, I have a button that toggles the lights on off. Does that cancel out anything with the motion detection rule I built?

The condition is currently false because no motion is currently detected.

I don't think it will unless you want it to.. Each will just fire as they happen. However if it detects motion while the light is on then it will turn off after your delay.

If you want to play around with disabling the motion rule on button toggle look into something called "Private Boolean" - you can have a button toggle rule + test for light "on"/"off" set the motion rule's "Private Boolean" to false (or true). You also have to set "Enable/Disable with Private Boolean" under restrictions for the motion rule. Something like that.

There are other ways too...

Ok, that makes sense. I thought it might be some kind of initial state that the rule was going to set.

Initial tests using rule machine worked. Turned on from motion and off after 5 minutes of no motion.

Seems odd because from what I could tell I tried the same thing in SL.

1 Like

Yep that was my experience as well! Glad it worked for you.

Thanks. I'm fine with the current setup as long as the button doesn't negate the motion detection but it's nice to have options.

Also did you set "cancel on truth change" so if motion is detected while things are on the timer gets reset?