Motion detection is a boolean quantity -- motion has been detected or it has not.
I'd like to make my home automation more useful and predictive, by detecting motion in a specific direction (a vector). For example, with the floorplan below, if the motion is from the den towards the bedroom, the hallway and bedroom lights should turn on. If the motion is in the opposite direction, then the hallway and den lights should turn on.
+-------------+ | | +------+-----------------------+ | | / \ Bedroom | | Den / Hallway \ | | |---------+ +---------+ | +------+ | \ | | | | | +-------------+ | Bathroom| +---------+
Placing a motion detector at each end of the hallway, facing the other room, would enable some of this logic, but that's very sensitive to the exact location & coverage of the detector (ie., will it alert soon enough to turn on the hallway light, will there be enough distinction between multiple detectors to accurately determine direction, etc). In the mock floorplan, someone exiting the bathroom would likely trigger both hallway motion detectors, turning on both the Den and Bedroom lights.
Does anyone have suggestions or clever ways to detect the direction of motion, without turning your home into a surveillance state with multiple motion detectors covering each possible zone of travel?