Door & Window Sensors Explained
A door or window sensor is built around one of the simplest and most reliable pieces of technology in home security: a magnetic reed switch. There's no processor deciding whether the door is open, no camera analyzing an image, just two small components that either complete an electrical circuit or don't, depending on whether they're close enough together. That simplicity is exactly why these sensors are so dependable, but it also means correct installation, specifically the gap and alignment between the two halves, matters more than most people realize. This guide covers how the reed switch mechanism actually works, the types of sensors available, and the installation details that prevent false alarms.
How a Reed Switch Sensor Works
Every standard door or window sensor is two separate pieces. The larger piece, mounted on the fixed door frame or window sill, contains the reed switch itself: two thin, ferromagnetic metal strips sealed inside a small glass tube, positioned close together but not quite touching. The smaller piece, mounted on the moving door or window, is simply a magnet. When the door is closed and the magnet sits near the reed switch, the magnetic field pulls the two metal reeds together, completing a small electrical circuit, and the sensor reports a closed state. When the door opens and the magnet moves away, the magnetic field weakens below the threshold needed to hold the reeds together, the circuit breaks, and the sensor reports an open state, typically triggering a chime, notification, or alarm depending on how the system is configured.

Why the Gap Distance Is the Most Important Installation Detail
The single rule that determines whether a door sensor works reliably is the gap between the magnet and the switch when the door is closed. Manufacturers specify a maximum allowable gap, commonly somewhere between half an inch and one inch depending on the specific model and magnet strength, and exceeding that gap means the magnetic field never gets strong enough to close the reed switch, even with the door fully shut. The result is a sensor that constantly reports the door as open, generating persistent false alarms regardless of the door's actual position. Alignment matters just as much as distance: most sensors have small marks or arrows on their housings, and these need to face each other directly, since an off-center or angled magnet weakens the effective field even within the rated gap distance.

Types of Door and Window Sensors
|
Type |
Description |
Best For |
|---|---|---|
|
Surface mount |
Standard two-piece sensor mounted on the visible surface of the frame and door/window |
Most residential doors and windows; simplest installation |
|
Recessed |
Both halves drilled into the frame and door edge, hidden from view |
Higher-end residential or commercial installs where aesthetics and tamper resistance matter |
|
Rollerball |
Uses a spring-loaded plunger rather than a magnet, common on some commercial doors |
Applications where a standard magnetic gap can't be maintained reliably |
|
Wide-gap / garage tilt |
Uses a stronger magnet rated for a larger gap and less precise alignment |
Garage doors and other openings that don't close with the same precision as a hinged door |
|
Weatherproof |
Housed for outdoor exposure and temperature swings |
Gates, sheds, and other exterior openings |
Wired vs. Wireless Sensors
Wired sensors connect directly to an alarm panel or control system via physical wiring run through the wall, offering a highly reliable connection with no battery to replace, but installation is more involved and generally suited to new construction or a significant retrofit where running wire is practical. Wireless sensors use a small radio transmitter to send their state to a base station or hub, making them far easier to add to an existing home with no new wiring required. The tradeoff is a battery that needs periodic replacement, though most modern wireless systems include supervision features that alert when a sensor's battery is running low or when it stops communicating altogether, catching most issues before they become a real gap in coverage.

Installation Steps
- Choose the mounting location. Position the sensor body on the fixed frame and the magnet on the moving door or window edge, as close to the frame's edge as the design allows.
- Clean the mounting surface. Adhesive-mounted sensors need a clean, dry surface for a secure, long-lasting bond; screws are an option for uneven or textured surfaces.
- Align the two halves. Confirm the alignment marks or arrows on each half face each other directly when the door or window is closed.
- Check the gap. Confirm the distance between the two halves falls within the manufacturer's specified maximum, generally under an inch, and stays consistent across the door's full range of motion, including any play in a loose-fitting door.
- Test before finalizing. Open and close the door or window several times, confirming the sensor correctly reports each state change, before considering the installation complete.
- Account for seasonal movement. Wood doors and frames can swell or shrink with humidity changes; re-checking gap and alignment seasonally catches drift before it causes false alarms or missed detections.
What Door and Window Sensors Can't Detect
A reed switch sensor only reports the physical separation of its two halves; it has no awareness of what caused that separation or whether an opening happened at all if the sensor itself was bypassed. It won't detect glass breakage without a separate glass-break sensor, won't detect someone cutting through a wall or floor near the opening, and won't detect a door being forced open in a way that doesn't move the magnet far enough to exceed the gap threshold, however unlikely that specific failure mode is in practice. These sensors are one layer in a broader system, not a complete security solution on their own, which is why they're commonly paired with motion sensors, glass-break detectors, and cameras rather than relied on in isolation.

The Bottom Line
Door and window sensors work through one of the simplest reliable mechanisms in home security: a magnet and a reed switch that either complete a circuit or don't, depending on whether they're within a specified gap of each other. That simplicity means near-zero power draw and no moving parts to wear out, but it also means the gap distance and alignment during installation are what actually determine whether the sensor works correctly, not the sensor's features or price point. Checking the manufacturer's specified gap tolerance, confirming alignment marks face each other, and re-verifying after any seasonal frame movement are the details that separate a sensor that works reliably for years from one that generates constant false alarms.