Patent attributes
A method for providing an alarm for a window comprises calculating a first distance between a detector mounted within a movable portion of the window and a window frame edge and calculating a second distance between the detector and the window frame edge. The method further comprises determining whether the movable portion of the window has remained stationary for more than a predetermined time period based on the first distance and the second distance and, if the movable portion has remained stationary for more than the predetermined time period, storing the second distance in a memory, placing the security apparatus into an active alarm state, calculating a third distance observed by the detector, determining a change between the third distance and the second distance, determining whether the change exceeds a predetermined distance, and generating an alarm signal if the change exceeds the predetermined distance.