# Motion sensors, node red, and HA

**URL:** <https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [28 June 2024 03:49 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023 "2024-06-28T03:49:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charlietuna](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@Charlietuna](https://discourse.nodered.org/u/Charlietuna)\
**Post date:** [28 June 2024 03:49 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023/1 "2024-06-28T03:49:19Z")

</div>

Hi all,  
I'm a newbee. I've isolated my problem to not understanding motion sensors. I have a event node tied to a zigbee motion sensor. The event node is simply tied to a debug node so I can tell when it's triggered. With motion the event node is triggered, however when additional motion takes place the debug node is not triggered. I don't have any exceptions checked as below.

 ![eventStateNode](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/5/45771561d4974285ddf069dec75eda0546bf3573.png)  
I thought the sensor would fire anytime motion is detected. What am I missing?  
TIA,  
Steve

---

<div class="post-metadata">

**Author:** ![Johnnybegoode](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/johnnybegoode/32/88032_2.png) [@Johnnybegoode](https://discourse.nodered.org/u/Johnnybegoode)\
**Post date:** [28 June 2024 05:38 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023/2 "2024-06-28T05:38:30Z")

</div>

Take into account all motion sensors have a 'reload' time, often by default 1 minute before regaining the no-motiion state. Varies from one manufacturer to another and in some cases, but not many, can be adjusted.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 June 2024 07:39 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023/3 "2024-06-28T07:39:29Z")

</div>

After you get a motion detected event, if you wait, do you get an end of motion event a couple of minutes later?

---

<div class="post-metadata">

**Author:** ![Charlietuna](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@Charlietuna](https://discourse.nodered.org/u/Charlietuna)\
**Post date:** [28 June 2024 12:47 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023/4 "2024-06-28T12:47:12Z")

</div>

I do get an off message after 1 minute. l'm starting to think of the minute as a refractory period during which the motion detector will not respond to motion. I'm using a sonoff snzb-03 motion detector.  
Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Charlietuna](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@Charlietuna](https://discourse.nodered.org/u/Charlietuna)\
**Post date:** [28 June 2024 13:12 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023/5 "2024-06-28T13:12:16Z")

</div>

If there is no movement then it will turn off after 1 minute, however if there is movement the refractory period will increase so that it will go off later.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 June 2024 14:39 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023/6 "2024-06-28T14:39:41Z")

</div>

> [@Charlietuna](#):
>
> l'm starting to think of the minute as a refractory period during which the motion detector will not respond to motion.

It is still responding to motion, in the sense that the state is still 'ongoing motion'. You have to build your flow using that concept. Motion start - no event means that movement is still (possibly intermittently) continuing - Motion ended. If you need to know every time there is any motion, even if it is only a few seconds since the last event, then you need a different sensor.

---

<div class="post-metadata">

**Author:** ![Charlietuna](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@Charlietuna](https://discourse.nodered.org/u/Charlietuna)\
**Post date:** [28 June 2024 16:02 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023/7 "2024-06-28T16:02:41Z")

</div>

Thanks for your help. I believe I understand now how it works. It seems a bit strange. I think I will simply set stoptimer for the time I want the light on which will be greater than the refractory period. I might restart the timer when the state off triggers from the sensor. That will extend the time by 1 minute. Then the trigger on state can occur again.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [28 June 2024 17:17 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023/8 "2024-06-28T17:17:52Z")

</div>

> [@Charlietuna](#):
>
> sonoff snzb-03

This sensor will not emit an event if occupancy remains true, only when it no longer detects motion it will emit an event again.

ie.

```auto
if motion detected > event > occupancy = true
   if motion detected within 1 minute > nothing 
   if no more motion > event > occupancy = false

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 July 2024 17:18 UTC](https://discourse.nodered.org/t/motion-sensors-node-red-and-ha/89023/9 "2024-07-12T17:18:31Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
