# Automation with timers for occupancy detection + node red support?

**URL:** <https://community.homey.app/t/automation-with-timers-for-occupancy-detection-node-red-support/62552>\
**Category:** Questions & Help\
**Tags:** homey-pro\
**Created:** [April 10, 2022, 8:19am UTC](https://community.homey.app/t/automation-with-timers-for-occupancy-detection-node-red-support/62552 "2022-04-10T08:19:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohninNL](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johninnl/32/53914_2.png) [@JohninNL](https://community.homey.app/u/JohninNL)\
**Post date:** [April 10, 2022, 8:19am UTC](https://community.homey.app/t/automation-with-timers-for-occupancy-detection-node-red-support/62552/1 "2022-04-10T08:19:11Z")

</div>

Hi everyone,

Pardon me for potentially very stupid questions, I’m planning on buying homey pro since we just bought our first house (hurray) so I’m a massive newbie that is trying to understand possibilities and limitations.

I’m reading a lot on detected occupancy but I’m mostly concerned about toilet occupancy since I want to automate the lights there, I’ve come up with the following very simple automation flow and I was wondering if this is doable in homey out of the box (also thought on whether this would/could work \> off course its going to be a issue if someone closes the door but I could create a side step to check for door open stage for a long time

if:  
door closed  
and if:  
motion detected within 0.1 to 2s after door closed  
set occupied: true  
elif:  
door closed  
and if:  
no motion detected within 0.1 to 2s after door closed  
set occupied: false  
elif  
door open \> 180s:  
set occupied: false

Also a friend keeps trying to push me to node red because you can do all kings of crazy stuff in there, however I really like all the build in communication protocols (which will work nicely with my new somfy RTC blinds), can you still use other HA platforms such as node red in conjunction with Homey or are you tight to what homey offers and thats it?

---

<div class="post-metadata">

**Author:** ![Joenoo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/joenoo/32/18671_2.png) [@Joenoo](https://community.homey.app/u/Joenoo)\
**Post date:** [April 10, 2022, 9:21am UTC](https://community.homey.app/t/automation-with-timers-for-occupancy-detection-node-red-support/62552/2 "2022-04-10T09:21:45Z")

</div>

You’ll need multiple flows and timers (separate app), but I would say that’s doable.

About Node Red, you can communicate via MQTT with Node Red and use that alongside or in conjunction with Homey.

Search for MQTT and the MQTT Hub app and read all about it.

---

<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:** [April 10, 2022, 4:54pm UTC](https://community.homey.app/t/automation-with-timers-for-occupancy-detection-node-red-support/62552/3 "2022-04-10T16:54:25Z")

</div>

Whoops

---

<div class="post-metadata">

**Author:** ![JohninNL](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johninnl/32/53914_2.png) [@JohninNL](https://community.homey.app/u/JohninNL)\
**Post date:** [April 10, 2022, 10:11pm UTC](https://community.homey.app/t/automation-with-timers-for-occupancy-detection-node-red-support/62552/4 "2022-04-10T22:11:21Z")

</div>

Why the whoops? It’s that when you do a number 2 and end up in darkness.

---

<div class="post-metadata">

**Author:** ![JohninNL](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johninnl/32/53914_2.png) [@JohninNL](https://community.homey.app/u/JohninNL)\
**Post date:** [April 10, 2022, 10:17pm UTC](https://community.homey.app/t/automation-with-timers-for-occupancy-detection-node-red-support/62552/5 "2022-04-10T22:17:56Z")

</div>

Thanks, anything particular I need to take in to account, you mention the timers is a seperate app, and you would recommend, just a quick browse already shows 4 of them.

---

<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:** [April 10, 2022, 11:06pm UTC](https://community.homey.app/t/automation-with-timers-for-occupancy-detection-node-red-support/62552/6 "2022-04-10T23:06:45Z")

</div>

> [@JohninNL](#):
>
> Why the whoops? It’s that when you do a number 2 and end up in darkness.

No, hehe, I made up some Homey flows for your desired functionality. But not quite right yet, and I can’t get my head around it.  
You can view it if you like, by hitting the red pencil icon on my post

> [@JohninNL](#):
>
> timers

I use Chronograph and happy with it.
