Door and window contact sensor — after-hours security
Door and window contact sensor in practice: after-hours opening alarms, an audit-ready event log and cable-free mounting — outdoor gates included.
Zespół Nextriv4 min read

A door contact sensor is one of the simplest devices in all of IoT — a magnet and a reed switch, two parts with no moving components — and at the same time one of the most underrated. During working hours an open door surprises nobody, but after hours every opening is an event: the warehouse gate at 2:47 a.m., the server room door on a Sunday, a ground-floor window left open overnight in heating season. The difference between "we found out in the morning" and "security's phone rang within tens of seconds" is often the difference between an incident memo and a real loss. Below we show how a modern contact sensor works, how it differs from the consumer alarm "puck", and how to build supervision on it that doesn't drown anyone in false alarms.
Door contact sensor: how it works and how it differs from an alarm detector
The principle hasn't changed in decades: a magnet goes on the door leaf, a reed switch on the frame. Separating the two by more than 20–30 mm changes the contact state — and that's all the magic. The differences appear in the engineering details:
An enclosure for special duty. Consumer alarm detectors are designed for dry interiors. Nextriv Sense Contact has a UV-resistant IP67 enclosure and a -30…70 °C operating range — it works on an outdoor gate, a manhole cover and a freezer door, where an ordinary "puck" wouldn't survive a season.
A reed switch on a 1.5 m cable. The sensing element is separated from the transmitter by a cable — the reed switch can be tucked by the leaf or into the frame while the transmitter hangs higher up, in a spot with good radio propagation. That solves the classic problem of sensors on metal doors and in basements, where the signal from a device stuck straight onto a steel frame dies.
Three sensors in one. Besides the open/closed state, the device continuously measures temperature (±0.3 °C) and humidity. On a cold room door this means the full picture from one installation: whether the door is shut, what the temperature inside is, and whether humidity is betraying a gasket problem.
Zero cabling, years of operation. The replaceable battery lasts over a decade (depending on configuration and event count), configuration is contactless via NFC, and long-range radio — up to approx. 2 km in built-up areas and approx. 15 km in open terrain — lets a single gateway cover every door and gate across a sprawling site.


After-hours security: from opening to alarm
The sensor itself is only a signal — security is made by what happens next. In the Nextriv platform every opening becomes an event with a code, a status (active → acknowledged → resolved) and room for comments, and notifications go out on channels matched to the recipient: SMS for site security, a card in MS Teams for the facility manager, web push and an audible alarm in the app for the person on duty.
The key to a system people trust is filtering out normality. Notification rules pass only events outside working hours — a hundred gate openings between 6:00 and 18:00 generate not a single alert, but the hundred-and-first at 2:47 a.m. wakes security immediately. If nobody acknowledges the event within the set time, the escalation policy passes it a level up — until someone does. And once the door returns to closed, the system follows up with an all-clear.
There is one more scenario that is easy to forget: silence can be a signal too. A sensor that has stopped reporting — because someone ripped it off or the battery died — is marked offline after just twice its reporting interval. Sabotage and a flat battery don't disappear quietly.

An opening log that stands up to an audit
After hours the fast alarm matters most, but over the long run the log is just as valuable. Sense Contact keeps a non-erasable local record of around 2800 events and measurements, and after a connectivity gap it resends the backlog — the opening history has no "holes" that need explaining. In the platform you can report on events over any period: a recurring PDF with the opening history lands in the site manager's inbox, XLSX/CSV exports feed your own analyses, and the history reaches back up to 5 years — for internal investigations too.
In practice this log earns its keep wherever access is restricted: server room and switchgear doors (every opening outside a maintenance window is an alarm — we covered this in the piece on server room temperature monitoring), medicine stores, comms cabinets scattered across a site. And on cold room doors a contact sensor plays a double role: it alarms on a door left ajar and at the same time shows how fast the temperature is climbing — more in the article on cold zone monitoring.
Not just doors: windows, gates, cabinets and hatches
The same sensor closes several scenarios at once:
- An outdoor warehouse gate — IP67 shrugs off rain and frost; a night-opening alarm reaches security faster than they could walk the perimeter. The full scenario is described in the solution for warehouses.
- Windows in heating season — an open window in an office building or school means heating the street; in direct-trigger mode an opened window can turn down the zone's radiator on its own, with no server involved. More scenarios for commercial sites — in the solution for buildings and offices.
- Cabinets and hatches in the field — an opening log for comms cabinets with an unauthorised-access alarm and a view of the temperature inside.
- Vacant and managed properties — the property manager sees every entry and keeps an eye on humidity at the same time, so damp doesn't go unnoticed.
Where the reed switch guards the entrances, a second sense works well — motion detection inside rooms. A camera-free PIR detector spots after-hours presence in a zone without violating anyone's privacy:

An honest note to close this list: the supervision described here does not replace a certified intruder alarm system where your insurer requires one. Its strength lies elsewhere — it combines opening events with environmental measurements in a single platform, adds an audit-ready log, and reaches the places a classic alarm installation never gets to because running cables doesn't pay.
Where to start
The simplest way is a list of doors whose after-hours opening should wake someone up: the main gate, the server room, the switchgear room, the high-value stockroom, the cold room door. Mounting the sensor means screws or tape and NFC configuration; the "alert only outside working hours" rule is a few clicks. The free Nextriv plan covers 10 sensors, a gateway and 5 alert rules — enough for a single-site pilot with no software fees at all.
Check the pricing or book a short demo — we'll show the full event path: from the gate opening, through the SMS to security, to the log entry you can show an auditor.



