Contact Stays Open Misfire


#1

1) Give a description of the problem
I have a piston that is supposed to send a push notification when a door has been left open for 2 minutes, but it often misfires and notifies me even when the door is closed.

2) What is the expected behavior?
When a door is left open for >2 minutes, send a notification.

3) What is happening/not happening?
The piston is sending notifications even when the time condition is not met. It does, however, seem to often happen about 2 minutes after the door has been opened and closed.

4) Post a Green Snapshot of the pistonimage

**5) Attach any logs (From [ST IDE]


#2

I’d start troubleshooting by hard coding the time limit. Not sure why you are using a variable there anyway.


#3

Will give that a shot. Not sure why a variable shouldn’t work, though.

As for why I chose to use a variable, its value is used in multiple locations in the piston, and I wanted a quick way to change the value on the fly.


#4

I can’t see why it wouldn’t work either, but taking it out temporarily is the first thing I’d do to troubleshoot.

When you get the “bad” notification, I’m guessing the variable interval of 2 is displaying properly?


#5

Are you sure the sensor isn’t reporting open?

If all is good with the hardware… Best option now is… Delete the piston and start over.