# Motion detected flow

**URL:** <https://community.homey.app/t/motion-detected-flow/59327>\
**Category:** Flows\
**Created:** [January 28, 2022, 6:08pm UTC](https://community.homey.app/t/motion-detected-flow/59327 "2022-01-28T18:08:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hege\_Helleland](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hege_helleland/32/48969_2.png) [@Hege\_Helleland](https://community.homey.app/u/Hege_Helleland)\
**Post date:** [January 28, 2022, 6:08pm UTC](https://community.homey.app/t/motion-detected-flow/59327/1 "2022-01-28T18:08:56Z")

</div>

Is it possible to make a flow that sends a push when a door has been open for 5 minutes to specific users?

I tried but it sends flow every time the door is opened

Hege

---

<div class="post-metadata">

**Author:** ![Sortberg](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sortberg/32/49467_2.png) [@Sortberg](https://community.homey.app/u/Sortberg)\
**Post date:** [January 28, 2022, 7:39pm UTC](https://community.homey.app/t/motion-detected-flow/59327/2 "2022-01-28T19:39:48Z")

</div>

Yes, you can fix it with the timer function. Flow 1. When the door is opened, turn on a timer of 5 minuts. Flow 2. After the 5 minutes have passed, a message is sent .  
Flow 3. When the door closes, timers are stopped.  
Does that make sense?

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [January 28, 2022, 7:50pm UTC](https://community.homey.app/t/motion-detected-flow/59327/3 "2022-01-28T19:50:13Z")

</div>

Dont you love how homey lets you solve this in soooo many ways 😀

You can use zone-activity:  
WHEN  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/2/22d6e4703bcfba0952ec60aae0f01cb7dc5b4089.png)

---

<div class="post-metadata">

**Author:** ![Hege\_Helleland](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hege_helleland/32/48969_2.png) [@Hege\_Helleland](https://community.homey.app/u/Hege_Helleland)\
**Post date:** [January 28, 2022, 8:17pm UTC](https://community.homey.app/t/motion-detected-flow/59327/4 "2022-01-28T20:17:13Z")

</div>

I dont have timer  
And i van only choose when the zone has been inactive for a given time

I have the bridge not pro

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 29, 2022, 1:25am UTC](https://community.homey.app/t/motion-detected-flow/59327/5 "2022-01-29T01:25:45Z")

</div>

For Homey cloud/bridge:  
(Door turned on, means Door Open)

---

<div class="post-metadata">

**Author:** ![Cuprum](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/cuprum/32/41409_2.png) [@Cuprum](https://community.homey.app/u/Cuprum)\
**Post date:** [January 29, 2022, 7:29am UTC](https://community.homey.app/t/motion-detected-flow/59327/6 "2022-01-29T07:29:28Z")

</div>

Hmm, may-be not so relevant here, but what happens, if the door changes state multiple times between the 5 minutes?

Sorry, i may be stupid, but not seen exact description of the flow/cards for such situation (and for other beginners, like me - “after 5 minutes” can be add to standard “start flow” card, after it’s inserted into flow) - is the flow “D1.2” stopped, if door closes during 5 minutes? Or, if someone steps in&out every minute (and accidentally steps also exactly aft 5 minutes) then anyway D2.2 is executing payload ( despite, the door was closed during 5 minute) - and additionally other instances of flow are waiting their time.

Yeah, may-be i’m toooo pedantic 😉 But such “small details” are important to make home acting exactly, as we want, but not to thinking by themselves

---

<div class="post-metadata">

**Author:** ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)\
**Post date:** [January 29, 2022, 3:10pm UTC](https://community.homey.app/t/motion-detected-flow/59327/7 "2022-01-29T15:10:20Z")

</div>

> [@Cuprum](#):
>
> Hmm, may-be not so relevant here, but what happens, if the door changes state multiple times between the 5 minutes?

In that case the flow will also be triggered multiple times (after 5min)

> [@Cuprum](#):
>
> Or, if someone steps in&out every minute (and accidentally steps also exactly aft 5 minutes) then anyway D2.2 is executing payload ( despite, the door was closed during 5 minute)

Correct, there is a small “gap” in this flow.

- When the door opens and closes
- after 5minutes the second flow will start
- When at that exact moment the door is opened again, you will get the message

As long as the door is closed pretty quick after opening that risk small

> [@Cuprum](#):
>
> is the flow “D1.2” stopped, if door closes during 5 minutes?

The flow will not stop. Every time the door opens after 5 min the other flow will be triggered (by the card in THEN)

> [@Cuprum](#):
>
> Yeah, may-be i’m toooo pedantic 😉 But such “small details” are important to make home acting exactly, as we want, but not to thinking by themselves

I agree, its a trade-off between complex flows (and how much time you want to spent on them ) and robustness.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [January 29, 2022, 4:40pm UTC](https://community.homey.app/t/motion-detected-flow/59327/8 "2022-01-29T16:40:54Z")

</div>

Thanks for explaining @FKey !

> [@Cuprum](#):
>
> But such “small details” are important to make home acting exactly, as we want, but not to thinking by themselves

To me you sound like you need Homey Pro.  
The Cloud version is very basic (and intended to be easy to operate).  
With a Pro, you can create flows exactly like @Sortberg proposed  
1.  
When…  
door is opened  
Then…  
Start _or replace_ timer X, which runs for 5mins

1. 

When…  
timer X has finished  
And…  
door is open  
Then…  
Send push message to user A

1. 

When…  
door is closed  
Then…  
stop timer X

The last flow causes no push messages to be sent, while the timer does not finish and thus doesn’t trigger flow 2 (which sends the message).

As long as there isn’t a timer like Chronograph available @ Homey cloud, the best you can do is with the flows I suggested [here](https://community.homey.app/t/motion-detected-flow/59327/5)

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [January 29, 2022, 4:59pm UTC](https://community.homey.app/t/motion-detected-flow/59327/9 "2022-01-29T16:59:56Z")

</div>

`For the NON-Timer users (Homey Cloud)  
Make a Numeric variable, value=0, called DoorOpen, and use it in the next two flows:  
[https://homey.app/f/lSlMCW/](https://homey.app/f/lSlMCW/)  
[https://homey.app/f/G1vMCW/](https://homey.app/f/G1vMCW/)

---

<div class="post-metadata">

**Author:** ![Homey2](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/homey2/32/37387_2.png) [@Homey2](https://community.homey.app/u/Homey2)\
**Post date:** [February 22, 2022, 9:25am UTC](https://community.homey.app/t/motion-detected-flow/59327/10 "2022-02-22T09:25:28Z")

</div>

Alternative: use the built-in function “zone active for x min”.

1. Create the zone with the front door sensor in it (I assume the sensor stays on as long as the door is open and off when closed.
2. Add a flow as per below

![Screenshot 2022-02-22 112453](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/f/3fb8a6d9d563dc7e90cadf722a276d41065b53b4.png)

---

<div class="post-metadata">

**Author:** ![Homey2](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/homey2/32/37387_2.png) [@Homey2](https://community.homey.app/u/Homey2)\
**Post date:** [February 22, 2022, 9:27am UTC](https://community.homey.app/t/motion-detected-flow/59327/11 "2022-02-22T09:27:04Z")

</div>

Sorry I missed the 3rd post which says already what I wrote. Apologies
