# Logic for 2 or more motion sensors covering an extra

**URL:** <https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114>\
**Category:** Questions & Help\
**Created:** [January 27, 2019, 5:48pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114 "2019-01-27T17:48:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Groundhog](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Groundhog](https://community.homey.app/u/Groundhog)\
**Post date:** [January 27, 2019, 5:48pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/1 "2019-01-27T17:48:37Z")

</div>

Does anyone have help with this?

I have 2 motion sensors covering my kitchen. The first one is at the door and reliably detects someone coming in but it doesn’t cover the whole kitchen sufficiently so I installed a 2nd one. Both set to motion alarm cancellation 300s.

My current flow for 1 sensor is…

Flow 1 : If motion sensor 1 turned on AND 6pm to 6am , Then turn on light AND stop countdown timer  
Flow 2 : if motion sensor 1 turned off AND 6pm to 6am, start countdown timer x min  
Flow 3 : When countdown timer = 0

How do I add a 2nd sensor?

I tried what i thought made sense but it ends up not turning off the lights.

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [January 27, 2019, 5:56pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/2 "2019-01-27T17:56:28Z")

</div>

Change flow 1 and 2 to trigger on “devices” card, with the option "an alarm turned on /off, with the value “motion sensor”.  
then add in the AND column a logic card to check the trigger card’s zone (which is a tag) = kitchen and for the motion off also if all motion sensors are off (also “devices” card), then you even can add a 3th or 4th etc motion sensor as long as you place it is the zone “kitchen”.

---

<div class="post-metadata">

**Author:** ![Groundhog](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Groundhog](https://community.homey.app/u/Groundhog)\
**Post date:** [January 27, 2019, 6:16pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/3 "2019-01-27T18:16:49Z")

</div>

Hmm I am having problems dragging tags into logic boxes… Very fustrating.

Nvm somehow got it once, but most of time it refuses to stick or just hangs. I wonder if it’s because I hit 16 apps.

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [January 27, 2019, 6:35pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/4 "2019-01-27T18:35:38Z")

</div>

It is not the amount of apps that cause this, just the bad web interface, just keep it hanging about the spot until you see the + icon, or upgrade to homey v2 of course

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [January 27, 2019, 7:25pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/5 "2019-01-27T19:25:15Z")

</div>

I have grouped **3 sensors** in my Kitchen, and also used the **timer app** :

 ![44](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/5/503434412e22dd7042c8d08858ed81a105b86910.jpeg)

No working as it should, yet…☹

I will try @Caseda ’ s suggestion, too:

 ![11](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/6/647984dc5ed79364fa65f1bb789cb558a58c0aa9.jpeg)

---

<div class="post-metadata">

**Author:** ![Groundhog](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Groundhog](https://community.homey.app/u/Groundhog)\
**Post date:** [January 28, 2019, 2:20am UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/6 "2019-01-28T02:20:23Z")

</div>

thanks. a reason to upgrade.

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [January 28, 2019, 10:58am UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/7 "2019-01-28T10:58:55Z")

</div>

@Groundhog  
Upgrade?  
I am still on f/w 1.5.3

---

<div class="post-metadata">

**Author:** ![Groundhog](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Groundhog](https://community.homey.app/u/Groundhog)\
**Post date:** [February 28, 2019, 3:37pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/10 "2019-02-28T15:37:23Z")

</div>

Sorry I’m still struggling. It still shuts down a lot. Is this correct? No use of countdown.

![PNG](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/8/8e16b327a836a812c2db5bf75e80e775ccb3d253.jpeg)

 ![PNG](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/b/bc93a50e2d7d79baee35ee8046264be8144741a2.jpeg)

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [February 28, 2019, 5:30pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/11 "2019-02-28T17:30:59Z")

</div>

well, you give your own answer, use a countdown app if you want an extended periode

---

<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:** [March 1, 2019, 6:03am UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/12 "2019-03-01T06:03:57Z")

</div>

> [@Eternity](#):
>
> I have grouped **3 sensors** in my Kitchen
> 
> ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/0/0fb1bf60fac6380adc167d5897776838196dcbbc.jpeg)

I cant read it but I presume the switch in the “timer” is the same as the switch in the “AND” column?  
Remove that one! It already in the “timer” app functionlaity.

I suspect your problem is the switch never turns on at motion? (That is caused by this “AND”, if it is off, the timer will never be triggered)

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 1, 2019, 9:23am UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/13 "2019-03-01T09:23:25Z")

</div>

@FKey  
Removed that card, but I still am having issues. Went back to the 3 flow solution with a countdown timer after the motion alarm has gone off. That works, albeit with 3 flows.

Thanks for the reply!

---

<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:** [March 1, 2019, 2:49pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/14 "2019-03-01T14:49:22Z")

</div>

Does the flow trigger at all?  
Luminance 8 is pretty low, does it reach that level?  
(My light trigger ON at 22, I had to increase the OFF level otherwise they would go off right away)  
Can’t see the detail of yout timer but it your flow is exactly the same as mine, which works flowless.

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [March 1, 2019, 3:01pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/15 "2019-03-01T15:01:42Z")

</div>

> [@FKey](#):
>
> Does the flow trigger at all?

Will give it another try soon.

---

<div class="post-metadata">

**Author:** ![Groundhog](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Groundhog](https://community.homey.app/u/Groundhog)\
**Post date:** [March 1, 2019, 5:00pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/16 "2019-03-01T17:00:17Z")

</div>

any hints on adding a timer?

---

<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:** [March 1, 2019, 8:25pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/17 "2019-03-01T20:25:58Z")

</div>

@Groundhog In your first flow replace the cove light by a timer ([https://apps.athom.com/app/com.synplyworks.thenmore](https://apps.athom.com/app/com.synplyworks.thenmore)) that triggers that same device (cove light)  
Now you can delete the 2nd flow  
Its all done by the timer app…

---

<div class="post-metadata">

**Author:** ![Groundhog](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Groundhog](https://community.homey.app/u/Groundhog)\
**Post date:** [March 2, 2019, 8:31am UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/18 "2019-03-02T08:31:41Z")

</div>

I dont get it. then how do you turn off the light?

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [March 2, 2019, 11:02am UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/19 "2019-03-02T11:02:55Z")

</div>

it will just become like all the examples given for turning on/off lights with a timer app.

in your “motion turned off” flow, replace the “turn off light” in your [THEN] column, with the (a) countdown app, and set a timer for like 30 seconds. (experiment with the value)

Add a [THEN] card to your “motion turned on” flow with “stop countdown”.

And create another flow with,  
[IF] the timer turned 0, [THEN] turn light off

---

<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:** [March 2, 2019, 7:03pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/20 "2019-03-02T19:03:56Z")

</div>

@Groundhog The timer app automatically turns of the device mentioned in the flowcard.  
Its all-in-one card:  
When the flow is triggered the timer app turns on the light for the defined time.  
When the flow is triggered again it will reset the timer  
When the flow is not triggered anymore and the time has passed the timer app turns off the device.

Its really great in its simplicety.  
There are even more advanced option you can set:  
You can make another flow that trigger the same device with a timer card, with a different time.  
You can cancel the timer (that turns off the light)

---

<div class="post-metadata">

**Author:** ![Groundhog](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Groundhog](https://community.homey.app/u/Groundhog)\
**Post date:** [March 2, 2019, 7:22pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/21 "2019-03-02T19:22:21Z")

</div>

thanks.

my motion sensors have set motion cancellation at 5 mins.

Does that affect the timer timing I should put?

---

<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:** [March 2, 2019, 7:28pm UTC](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114/22 "2019-03-02T19:28:36Z")

</div>

Nope,  
You do not use the motion cancellation as a trigger for a flow. So it will not affect the timer.

[Next page](https://community.homey.app/t/logic-for-2-or-more-motion-sensors-covering-an-extra/8114.md?page=2)
