A contact sensor is a two-part device that reports whether a door, window, drawer or gate is open or closed. One part contains a switch or magnetic field sensor and the radio; the other part is a small magnet. When the two parts are separated by opening the door, the sensor detects the change and sends an event to an alarm panel, a hub or a smart home controller.
In home security, contact sensors are the classic perimeter protection element, because they detect entry at the moment a door or window opens, before an intruder moves through the interior. In smart homes they also serve as simple, reliable triggers for automations, such as switching on a light when a door opens.
How a contact sensor detects opening
Most contact sensors use a reed switch: two thin ferromagnetic contacts sealed in a small glass tube. When the magnet is close, its field pulls the contacts together and the circuit closes. When the magnet moves away, the contacts spring apart and the electronics register an open state. Some newer designs use a Hall effect sensor, which measures the magnetic field electronically and has no moving parts.
| Technology | Principle | Strength | Weakness |
|---|---|---|---|
| Reed switch | Magnetic contacts close mechanically | Simple, no power in idle state | Mechanical wear, sensitive to shock |
| Hall effect sensor | Electronic field measurement | No moving parts, adjustable thresholds | Draws a small constant current |
| Magnetometer | Measures field strength and direction | Can detect tampering with extra magnets | More complex and costly |
| Wired loop contact | Reed switch on an alarm circuit | No battery, supervised wiring | Requires cabling |
The switching gap is the distance at which the sensor changes state. For surface-mounted wireless sensors it is typically about 10-25 mm, depending on the magnet and the mounting surface. Steel doors and frames weaken the magnetic field, so special high-gap or spacer-mounted models are needed on metal.
Wireless protocols and power
Wireless contact sensors spend almost all their time asleep and wake only on a state change or for a periodic check-in. This design gives long battery life on a coin cell, typically one to several years, depending on the protocol, the number of daily openings and the check-in interval.
| Protocol | Typical use | Notes |
|---|---|---|
| Zigbee | Smart home hubs and controllers | Low power, mesh through powered devices |
| Z-Wave | Smart home and some alarm systems | Sub-1 GHz band, good range |
| Thread with Matter | Newer multi-ecosystem setups | IP-based, multi-admin control |
| Proprietary alarm radio | Alarm panels from security vendors | Often encrypted and supervised |
| Wi-Fi | Standalone app-based sensors | Shorter battery life, cloud reliance common |
| Wired | Professional alarm installations | Most reliable, needs cabling |
Security-grade sensors add supervision: the panel expects a regular signal and raises a fault if a sensor goes silent. Many also include a tamper switch that triggers when the cover is opened or the sensor is pulled off the wall.
Contact sensors compared with other security sensors
Contact sensors protect specific openings, while other sensors cover spaces or events. A balanced home security design combines them, because each type misses situations that another detects.
| Sensor | What it detects | When it triggers | Typical gap in coverage |
|---|---|---|---|
| Contact sensor | Opening of a door or window | At the moment of entry | Broken glass without opening |
| Motion sensor | Movement of warm bodies in a room | After the intruder is inside | Areas outside its field of view |
| Glass break sensor | Sound pattern of breaking glass | When a pane is broken | Entry through opened windows |
| Vibration sensor | Shocks on a door or window | During forced entry attempts | Quiet entry with a key |
| Video doorbell | Visitors at the entrance | On motion or button press | Other entry points |
Because contact sensors allow the alarm to be armed while people stay inside, they are central to night or perimeter modes, in which interior motion sensors remain disarmed so residents can move freely.
Installation and practical use
Correct mounting determines reliability. The sensor body usually goes on the fixed frame and the magnet on the moving door or sash, so that the battery-powered part is not shaken by every opening. The alignment marks on both parts should face each other within the specified gap.
- Mount on the opening side of the door, away from the hinges, where the gap grows fastest.
- Use recessed sensors in the frame where appearance or tamper resistance matters.
- Test the open and closed states with the door moving slowly, not only fully open.
- On windows that tilt, consider sensors with tilt detection or a second sensor.
- Check the signal strength at the installation spot before final mounting.
Beyond security, contact sensors drive many comfort and energy automations: pausing heating when a window stays open, switching on closet or pantry lights, announcing when a garage door is left open, or notifying when a medicine cabinet or mailbox is opened.
Limitations and common problems
A contact sensor reports only the state of one opening, and several practical issues can cause false alarms or missed events. Most of them come from mounting and environment rather than from the electronics.
- Loose doors that move in the wind can open the gap briefly and cause false alerts.
- Metal frames reduce the magnetic field and shrink the switching gap.
- Low batteries in cold locations fail earlier, as on garage doors in winter.
- An external magnet can defeat a simple reed sensor unless magnetometer-based tamper detection is used.
- Consumer sensors without supervision may fail silently without a warning.
For insured or professionally monitored installations, local standards define security grades for components; in Europe, the EN 50131 series is the common reference. Consumer smart home sensors often do not carry such certification, which matters when an insurer specifies requirements.
In plain words
A contact sensor is a small device that knows whether a door or window is open. It has two pieces: one sticks to the frame and one to the door. When the door closes, the pieces sit side by side. When it opens, they move apart.
That moment is reported to the alarm or the smart home app. The house learns about an opened door instantly, and it can sound an alarm, send a message or switch on a light.
A real-world example
A family in a ground-floor apartment installs Zigbee contact sensors on the front door, the balcony door and three windows, connected to a local smart home hub with a siren. In the evening they arm a perimeter mode, which watches all openings while interior motion sensors stay off.
One autumn night the balcony door sensor reports an opening at 2:40. The siren sounds within about a second, the hallway lights switch on, and both parents receive a phone notification naming the balcony door. The person trying the door leaves immediately.
During the day, the same sensors run comfort automations: the radiator valves in a room pause heating when a window stays open for more than two minutes, which noticeably cuts heat loss during airing in winter.