Is this possible? motion sensor rule

hi, i'm wanted a complex motion sensor rule but not sure if its even possible. The easy bit is when there is motion and light level is below amount the lights switch on ( i can do that bit) but then i want, if no motion is detected within (15 seconds) change light colour, but if motion is detected (15 seconds) then turn lights off.

Thanks in advance

There is a "wait for event" option in RM with a timeout, so you could wait 15 seconds for the motion sensor to go off. This "wait for event" will then end in 15 seconds OR when the sensor reports no motion. Then you check to see if there is motion, because if there isn't then your 15 seconds have passed. But is your motion sensor reporting that often?

i have the motion trigger interval set to 2 seconds so that should be fine, ill have a play round with the "wait for event" option and see if i can get it set right, thanks for your help

This is more or less possible, but the "no motion detected within 15 seconds" thing might not work how you expect--does your motion sensor actually report that frequently? Some are configurable, but many just default to something like a 30-60 second "reset interval" before an "inactive" report is sent back to the hub. (So basically the same thing mentioned above while I was typing.) The other consideration is how you want to handle the bulb color. Do you want to turn it on to a specific color/CT/level each time motion is detected, or do you want it to "remember" what it was before? If so, you'll have to add actions to capture and restore the bulb state, which are built into RM but aren't always intuitive if the bulb was off to start (only the on/off state will get captured and restored, so you'll need to do more work yourself if you care beyond that). Without specifying anything else, your "on" will just turn the bulb on to the last state it was on with.

But yes, if all that works out, it's certainly possible. :smiley: You may also wish to consider stating what your purpose is here to see if anyone can think of a different way to approach the automation unless you are certain this is the best way to do this with what you have (or want to have). Good luck either way!

i want it so if i walk into my room, the sensor will pick me up and turn the lights on and turn the lights to white (rather than setting to original state) then if it picks motion up again that will be me leaving so i want the lights out. But if no motion is detected that meas im staying in there so want the lights to set to my scene (which is possible) having to do this with motions sensor as atm i dont have any door contacts.

In the settings there is a setting for motion retrigger interval, which i have set for 2 seconds. Im assuming that would work

I'm not sure if there's a standard definition for "motion retrigger interval," but I'd check the manual for your device. Look for the Z-Wave parameter information--I assume that's what this is--to see what they say. One I randomly Googled (Aeon TriSensor) has such a bad explanation that I can't even figure out what they mean other than the fact that it's different from "motion clear time," which sounds more like what you're looking for. But who knows (someone, I'm sure, just not me).

You can definitely play around with this to see if you can get what you want to work, but my guess is that you might not be able to get exactly what you're looking for. Most motion sensors are designed to detect motion in a whole room, so if you didn't get a "curtain sensor" designed explicitly for the purpose of detecting a narrow field (like a doorway), you might have to use one of the "hacks" (heat shrink, etc.) to create the same effect with your sensor. Perhaps you've already seen that and have--just wanted to make you aware if not! Given that most sensors are not like this, most people also configure their lighting automations around this behavior, as well--e.g., keep the lights on as long as motion is detected, turn them off (usually after a delay since not all sensors are sensitive enough to constantly detect motion even if someone is in the room) after motion stops. In your case, it sounds like you'd maybe want to change the scene to something if "motion inactive" isn't sent within a certain timeframe, just to think of an alternate way you could do this automation if the original idea doesn't work.

Again, if your sensor works for this purpose, there's nothing stopping you from creating an automation around that behavior--it's just a bit uncommon around here, and I don't mean to discourage you from trying but rather just make you aware of some of the reasons it isn't. Good luck, and I hope something ends up working the way you want!

thank you. I'll play round with it when i get home, i can see alot of trial and error happening though