# Get push when doorsensor is activated at a sertain time

**URL:** <https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370>\
**Category:** Questions & Help\
**Tags:** flow\
**Created:** [December 28, 2021, 11:31pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370 "2021-12-28T23:31:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [December 28, 2021, 11:31pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/1 "2021-12-28T23:31:11Z")

</div>

Hey!

Have installed some Aqara door sensors but do not understand how to get a flow together the way I want it.

I want that if the door opens between 22:30 and 08:30 (at night) I will get a push to my mobile. If the door is opened at other times, I will not get a push.

However, I also want to get a push when the door is opened if no one is home, even if this happens during the day.

Would like this to be solved without me having to have my gps on on my mobile all the time.

Grateful for help.  
Sincerely

---

<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:** [December 29, 2021, 6:32am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/2 "2021-12-29T06:32:58Z")

</div>

> [@ducken](#):
>
> I want that if the door opens between 22:30 and 08:30 (at night) I will get a push to my mobile. If the door is opened at other times, I will not get a push.

This is quite simple - just one “IF” (opened) “and” time is “NOT” between “daytime”. May-be, only trick here is to select initially “Date & Time” - “Time **is** between” (and after card is put into “and”, then from “…” select “Invert”).

The “no one is home” - another flow. And also little bit more self-study (or possibilities). By simple way - again “sensor triggered” AND card “Presence” - “Nobody is at home”. Also it’s useful to add AND “is daytime”. Unless You get two pushes (from both flows).

About self-study i was talked because here is looooot of threads about presence detection. Smells, someone’s GPS anyway does not working allways, someone’s phone changes MAC, some… but this is not a sensor-pushalarm problem 😉

---

<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:** [December 29, 2021, 9:58am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/3 "2021-12-29T09:58:50Z")

</div>

If you don’t need different push notifications it’s possible with one flow:

**If…**  
— The contact alarm is activated

**And…**  
— Time is not between 08:30 and 22:30  
— Someone is at home  
Or…  
— No one is at home

**Then…**  
— Push notification

---

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [December 29, 2021, 11:33pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/4 "2021-12-29T23:33:00Z")

</div>

Thanks for your replys guys. I will try this last flow and see if it workes.

About when I’m not at home, I have to do this in “presence” right? Does this mean that I always need to have my GPS activated on my phone? Or how does Homey knows noone is home?

Is is possible to make it like when my phone disconnect from my wifi instead?

---

<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:** [December 30, 2021, 1:58am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/5 "2021-12-30T01:58:43Z")

</div>

Without GPS but with WiFi, you can consider the Smart Presence app; this checks your phone connection to your WiFi and thus “your” presence.  
You can use these flow cards (and the inverted versions)

 ![Screenshot_20211230-030212_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/e/ee49bd4a407efa9d2668648dde3d0744e8d729ff.jpeg)

---

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [December 30, 2021, 7:36am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/6 "2021-12-30T07:36:09Z")

</div>

So if I put it like this, should it work then?

If…  
— The contact alarm is activated

And…  
— Time is not between 08:30 and 22:30  
— Someone is present (Smart Presence)  
Or…  
— No one is present (Smart Presence)

Then…  
— Push notification

About Smart Presence app, do I need to do anything for it to work with my wifi or does it just work? Do I need to connect my router/mesh with Homey? I have TP Link M9 as mesh.

EDIT: I have added me and my partners ip adress in smart presence now.

EDIT 2: Just tested this, opened my door and got a push thou I’m home and it is daytime. Tried both “time is between” and “time is not between” but I get push at both wich I don’t want.

---

<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:** [December 30, 2021, 10:17am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/7 "2021-12-30T10:17:11Z")

</div>

Are you sure the presence with the Smart Presence is working as it should? When I used the Smart Presence app I had several fault presences because my iPhone disconnected von time to time from the WLAN.  
It should be very tricky to set the settings in the in Smart Presence app that it work flawless. Another point you need to use fixed IP addresses for the smart phones.

---

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [December 30, 2021, 12:13pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/8 "2021-12-30T12:13:52Z")

</div>

No I’m not sure that it’s working properly. How do I check that?

About giving me a push or not with the flow about the time between, that shouldn’t have anything to do with presence or not, I’m I right? It’s not working anyway.

Haven’t found in my router how to fix the IP but this far it seems that the ip is the same even if I disconnect to wifi.

---

<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:** [December 30, 2021, 1:15pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/9 "2021-12-30T13:15:02Z")

</div>

> [@ducken](#):
>
> How do I check that?

It’s a long time ago when I used this app, so I would please you to inform you in this thread:

> [@\[APP\]\[PRO\] Smart Presence](https://community.homey.app/t/app-pro-smart-presence/33794):
>
> Smart Presence Device Tracking: The app tracks devices by their IP address. You would need to set a static IP address for each device you want to track. This is necessary because if the device’s IP address changes (which can happen with DHCP), the app won’t be able to track it properly. Port Scanning: The app checks whether the specified devices are reachable on the network by attempting to connect to a specified port. Closed ports are often used for this purpose. When a device is con…

I was not satisfied with the app. However, it probably has less to do with the app, but more with the home WLAN.

> [@ducken](#):
>
> About giving me a push or not with the flow about the time between, that shouldn’t have anything to do with presence or not, I’m I right? It’s not working anyway.

You’re wrong. Of course has it something to do with the presence of you and you’re wife. The presence is queried as a condition in the And… section.

Try this flow if it works:

**If…**  
— The contact alarm is activated

**And…**  
— Time is **not** between 08:30 and 22:30

**Then…**  
— Push notification

---

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [December 30, 2021, 5:57pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/10 "2021-12-30T17:57:28Z")

</div>

Ok, will check the thread.

That flow did work!

Isn’t that the same as

If…  
— The contact alarm is activated

And…  
— Time is between 22:30 and 08:30

Then…  
— Push notification

---

<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:** [December 30, 2021, 6:54pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/11 "2021-12-30T18:54:15Z")

</div>

> [@ducken](#):
>
> That flow did work!

What does it mean exactly? Did you get a push notification or not? And what time was it when you tested the flow?

> [@ducken](#):
>
> Isn’t that the same as

In theory yes, but flows sometimes didn’t work when the time card „The time is between“ starts at one day and ends at the other day. So the better and safe way ist to use „is not between“.

---

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [December 30, 2021, 7:05pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/12 "2021-12-30T19:05:31Z")

</div>

I got a push and I tested it now at 20:00.🙂

Just the presence thing to figure out then.

Aha, when it changes the day, good to know.

---

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [December 30, 2021, 10:16pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/13 "2021-12-30T22:16:57Z")

</div>

I mean I didn’t get a push at 20:00.  
Tested just now at 23:10 and now I got a push.

So this works as I want right now🙂

Just set a static ip for my phone in my router.  
By disable my wifi, would it be simulating that I’m not at home and by that tigger the push to my phone? Doing this between hours 08:30-22:30?

---

<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:** [December 31, 2021, 8:03am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/14 "2021-12-31T08:03:51Z")

</div>

> [@ducken](#):
>
> By disable my wifi, would it be simulating that I’m not at home and by that tigger the push to my phone? Doing this between hours 08:30-22:30?

If you use the card „No one is home“ card in the And… section, you have to disable the WLAN on your wife’s smartphone too. Then it should work.

Hint: For the other community members it’s easier to help, when you share your flows. There are options to share a flow or just make a screenshot of the flow in the Homey Web App.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [December 31, 2021, 8:13am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/15 "2021-12-31T08:13:27Z")

</div>

> [@DirkG](#):
>
> you have to disable the WLAN on your wife’s smartphone too. Then it should work.

Nope, Homey doesn’t set you and your family away only by disabling WiFi.

you should set the user away,

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/4/a4309662be7b90b1cad1057567a03e42a459d0cd.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:** [December 31, 2021, 8:28am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/16 "2021-12-31T08:28:15Z")

</div>

If he uses only the cards of the Smart Presence app it should work. The SP app sets the card/device of their smartphones on and off, what means „Home“ and „Away“, depending if they are connected with the WLAN or not, so it should work.  
But because I’m not 100 % sure, that’s the reason why I suggested that he has to inform himself how it works.

That by toggling the SP device card the Homey „Home / Away“ state will not be changed, that’s absolutely right.

---

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [January 1, 2022, 11:12pm UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/17 "2022-01-01T23:12:35Z")

</div>

I have set this up in the and…

 ![Screenshot_20220102-011754_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/f/3fa779abde932b83483be3736d056edcf797286b.jpeg)

I have a static ip for me and my partner in my router and added us as “device” in the SP app in Homey.

Tested by disable me and my wifes wifi but I don’t get any push.

Edit: Does it have anything to do with the defult delay setting in the SP app wich is set to 900 sec/15 min?  
Does this mean that I have to disconnect from wifi at least that time and then if I open the door I will get a push?

---

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [January 2, 2022, 9:00am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/18 "2022-01-02T09:00:40Z")

</div>

I can update you with that the flow above works. I missed that I had to wait 900 sec for the flow to trigger.

Thanks for all your help guys 🙂👍🏼

---

<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:** [January 2, 2022, 9:17am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/19 "2022-01-02T09:17:28Z")

</div>

> [@ducken](#):
>
> Does it have anything to do with the defult delay setting in the SP app wich is set to 900 sec/15 min?  
> Does this mean that I have to disconnect from wifi at least that time and then if I open the door I will get a push?

Yes, I’m pretty sure that this is the reason.  
Did you checked if you and you wife were at home or were away if you tested the flow? That’s really easy!

**Home**

![IMG_0622](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/7/e78ea6f53434a6e3158f5199b57db0883419f325.jpeg)

**Not at Home**

![IMG_0623](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/c/4caee76166881ba44b1970feb9346ec7b82389bf.jpeg)

That’s the reason why I said you have to figure out how the SP app works.

Btw, why are you using “A specific user…” condition cards instead of “Household members home/not home”?

And why you don’t want to use GPS?

---

<div class="post-metadata">

**Author:** ![ducken](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ducken/32/34081_2.png) [@ducken](https://community.homey.app/u/ducken)\
**Post date:** [January 2, 2022, 10:11am UTC](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370/20 "2022-01-02T10:11:15Z")

</div>

About household member, I didn’t think of that but I will try that instead 👍🏼

About GPS I think mostly about battery drainage, avoiding that. Don’t use the GPS often so I think thats why.

Is using the GPS more reliable than the wifi state?

[Next page](https://community.homey.app/t/get-push-when-doorsensor-is-activated-at-a-sertain-time/57370.md?page=2)
