Trigger event for motion sensor on Rule Machine not acting as I expected

So I am confused about how this trigger is supposed to work.
It SAYS, "Motion Sensor 1, Motion Sensor 2 all motion inactive and stay that way for: 0:03:00"
It puts emphasis on "stay" even. But it is ignoring that. What happens instead is it triggers about 3:30 after it initially triggered, even if there is motion detected between. If I am in the room dancing in front of the sensor at the 3:30 point it extends it for another 3:00 minutes. But it does not seem to respect the in-between time. If I walk in front of a sensor at 2:30 after initially activating it.. it still deactivates at 3:30 even though it has only been inactive for 1 minute. If I walk in front of it at the 3:00 point it does extend it for another 3:30 and activates at the 6:30 point.

A screenshot of the rule may help....

But in the meantime, I could be wrong, but I suspect you may need to include some kind of cancellation of prior instances of the rule.... i.e. when it is re-triggered.... Just a guess....

1 Like

That seems counter-productive to what the trigger states.. It does not say "from initial activity"...

I didn't claim to make any sense :wink:

So I think you need to walk through what you are trying to achieve with all the triggers. Doesn't have to be here... The way I read it is:

If any one of the 2 (?) motion sensors go from inactive to active
OR
They turn off (?)
OR
We reach the point where they have ALL been inactive for 3 minutes (at exactly this point in time)
OR
The shower light is double-tapped

If any of those triggers fires, then the actions in the rule will be executed. So if you trigger motion, the rule will fire. If the motion then becomes inactive, after 3 minutes the rule will fire again. If, however, during that 3 minutes the motion is re-activated, the rule should fire again.

I could also be mis-interpretting this, as it doesn't quite tally with your original description...

1 Like

You see those top 3 lines.. specifically the %text% variable? I am sending that %text% to my cellphone. (this is my version of looking at the log). So I know exactly when it triggers and why. All the triggers are doing what I want with exception of the "stays inactive for 3 minutes". it seems like it only tests for inactivity somewhere in the last 30 seconds of that 3 minutes. I am assuming the 30 seconds is coming from the motion sensor reporting active for the additional 30 seconds. And so it is not in fact watching for inactivity for a full 3 minutes. I spent hours messing around with this till I started to get a clear picture of what was going on.

Yeah, should not have doubted your understanding of what you wanted. Reading back it did sound a little pretentious on my part. I just know that in many situations, asking some of the basic questions can lead to someone realising where the issue may lie.

Your suspicion on the 30 seconds is likely correct. To test that part of the behaviour you could review the Events for each device. This is available from the Devices page for each device, located at the top. And you are right when you say that 3 minutes will start when the last device in the group becomes inactive. Again, apologies if I'm telling you something you already know.

If you wanted the rule to fire when any of them have been inactive for 3 minutes, you could try splitting them out into separate triggers for the rule, if that's what you want. You would still have the time between activation and de-activation, often referred to as the cool-down time (I think).

I suspect you may still be seeing some issues with the rule firing again and needing to handle this in some way, but I've always been a little unsure about handling that kind of stuff, so may look to others to chime in on that aspect.

I'd also add, this is a global Community. There's always someone around to answer a question you might have, or they are not far away from being online. Don't be afraid to post a question, people are more than happy to help get you up and running as quick as we can.

Tomorrow, I will test this with one motion sensor and see if I get the same results. Nothing you have said has put me off. I appreciate you.

1 Like

I suspect you're seeing something similar to this and the first and third triggers won't work together in the same rule.

1 Like

If I may ask... why not? What part of them does not work?

I believe the developer of RM (bravenel) attempted to answer that in the provided thread. There may be other threads that go into more detail about the issue. You could always pose that question to him for a direct response.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.