Simple Timeout

This one has me really confused and I am sure I must be doing something wrong.

I had hoped to create a simple timer device to alert me if a door is left open for more than 2 minutes. The wind blows my back porch door open quite often and I want to know if this happens while I am away from the house.

You can see in the attached status report that I opened the door and then closed it 8 seconds later. However, the condition still goes true 2 minutes after it was opened.

you could try:

DoSomething = BackPorchDoorOpen AND (BackPorchDoorOpen; NOW > 2:00)

“the door is open presently and it has been open more than 2 minutes”

[quote=“BulldogLowell, post:2, topic:181317”]you could try:

DoSomething = BackPorchDoorOpen AND (BackPorchDoorOpen; NOW > 2:00)

“the door is open presently and it has been open more than 2 minutes”[/quote]

Bulldog is right.

Your current condition “BackPorchDoorOpen; NOW > 2:00” only looks for 2:00 after the last time BackPorchDoorOpen was opened and then it becomes true it doesn’t look to see if its already been closed.
What he did is also add to the condition that 2:00 after it still needs to be opened. If you close it before then only half that statement is true and there for it won’t trigger. And if you close the door then open it right before the two min. mark it still won’t trigger the alert because now the last time the door was opened or became true has now changed which resets the timer for 2min more.