# Zigbee2 Motion sensor giving false positives

**URL:** <https://discourse.nodered.org/t/zigbee2-motion-sensor-giving-false-positives/85187>\
**Category:** General\
**Created:** [4 February 2024 14:15 UTC](https://discourse.nodered.org/t/zigbee2-motion-sensor-giving-false-positives/85187 "2024-02-04T14:15:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![richiep](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@richiep](https://discourse.nodered.org/u/richiep)\
**Post date:** [4 February 2024 14:15 UTC](https://discourse.nodered.org/t/zigbee2-motion-sensor-giving-false-positives/85187/1 "2024-02-04T14:15:43Z")

</div>

Hey All,  
I'm running a Aqara motion sensor via zigbee2mqtt. This is my only zigbee device, I've had it for a while but I can't get it working.

I have it configured using the lowest sensitivity and a 30s detection interval. The Zigbee dongle is running on a Pi4. It works when someone walks by but I get quite a few false positives at random times, day and night.

I'm in a metal building and the sensor is outside but only about 12 ft away, does this matter?

I changed the zigbee2 trigger interval to 2 seconds and had it write a timestamp to a log file. It looks like the false reads will send 1 or 2 timestamps at a time.

Perhaps there is a workaround in Nodered? Setup the flow so that if more than 2 timestamps come in 4 seconds trigger the rest of the flow. Kinda sloppy.

How can I get accurate reads from this motion sensor?  
Thx  
Rich

[https://www.amazon.com/gp/product/B0B9XZ1D51/ref=ppx\_yo\_dt\_b\_search\_asin\_title?ie=UTF8&psc=1](https://www.amazon.com/gp/product/B0B9XZ1D51/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1)

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [5 February 2024 08:23 UTC](https://discourse.nodered.org/t/zigbee2-motion-sensor-giving-false-positives/85187/2 "2024-02-05T08:23:52Z")

</div>

Motion sensors outside are subject to insects and wind activation.

I use two motion sensors, when both are activated I trigger flow, this reduces most false activations.

You could use something like this to count the activations also

```auto
[{"id":"003a29ba9a264718","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":450,"y":5600,"wires":[["adf83c1f042c91f1"]]},{"id":"adf83c1f042c91f1","type":"join","z":"d1395164b4eec73e","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"4","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":610,"y":5600,"wires":[["c30e76114ee94a2e"]]},{"id":"c30e76114ee94a2e","type":"switch","z":"d1395164b4eec73e","name":"","property":"$count($$.payload)","propertyType":"jsonata","rules":[{"t":"gte","v":"2","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":770,"y":5600,"wires":[["bfb96591f2d31b61"]]},{"id":"bfb96591f2d31b61","type":"debug","z":"d1395164b4eec73e","name":"debug 2479","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":910,"y":5600,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![richiep](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@richiep](https://discourse.nodered.org/u/richiep)\
**Post date:** [5 February 2024 21:25 UTC](https://discourse.nodered.org/t/zigbee2-motion-sensor-giving-false-positives/85187/3 "2024-02-05T21:25:43Z")

</div>

Thx! I'm trying it now, I'll let you know how it goes.  
R

---

<div class="post-metadata">

**Author:** ![richiep](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@richiep](https://discourse.nodered.org/u/richiep)\
**Post date:** [6 February 2024 12:58 UTC](https://discourse.nodered.org/t/zigbee2-motion-sensor-giving-false-positives/85187/4 "2024-02-06T12:58:26Z")

</div>

After a day of trying it seems to be working!

Thanks E1cid.

---

<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:** [20 February 2024 12:58 UTC](https://discourse.nodered.org/t/zigbee2-motion-sensor-giving-false-positives/85187/5 "2024-02-20T12:58:41Z")

</div>

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