# Zone inactive for x minutes triggers, while there is motion, leaving me in the dark

**URL:** <https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657>\
**Category:** Flows\
**Created:** [May 10, 2024, 1:58pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657 "2024-05-10T13:58:59Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)\
**Post date:** [May 10, 2024, 5:41pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/21 "2024-05-10T17:41:36Z")

</div>

I do not understand. I did use the function to turn of the lights, so the “Zone became inactive for xxminutes” is the only one i did use. Maybe i do not explain it good enough, can you give it a try @Peter_Kawa ? I do not have many more ways to explain it, but i guess you get the issue, so can you give it a try?

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [May 10, 2024, 5:44pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/22 "2024-05-10T17:44:25Z")

</div>

> [@Peter\_Kawa](#):
>
> how many users restart Homey on a daily / weekly base

I can only tell you my case. Never. Only homey firmware updates do that.

I do make efforts in all flows to avoid where I can to trigger at the same time as other flows.

---

<div class="post-metadata">

**Author:** ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)\
**Post date:** [May 10, 2024, 5:49pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/23 "2024-05-10T17:49:44Z")

</div>

> [@Rrrr](#):
>
> I do make efforts in all flows to avoid where I can to trigger at the same time as other flows.

unfortunately i had to restart the HP23 every day, when they had the Silicon Labs ZigBee issue, now i restart the HP23 every 3 day, to keep the RAM and CPU usage low. It is not as good on the HP23 as on the HP19.

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [May 10, 2024, 5:52pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/24 "2024-05-10T17:52:08Z")

</div>

The picture below shows that several messages “zone becomes active” are followed by one “zone becomes inactive. The first messages are triggered by a motion sensor, the latter ones by a contact sensor.

My zone becomes inactive after 1 minute. The time between motion on and off is set to 1 minute. I might have to set zone-inactivity to 2 minutes to give the motion sensor time enough to detect another motion.

@Peter_Kawa when in the dark, maybe you can log if motion is detected?

 ![IMG_3242](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/a/3a58178ecdb659144a6c198f9f3aec579616cd0d.png)

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [May 10, 2024, 5:54pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/25 "2024-05-10T17:54:08Z")

</div>

> [@Peter\_Kawa](#):
>
> The answer was “no, that is not necessary, while Homey almost never reboots” …

Even if the Homey never reboots, it is required to make a fail save system!

---

<div class="post-metadata">

**Author:** ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)\
**Post date:** [May 10, 2024, 6:01pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/26 "2024-05-10T18:01:17Z")

</div>

Even if you are asking @Peter_Kawa , can i ask you to log “The zone been inactive for xxminutes” instead? With a zone you frequentely enter **aftert he zone has been marked as “inactive” for the first time**. I have now logged that, but i am qurios of you findings. What HP versiong are you running?

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [May 10, 2024, 6:21pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/27 "2024-05-10T18:21:39Z")

</div>

That has been logged in the picture. See the few messages “zone garderobe inactief”. When the door opens whilst the zone is inactive, the zone becomes active as expected. What do you expect to see in the log? 2 or more inactive messages? I cannot reproduce that.

I will add som extra flows and logging and distinct between lamp on/off and zone active/inactive.

By the way, Peter can get into the dark because the motion sensor did not send “motion detected”. As he has the problem, he is the only one to do some research.  
My Homey Pro 2023 is on 11.0.0

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [May 10, 2024, 6:59pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/28 "2024-05-10T18:59:25Z")

</div>

The logging of 5 flows:

- on activity detected switch on lamp
- is inactive for 2 minutes switch off lamp
- on activity detected make log entry
- on inactive detected make log entry
- on inactive for 1 minute make log entry

Als messages show up as expected. The delay of the motion sensor is set to 1 minute.  
The question is: After the motion detector has sent “no motion detected” how fast can it detect motion?

 ![IMG_3244](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/7/b7a631a982f68a622b6c93921f8402b65d6e0e2d.jpeg)

---

<div class="post-metadata">

**Author:** ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)\
**Post date:** [May 10, 2024, 8:57pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/29 "2024-05-10T20:57:40Z")

</div>

Thank you @Rmb , My findings in my logging now, is like your’s, I find that disturbing, when my experience without the logging is different. The logging confirmes that the timer start at new again when the zone sais that is no movement.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/2/8233622253b06286792705ee7b7ca3da8102d8a4.png)  
\*The first message is “Zone active”, the one you can not see in the “snip”.

When i implenteded the check of “zone active” after the “zone inactivity XXminutes” everything was solved. There has to be a culprit somewhere. I do not understand this. When i have been in the Zone again, and it is active in app, the lights turned off because the floe said “so”.

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [May 10, 2024, 9:22pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/30 "2024-05-10T21:22:56Z")

</div>

I think you should also log the messages of the motion sensor to be sure.

---

<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:** [May 10, 2024, 9:30pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/31 "2024-05-10T21:30:22Z")

</div>

