# Aqara door and window sensor alarm if door has been open for x seconds

**URL:** <https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [October 27, 2023, 5:39pm UTC](https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999 "2023-10-27T17:39:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wahllstreet](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wahllstreet/32/62859_2.png) [@Wahllstreet](https://community.homey.app/u/Wahllstreet)\
**Post date:** [October 27, 2023, 5:39pm UTC](https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999/1 "2023-10-27T17:39:22Z")

</div>

Hi. I have a cold storrage room for food in my house. I have mounted aqara door and window sensor to alert me if the door is not closed after x amount of time. How do I set it up? Im have only been able to set alarm when the door is opened, but I only want the alarm if the door is not closed after 30 sec. Thanks.

---

<div class="post-metadata">

**Author:** ![Christiaan\_de\_Wit](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/christiaan_de_wit/32/18364_2.png) [@Christiaan\_de\_Wit](https://community.homey.app/u/Christiaan_de_Wit)\
**Post date:** [October 27, 2023, 7:54pm UTC](https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999/2 "2023-10-27T19:54:36Z")

</div>

Hi @Wahllstreet,  
You can use the CountDown app to achieve what you want. When the door sensor triggers, you can start a timer to count down from the desired amount of seconds or minutes. In another flow, you can trigger a warning (push message, light color change, spoken message on smart speaker, …) once the timer reaches 0.  
Here a [link to the Homey App store for CountDown](https://homey.app/nl-nl/app/nl.bevlogenheid.countdown/CountDown/)

---

<div class="post-metadata">

**Author:** ![Wahllstreet](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wahllstreet/32/62859_2.png) [@Wahllstreet](https://community.homey.app/u/Wahllstreet)\
**Post date:** [October 27, 2023, 8:16pm UTC](https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999/3 "2023-10-27T20:16:38Z")

</div>

Thank you so mutch. This was exactly what I needed. Thanks.

---

<div class="post-metadata">

**Author:** ![Wahllstreet](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wahllstreet/32/62859_2.png) [@Wahllstreet](https://community.homey.app/u/Wahllstreet)\
**Post date:** [October 27, 2023, 8:19pm UTC](https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999/4 "2023-10-27T20:19:09Z")

</div>

@Christiaan_de_Wit  
Is it possible to make the voicemessage I have created to repeat itself every 10 sec or so until the door is closed?

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [October 27, 2023, 8:59pm UTC](https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999/5 "2023-10-27T20:59:26Z")

</div>

You can try to make also a timer with the app Chronograph or Countdown.  
When you’re current timer is sending the push warning there you can start another timer again for ten seconds.  
IF timer is ready  
THEN start a flow

IF this flow is started  
THEN create a voice message.  
And start the timer again

IF the door is closed  
THEN stop the timer.

---

<div class="post-metadata">

**Author:** ![Dawid](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dawid/32/80637_2.png) [@Dawid](https://community.homey.app/u/Dawid)\
**Post date:** [October 27, 2023, 11:21pm UTC](https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999/6 "2023-10-27T23:21:18Z")

</div>

You don’t need any timer apps.

After door was opened just add wait 30 sec, and after this time check again if doors are still open. Then send notification. Thats all.  
It has some flaws, but for simple use case like this it will be enough. Especially if this door is not used very often (more than 2 times in 30 seconds) because then you can get false alarms.

Here is my similar scenario with front doors:

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

---

<div class="post-metadata">

**Author:** ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)\
**Post date:** [October 28, 2023, 6:02am UTC](https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999/7 "2023-10-28T06:02:39Z")

</div>

> [@Dawid](#):
>
> then you can get false alarms

That’s one of the problems with the build-in delay function:  
— they can’t be stopped  
— they can’t be restarted while they are running  
— if Homey is restarted (for whatever reason) while a build-in delay is running, the build-in delay is cancelled after restart. A Chronograph App Timer continues after restart.

---

<div class="post-metadata">

**Author:** ![Wahllstreet](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wahllstreet/32/62859_2.png) [@Wahllstreet](https://community.homey.app/u/Wahllstreet)\
**Post date:** [October 28, 2023, 12:52pm UTC](https://community.homey.app/t/aqara-door-and-window-sensor-alarm-if-door-has-been-open-for-x-seconds/92999/8 "2023-10-28T12:52:29Z")

</div>

@Mike1233 Thanks, I will try that
