Fridge door open 90 seconds -> push notification


#1

1) Give a description of the problem
Ok here we go again. Do not understand how can I create such a piston.

2) What is the expected behaviour?
When fridge door has been open for more that 90 sec then send push notification.

3) What is happening/not happening?
Fridge door sensor makes sometimes false reports. Sometimes it reports two or more “open” lines to IDE log (without “close” line) and piston thinks door has been open more than 90seconds even though it is really closed. I would like to get rid of these false notifications but do not understand how piston would understand when it’s false report and when it is not.
I have heard something about device previous state but I’m not sure is that the right way to proceed (and how).
Here’s log where normally should be open - close pairs. Sometimes there is two or more “opens” without “close”.

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


This is how I started but this is too stupid …I know. Same sensor can’t be included in two IFs…


#2

Honestly, I would try installing the sensor in another spot…


#3

Hi. I have more than 10 those exact sensors. It’s not location problem. Believe me I have tried everything with help of ST and sensor manufacturer. They just report double or triple states occasionally and that is the way they are. :frowning:
Thankfully there is webcore which could solve this issue. I just need some help to understand if there is solution that can help me with my problem.


#4

It can, but not if the CLOSE status never makes it into SmartThings…


By the way, when I said a different location, I meant relocate the sensor on the fridge.
(farther away from the hinge yields snappier responses… closer to the hinge yields less false reports)


#5

I’m not sure should I believe this but I maybe found a solution all by myself :open_mouth:

I copied some ideas from that other topic I started yesterday. It seems like it is working like I wanted to. This is miracle if I really did understand how to do it.


#6

Your logic is a bit confusing to me…


IF contact stays open, Then set {Dooropen} to false
IF contact closes, Then set {Dooropen} to true


but if it works, it works…


#7

It is confusing but it works. When fridge door stays open certain time and Dooropen is “true” then MAKE POST and end it to “false”. Dooropen will stay “false” until door contact is really closed. Then it changes to “true” and piston can run again.
If sensor reports two opens (first one is real and second is false report) then it POSTs only once and Dooropen stays false until door is really opened and closed again. So every open needs a close so that piston can run again. Not sure did you understand but at least I tried. :slight_smile:


#8

If your sensor is not reporting correctly, then your piston is never going to work right 100% of the time. It just won’t…there’s no getting around that with software.

Your piston still relies on the sensor going to closed to reset the variable to true. If you aren’t getting a closed report, that won’t happen. So, you’ve traded false reports of remaining open for dropped reports when the door has actually been left open. So, now you won’t get reports sometimes when you are supposed to. I would fix the sensor issue rather than trying to patch it with software.


#9

You are absolutely right but it actually does what I needed. Fridge door has really been left open 2 times in last 6 months. False reports and announcements of fridge door being open happens approximately twice a week. My bigger issue is those false alarms than fridge door really been left open. If sensor does not send closed information to ST then it will be fixed as soon as someone opens fridge door again. My kids…eh. well I am doing it all the time :wink:


#10

Okay…but you are just trading one problem for another…as long as you’re aware of that, and you’re okay with it then have at it. Personally, i’d just change the sensor.