> [@Rmb](#):
>
> Peter can get into the dark because the motion sensor did not send “motion detected”

That could be, but then it would also fail with the ‘zone is inactive’ trigger + external timer option added. And that was just my perfect solution to the issue.  
And it was not a consequent “left in the dark” scenario, it just happened sometimes, at the most inconvenient times, and of course I did not log it back then. 😉

Well, OK, I’ll setup a test flow for myself as well, maybe it reveals something.

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [May 10, 2024, 9:32pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/32 "2024-05-10T21:32:47Z")

</div>

Now I changed the zone inactivity to 2 minutes, I will first wait to see if I “get into the dark”😉

---

<div class="post-metadata">

**Author:** ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)\
**Post date:** [May 10, 2024, 9:35pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/33 "2024-05-10T21:35:24Z")

</div>

> [@Rmb](#):
>
> I think you should also log the messages of the motion sensor

I do not think it is neccesary because i am pretty sure what i triggered now, but i will do in a test flow.  
I think i will start logging to syslog with the different actions in all of my zones. Something is off, and i think it is Homey 🙂

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [May 10, 2024, 9:40pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/34 "2024-05-10T21:40:17Z")

</div>

Well, in one zone I use a motion and a contact sensor. And I notices that the contact sensor reacts always and faster, compared to the motion sensor.  
I will add extra flows for logging events from the motion sensor.

---

<div class="post-metadata">

**Author:** ![Marius\_Stensrod](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marius_stensrod/32/56540_2.png) [@Marius\_Stensrod](https://community.homey.app/u/Marius_Stensrod)\
**Post date:** [May 10, 2024, 9:45pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/35 "2024-05-10T21:45:05Z")

</div>

In the Zone of my choose now, it is 2 motions sensors from Fibaro, so it is not that simple that it is a mismatch between contact and motion. But i appreciate more logging, because something is off with the “built in” Zone card.

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [May 10, 2024, 11:49pm UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/36 "2024-05-10T23:49:10Z")

</div>

Here are my measurements. I do not see where Homey fails (but I do not have the issue).  
Homey: HP2023  
Measurements are approximate.

Sensor: **Hue motion sensor on Matter**  
I did this three times.  
Test 1: 4% CPU load. Memory usage around 440MB  
Test 2: 2% CPU load. Memory usage around 440MB  
Test 3: 2% CPU load. Memory usage around 440MB

Results: Test 1/Test 2/Test 3  
Tested with both Simple flows and Advanced flows.

1. Zone activity is 71/79/159ms after sensor motion arrives to Homey. This is the time it takes for Homey to process.
2. Motion sensor turns to inactive after 10s. Zone inactivity is 109/150/108ms later.
3. Zone inactive for 1 min is set after 1 minute and 2ms/7ms/5ms: this is a very short time as there is no sensor processing, just the zone timer.

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/7/b7416078c728db1661f225967e921298bb0c84cf.png)

For comparison (very similar):  
Sensor: **Hue motion sensor on Philips Hue app**

1. Zone activity is 95/78/127ms after sensor motion arrives to Homey.
2. Zone inactivity is 98/95/84ms after the sensor inactivity.
3. Zone inactive for 1 min is set after 1 minute and 4ms/3ms/4ms

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [May 11, 2024, 5:24am UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/37 "2024-05-11T05:24:46Z")

</div>

Every time the light is switched off in my zone “Hal first floor” after 2 minutes of inactivity, there is a logging “Zone Garderobe is INactive for 1 minute.  
Quite strange. Anyway, a zone cannot get inactive when it is inactive.  
I will restart Homey.

Edit: after restart, the same thing is happening. It will not happen when I switch on and of the lamp by clicking on the tile.

 ![IMG_3246](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/f/cf4f91d151c58bfbb638a5b40987fd4045ee7df0.jpeg)

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [May 11, 2024, 5:39am UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/38 "2024-05-11T05:39:57Z")

</div>

> [@Rmb](#):
>
> zone “Hal first floor” after 2 minutes of inactivity, there is a logging “Zone Garderobe is INactive for 1 minute.  
> Quite strange. Anyway, a zone cannot get inactive when it is inactive.

It’s two different zones right?

- Hal
- Garderobe

What’s their relationship in the devices hierarchy?  
Can you move them and test again?

---

<div class="post-metadata">

**Author:** ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)\
**Post date:** [May 11, 2024, 5:45am UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/39 "2024-05-11T05:45:45Z")

</div>

The hierarchy is

- House
  - Halls
    - Garderobe
    - Hal 1 floor

For now I am done testing. This is getting to weird. I will have a look some day. I will be watching what is going on.

Edit: wrong trigger on log flows, so my mistake. I will get some more sleep.

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [May 11, 2024, 6:03am UTC](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657/40 "2024-05-11T06:03:27Z")

</div>

It’s very hard to test for. We need an actual case to work with.

My guess is that it’s CPU related or that it may have been fixed already by Athom. I’ll ask Athom.

If we find a case we should also not forget to check if the person is using simple/advanced flows which defines the way THEN cards are run (concurrently/sequentially).

[Previous page](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657.md?page=1)

[Next page](https://community.homey.app/t/zone-inactive-for-x-minutes-triggers-while-there-is-motion-leaving-me-in-the-dark/109657.md?page=3)
