How do magnetic door alarms work?
Almost all door and window sensors use a "reed switch" to determine when a protected area has been breached. ... Door sensors have one reed switch and one magnet, creating a closed circuit. If someone opens an armed door or window, the magnet is pulled away from the switch, which breaks the circuit and triggers an event.