Hello. Im new to Hubitat and wish to learn a lot from the community. I have created a simple rule which should trigger a light on based on motion. While the motion sensor changes state to active, the "if true" event do not trigger. If I'm in the rule and click run the rule, it works as intended. I checked the logs and it records "active" motion for the motion sensor in question. Below is what the rule looks like. Any suggestions to make it work would help. Thanks !
Get rid of the Wait and Off in the Actions for True.
Motion goes active, rule becomes true, turn on the light. Motion goes inactive, rule becomes false, light turns off.
One more thing to add to Action for False is a delay with Cancel. Then the light will stay on until motion stops for the full delay period.
Modified as suggested, didnt work.
Does your sensor go Inactive too? (All your screendumps are active)
It has to go inactive first, then active again for the rule to execute...
@pietsnot I confused can you explain?
It has to go inactive first, then active again for the rule to execute...
Yes the sensor does go inactive. It was a coincidence that it was active in both screen shots.
Turn on logging in the rule, and look at the device events from the device page for the motion sensor.
@leeonestop, what I meant to say was that there has to be a change in truth, else the rule would not execute.
@pietsnot I got it now I was having a senior moment. Thanks
Device events show motion sensor changes state from active to inactive back to active when motion is detected, but the rule still doesn't fire !
Another update.
- So I'm using SmartThings Motion sensor for the rule that is in question. I have two ST motion sensors and both the rules (in RM) associated with those motion sensors wont work.
- I also happen to have a Philips Hue motion sensor, which I used to setup a third rule (in RM) for the hallway lights. Surprisingly, the rule with Philips Hue fires and turn the lights on and off no problem.
- Then, I used Simple Lighting Rules for the ST motion sensors for the bathroom lights and it works !
Not sure what my next step should be ! Should I return the ST motion sensors and only use Philips Hue sensors?
I don't know what's up with your rm rule, but the general like of thinking is to pick the least complex app to get the hub done.
I use ml for most of my motion lighting rules...
No point in using a sledgehammer when a claw hammer will do...
Under ML, the minimum length of time the light will remain on seems to be 1 min after the motion state changes to inactive. Is that right? If that is true then I would like finer control that is offered in RM.
I tested ML and the rule works.
The ST motion sensors should work in RM, right? Especially if it works in Simple lighting and ML.
Why such a quick timeout?, that's very unusual...
Using a timeout setting that low could result in the light going out while someone is in the room.
While I try to learn and understand the pro and cons of each option on Hubitat, I would like the option of using the ST motion sensor via RM. Since the Philips hue worked, I'm more confident about how I'm setting it up. Does this mean that ST motion sensor cannot be used in RM ? I ask that because it works with simple lighting and motion lighting.
It should work fine. Please turn on the logging for the rule in question, make the motion sensor do its thing, and then post those logs here (logs from the rule).
Device detects "Active" but app does not. Though, it did once, as you will see in the list, but didn't fire the rule.
That's very strange. Could I suggest that you remove this rule, and build it again from scratch. There is no obvious reason that it shouldn't work. Try that, and post back.