DEV Community

Xingliao Smart Home
Xingliao Smart Home

Posted on

Why your motion sensor misses someone standing still but fires on an empty room

The failure mode that makes people return motion sensors is not "it does not work". It is the specific, maddening combination of a sensor that ignores a person standing in the doorway and then reports motion in a room nobody has entered for an hour.

Both halves have the same cause, and it is not sensitivity or a defective unit. A passive infrared sensor does not detect people. It detects change in the infrared pattern falling across its field of view.

What a PIR actually measures

The sensing element sits behind a Fresnel lens — that dimpled plastic window. The lens is not decoration; it divides the room into dozens of invisible wedges and focuses alternating wedges onto two (sometimes four) sensing elements inside.

Motion is registered when a warm object crosses from one wedge to the next, so the energy on one element rises while the other falls. The comparator looks at the difference between elements, not the absolute level.

Two things follow immediately, and they explain almost every complaint:

  • A warm object that is not moving produces no difference. Once a person stops, the pattern stabilises, the difference goes to zero, and the sensor reports "clear" — even though a human is plainly standing there. This is why a hallway light switches off while someone is reading a phone in it, and why "occupancy" built on a bare PIR is unreliable for anything slower than walking through.
  • Anything that changes the infrared pattern counts. A sunbeam creeping across the floor as the blind moves, a radiator cycling, a heater vent opening, a cat crossing at the far edge — none of these are people, all of them are change.

Why stillness defeats it, and what "occupancy timeout" hides

Most battery sensors do not send "motion" and "no motion" as two events. They send a trigger, then hold the state for a fixed occupancy timeout — commonly 30 to 180 seconds — before reporting clear again.

That timeout is the reason the behaviour feels inconsistent:

  • Walk past slowly, and the sensor retriggers often enough to look correct.
  • Stand still, and the light drops out after the timeout even though you never left.
  • Sit down somewhere the lens has few wedges — directly under the unit, for example — and you may never retrigger at all.

The fix is almost never "a more sensitive sensor". It is placement that puts the expected path across the wedges, plus a timeout long enough to cover the slowest realistic activity in that room. For a hallway, 30–60 seconds is fine. For a room where someone reads or works, you want minutes, or you want a different technology.

The direction of travel matters more than speed

This is the single most useful thing to know, and it is rarely stated.

PIR wedges are arranged so that movement across the field of view (tangential) produces large, fast differences between elements. Movement directly toward the sensor (radial) produces almost none, because the warm object stays within the same wedge while it approaches.

Practical translation:

  • Mount the sensor so people walk across its view, not straight at it. A sensor at the end of a corridor facing down its length is the worst possible placement — everyone approaches radially and arrives late or not at all.
  • A sensor on a side wall, looking along the room, sees tangential movement and triggers early and reliably.
  • This is also why staircases are difficult: you approach radially and the geometry is vertical, so the wedges are crossed slowly.

The false triggers, and where they come from

Almost every ghost trigger is a heat source moving or switching:

  • Sunlight through a window. The classic. Direct sun on a floor or a sofa heats a patch, a shadow edge moves across it, and the pattern changes. Moving the sensor so it cannot see the sunlit floor is more effective than any sensitivity setting.
  • Heater and air-conditioning outlets. A vent opening throws a moving thermal front across the room. Keep sensors well away from supply ducts and radiators — metres away, not centimetres.
  • Curtains and blinds moving over a warm radiator. The curtain is not warm enough to matter; the changing exposure of the radiator behind it is.
  • Pets. "Pet immune" is not a species filter. It is a combination of mounting height, lens masking, and pulse-count thresholds tuned to ignore small thermal masses at floor level. It reduces dog and cat triggers substantially; it does not eliminate them, and a large dog walking under a ceiling-mounted sensor will still trigger it. If pets are the problem, mount lower and mask the floor zone, or use the sensor to detect people-shaped change with a camera instead.

Where to put it, in order

  1. Height: roughly 2.0–2.2 m for a wall-mounted room sensor, which points the wedges slightly downward and keeps the floor in view. Corner mounting is ideal because it gives you a diagonal, tangential view of the whole room.
  2. Orientation: face the likely path of travel sideways on, not head-on.
  3. Avoid, deliberately: direct sunlight, supply air vents, radiators, and anything that moves on its own — a hanging plant near a vent, a cat flap, a doorway that swings.
  4. Do not aim it at a window even if that is where the intruder would come from. Sunlight through glass will generate more false alarms than the entry you are guarding.
  5. Test in the actual conditions. Walk the real route at the real speed, then stand still for the length of the timeout and watch whether the state holds.

One constraint worth knowing before you buy: the physics is identical across protocols. What changes between a ZigBee PIR sensor and a Matter-over-Thread one is how reliably the trigger gets home and whether the unit can be mains-powered. Mains or USB-C powered units can report instantly and even act as routers for the mesh; battery units trade latency for placement freedom, and on a sleepy battery device the report may arrive a beat or two after the event.

When a PIR is simply the wrong tool

There are three cases where you should not solve this with placement:

  • You need to know someone is present, not that they moved. A desk, a sofa, a bed. Use pressure, contact, mmWave presence radar, or a camera with person detection. No amount of repositioning makes a PIR report "still here".
  • The space has moving heat sources you cannot remove. A kitchen with a boiling kettle and a running oven is a hostile environment for PIR.
  • You need the event to be trustworthy. A leak, smoke or door sensor reports a state; a PIR reports a change. If your automation is "nobody is home", build it on several independent signals rather than one motion timeout.

The one-line version

Stop asking whether the sensor is sensitive enough. Ask whether the person crosses the lens wedges, whether the room has competing heat sources, and whether the occupancy timeout matches how still people actually are in that space. Get those three right and a modest sensor behaves better than an expensive one pointed the wrong way.

I work on the manufacturing side of this category, so take that with the usual grain of salt — but this is also the diagnosis that costs nothing to test. If you are choosing between units, the sensors and alarms range lists the detection angle, power source and protocol for each model, which are the three things that actually change the outcome.

Top comments (0)