"Door Left Open Alert" fires even after door was closed


#1

1) Give a description of the problem
If the door stays open for 90 seconds, Fully Kiosk (shows as “Unknown Device 1”) should speak. If the door is opened, but closed in less than 90 seconds, nothing should happen.

2) What is the expected behaviour?
Piston should cancel/reset if condition changes.

3) What is happening/not happening?
Piston still runs after condition changes.

**4) Post a Green Snapshot of the piston!

This works great when the door is actually left open. The problem is the alert still happens sometimes (but not every time), even though the door was closed before 90 seconds.
I’ve checked the contact sensor logs to make sure it is registering an accurate open/close, so I don’t think it’s the sensor. I also have identical pistons setup for other contact sensors with the same inconsistent results, so I think it’s the piston, not the sensors.


#2

If the door is opened and closed too quickly, there is a possibility that the status will come in backwards.

IE: Open > Close… may arrive in the hub as Close > Open… (thereby triggering the THEN block)


Side Note: I would also recommend converting your ONLY WHEN into an indented IF instead.

IE:

IF Sensor stays open for 90 sec
Then
    IF Time is after 8PM
    Then
        Play sound etc
    END IF
END IF

#3

Thanks, I’ll try the indented IF. I have checked the logs on the open/close status, and they appear to be in the correct order, but I’ll keep an eye on that next time it happens.


#4

Should the Task Cancellation Policy be set to never, or default? Or does it not matter in this case?


#5

Default, for sure.
(we want it to cancel if the door closes)