Skip to content
Guide

Door and window sensors: 10 automations that are worth setting up

Updated

A $10–$25 contact sensor does far more than guard the front door. Ten practical automations, from open-window alerts to a fridge door left ajar, plus battery and protocol basics.

As an Amazon Associate we earn from qualifying purchases. Links to Amazon on this page are affiliate links: buying through them costs you nothing extra.

What a contact sensor does, and what it does not

The sensor has two parts: a body with the radio and battery, and a small magnet. When the magnet moves away from the body, usually by about half an inch to an inch (check the maker’s limit), the sensor sends “open”. It reports state changes only. It does not detect a person, it cannot tell you why a door opened, and it does not sound an alarm by itself unless your hub or the sensor has a siren attached. That simplicity is the strength: contact sensors are inexpensive, reliable and almost never false-trigger.

Ten automations worth setting up

  1. Front or back door left open. Send a notification if a door stays open for five minutes. Useful with kids, dogs and wind.
  2. Away alert. When nobody is home, any door or window opening sends a priority alert and turns on a light or a siren. Pair with phone presence; see geofencing fixes if arrival detection is unreliable.
  3. Pause heating or cooling when a window opens. Have the thermostat set to away or off after a window has been open for two minutes, and restore it when it closes. The logic follows the Department of Energy’s thermostat advice: turn heating and cooling back when you do not need them, which it says can save as much as 10% a year at 7–10°F for 8 hours a day. A window open to the weather is a clear case.
  4. Garage side door and gate. Alert if the side door opens after 10 pm. For the overhead door itself, use a tilt sensor or an opener with built-in status instead of a contact sensor taped to a moving panel; see retrofit garage door openers.
  5. Mailbox. A contact sensor inside the flap tells you when mail arrives. Use a Zigbee or Thread model with a good signal, since metal boxes block radio waves; place a repeater near the window or test the range first.
  6. Refrigerator and freezer door ajar. Notify after two minutes. The U.S. government’s food safety guidance keys on 40°F, the temperature perishable food should stay at or below, and a door left ajar lets the fridge drift above it. See refrigerator and freezer temperature alarms for a sensor that watches temperature itself.
  7. Medicine cabinet or liquor cabinet. Log or notify when it opens, helpful for caregivers and homes with young kids. It is a reminder tool and a supplement to locking medicines and chemicals away, not a replacement.
  8. Closet and pantry lights. Turn on a smart bulb or LED strip when the door opens, off when it closes. Quick, battery-friendly and a nice first automation.
  9. Bedtime check. At 10:30 pm, a voice or phone summary lists any door or window still open. Many ecosystems can read “which sensors are open”.
  10. Basement or pool gate. Alert when a child-safety gate or basement door opens. It reduces the chance you miss it, but it does not replace barriers, locks or adult supervision.

Pick the protocol first

ProtocolNeedsBatteryNotes
ZigbeeZigbee hub, speaker with a Zigbee radio or a USB coordinatorOften a year or more on a coin cellLow-cost, wide range, mesh through mains-powered devices
Z-WaveZ-Wave hubOften a year or moreUS 900 MHz band avoids Wi-Fi crowding
Thread / MatterMatter controller and Thread border routerLow-power by designWorks across Apple Home, Google Home, Alexa and SmartThings
Wi-FiRouter onlyShorter, depends on the modelNo hub, but each device uses a Wi-Fi slot

The Connectivity Standards Alliance describes Zigbee as a low-power mesh that is optimized for battery life, and the Thread Group describes Thread as a low-power IP mesh built on IEEE 802.15.4. Matter, per the Alliance, keeps control local and lets several ecosystems share a device. If you are unsure which to pick, read Matter vs Zigbee.

Install and test

  1. Clean and dry the surface. Adhesive fails on dust, texture and paint that is flaking.
  2. Put the sensor body on the frame and the magnet on the moving part, with the gap small when closed. Use the alignment marks on the case.
  3. Test the gap. Open the door a half inch at a time and watch the app. Adjust until it reports closed reliably.
  4. Name each sensor by location, such as “Back door” or “Pantry”, before you build automations.
  5. Replace the battery when the app warns you. A cold garage shortens coin-cell life.

Pitfalls

Shop by need

Starter automation: front door and one window alert

What to look for: compact Zigbee or Thread contact sensor, coin-cell battery, adhesive mount, low-battery alert in the app

Typical price: $10–$35

See options on Amazon

Fridge, cabinet or mailbox

What to look for: small contact sensor with a short magnet gap and a protocol with good range, plus a repeater near metal enclosures

Typical price: $10–$30

See options on Amazon

Sliding window or wide gap

What to look for: sensor rated for a larger magnet gap or a slider kit, test-gap in the instructions

Typical price: $12–$35

See options on Amazon

Matter ecosystem across Apple Home, Google Home and Alexa

What to look for: Matter over Thread contact sensor, compatible Thread border router, replaceable battery

Typical price: $20–$40

See options on Amazon

Frequently asked questions

What can a door and window sensor automate?

Open-door alerts, pausing the thermostat when a window opens, lights in closets and pantries, mailbox notifications, away-mode alarms and fridge-door-ajar reminders. Anything that depends on “open” or “closed” works.

Do door sensors work without a hub?

Wi-Fi sensors do, but battery life is shorter. Zigbee, Z-Wave and Thread sensors need a hub, a speaker with the right radio or a USB coordinator, but run longer on a battery.

How long do contact sensor batteries last?

Many Zigbee and Z-Wave contact sensors run a year or more on a coin cell. Cold locations and frequent openings shorten that. Set a low-battery alert and keep spares.

Can a door sensor replace a smart lock?

No. A contact sensor only reports whether a door is open or closed. It does not lock, unlock or authenticate anyone.

Sources

  1. Connectivity Standards Alliance — Zigbee
  2. Connectivity Standards Alliance — Matter
  3. Thread Group — What is Thread
  4. FoodSafety.gov — Food safety during a power outage
  5. U.S. Department of Energy, Energy Saver — Thermostats

Related pages