Reliable presence sensor door open announcement


#1

This is not an entire piston. It is a snippet of one.
I found that you have to be detailed about the presence sensor. You have to say it changed very recently and is now present - if you don’t do that but merely say it has changed to present, it sometimes does not coordinate correctly with the door sensor.

I am sending this to Tasker to perform the announcement, so the last ‘send’ line does what I need. Insert whatever notification process you use in its place.

if
Arrival Sensor 2’s presence changed in the last 120 seconds
and
Arrival Sensor 2’s presence is present
and
Front Door Iris Sensor’s contact changes to open
then
Send PUSH notification “Frontdoorunlocked ___________” and store in Messages;
end if;


#2

@Glen_King would you please describe the physical setup of your two sensors so that others have more context as to how this would be used?


#3

Sure. The Arrival (presence) sensor is the standard ST little presence fob. I keep it in my briefcase.
The door sensor is an Iris Gen2 contact sensor.

When I get home, ST detects the presence sensor and, via the LockManager smart app, unlocks the front door. Easy so far, right?

The issue is timing the push notification so it gets sent to the android tablet at the right time for the announcement-greeting to be heard. So while the door unlocks as soon as the presence sensor is detected, the door itself might not be opened for a minute or more as I get my stuff out of the car etc. Therefore, I want a more precise mechanism - one associated with my presence sensor so it knows to announce me instead of announcing my wife, but delayed until the door is actually opened.

Therefore, we start not by asking the current presence state of the arrival sensor, but by asking “has that sensor’s state changed at all in the past two minutes?” AND “is it currently present?” This ensures that indeed it is here, and has arrived here very very recently. If those combine simultaneously with the front door contact sensor changing to ‘open’, then we are sure it’s me having arrived and coming through the door.

It then pushes the notification.

That notification pops up on the android control tablet which also has ST installed.

AutoNotification intercepts it, does a regex association in the %antext string, and has Tasker read aloud the phrase associated with that regex recognition.


#4

Arrival piston

This piston will handle what you are doing and be able to determine if either of you or both arrive at the same time. With only two people there are only 3 options compared to my 16 with 4. You can adjust the “5” that is in the variables to 2 if you only want 2 minutes vs. 5 minutes. It sets a variable that someone is home and waits for 5 minutes until someone opens and then CLOSES the door. Then it speaks an announcement.