Motion Detection Reset


#1

1) Give a description of the problem
I want to reset the timer if motion is detected within 10 min and set variable to true.

2) What is the expected behaviour?
I get a lot of false positives so i want to try to narrow it down so it only tells me when there has been no motions within 10 mins.

3) What is happening/not happening?
It runs but the timer never resets. It just runs 10 mins and changes the variable to true even though other motion event happened within that time. I tried adding clear all pending but it did not restart the timer for a pending event.

4) Post a Green Snapshot of the piston![image|45x37]


#2

If memory serves me right, STAYS UNCHANGED was never implemented in webCoRE.
(it is ‘ghost’ code from a bygone era, LOL)

May I ask what you are really trying to accomplish?
There may be a more streamlined method…

(normally, a trigger inside of a trigger will always fail)


It might be as easy as a single trigger piston:

IF Sensor's motion STAYS inactive for 10 minutes
Then
    Set variable to false
Else
    Set variable to true
END IF

PS. I may have gotten your true/false backwards because your statement and your piston are the opposite.
(I made this snippet based on what you typed, not the contents of your piston)


#3

Oh sorry it is actually the same the virtual device is a motion and switch. I just wanted to make sure it got activated. I have tried a few of the stay unchanged, stays inactive and does not change. And the only one that i saw have a timer or pending event was stays unchanged. So that was the one i used. Not sure if it was the correct one.

This is a motion sensor. It is set outside to detect motion but the problem is that i get a good amount of false positives that i want to limit it sending me the notifications. I want it to set to true if no events happen within 7 mins of each other. If a event happens within that 7 mins i want to reset that counter so that it would again look for no events to happen in that 7 mins. It is hooked up to echo speaks so it is pretty annoying if echo keeps announcing motion events.

I just wanted to see if i was using the correct action to check for no motion or if i was doing it wrong. I hope you understand what i am trying to accomplish.

I have more complicated pistons and I know this is simple but i am just not sure which action is the one to use because they are so similar in wording to each other.


#4

Ok thanks i though i needed the changes to activate the piston but stays inactive works. I simplified it to just a few lines thanks


#5

One small warning for STAYS…

I would not put any other triggers in that piston, because other events can reset that timer. (potentially, aborting the final commands)