# Unlock door flow

**URL:** <https://community.homey.app/t/unlock-door-flow/12765>\
**Category:** Flows\
**Created:** [May 6, 2019, 7:31pm UTC](https://community.homey.app/t/unlock-door-flow/12765 "2019-05-06T19:31:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Statham85](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/statham85/32/12885_2.png) [@Statham85](https://community.homey.app/u/Statham85)\
**Post date:** [May 6, 2019, 7:31pm UTC](https://community.homey.app/t/unlock-door-flow/12765/1 "2019-05-06T19:31:23Z")

</div>

This flow used to work before 2.0, but because presence don’t work properly anymore, I have to use Smart presence instead. And now it only works 1/20 times.

Its like this: When a user arrives, Then start a flow “unlock”. When this flow is started, And motion alarm is on, Then unlock front door.

I think it may have to do with the timing. What time window do I have from “this flow is started”, to motion have to be triggered? Is there anyway to extend that window?

I use Smart presence app, Ring doorbell for motion detection, and Yale doorman as lock.

---

<div class="post-metadata">

**Author:** ![Statham85](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/statham85/32/12885_2.png) [@Statham85](https://community.homey.app/u/Statham85)\
**Post date:** [May 6, 2019, 7:49pm UTC](https://community.homey.app/t/unlock-door-flow/12765/3 "2019-05-06T19:49:16Z")

</div>

The first one also sends me push notification, and turns on home mode. And those two work 100% at least. Worth to mention, motion is usually triggered by car when arriving in my driveway.

---

<div class="post-metadata">

**Author:** ![Statham85](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/statham85/32/12885_2.png) [@Statham85](https://community.homey.app/u/Statham85)\
**Post date:** [May 6, 2019, 7:54pm UTC](https://community.homey.app/t/unlock-door-flow/12765/5 "2019-05-06T19:54:36Z")

</div>

Yep, it works.

---

<div class="post-metadata">

**Author:** ![Statham85](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/statham85/32/12885_2.png) [@Statham85](https://community.homey.app/u/Statham85)\
**Post date:** [May 6, 2019, 8:03pm UTC](https://community.homey.app/t/unlock-door-flow/12765/7 "2019-05-06T20:03:05Z")

</div>

When I used Homeys presence, the door was unlocked and locked too soon, so I turned off automatic lock completely. And now I get push every time door unlocks (and no push when I get home).

Using Homey presence, presence was triggered when about 50m from home, and before motion. And now motion triggers before presence.

---

<div class="post-metadata">

**Author:** ![Statham85](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/statham85/32/12885_2.png) [@Statham85](https://community.homey.app/u/Statham85)\
**Post date:** [May 6, 2019, 8:23pm UTC](https://community.homey.app/t/unlock-door-flow/12765/9 "2019-05-06T20:23:20Z")

</div>

yes, that sounds about right! Only it would be the other way around, when motion -\> timer to detect presence.

---

<div class="post-metadata">

**Author:** ![Statham85](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/statham85/32/12885_2.png) [@Statham85](https://community.homey.app/u/Statham85)\
**Post date:** [May 6, 2019, 8:47pm UTC](https://community.homey.app/t/unlock-door-flow/12765/11 "2019-05-06T20:47:47Z")

</div>

So, is this right:

flow 1: When motion is on, Then start timer “unlock, 100 seconds”  
Flow 2: When a user arrived, And Timer is running “unlock”, Then unlock front door.
