- Magnet gap right at the detection threshold
- Two halves slightly misaligned
- Loose mounting vibrating
Problem Description
Your SONOFF SNZB-04 contact sensor rapidly alternates between open and closed states — sometimes dozens of times per minute — even when the door is not moving. This 'flapping' triggers repeated automation runs, fills up event logs, and drains the battery. It happens when the magnet sits right at the reed switch activation threshold, where tiny vibrations cause the contacts to bounce.
Why This Happens in Real Homes
A SONOFF door sensor flapping between open and closed usually has its magnet gap sitting right at the detection threshold — so tiny movements (a door rattling in a draft, a slightly loose mount, or vibration) push it just across the line repeatedly, producing phantom open/close events. It's a borderline alignment issue.
Bring the two halves closer together and align them precisely so the closed gap is well within the detection range, not on the edge, and re-secure both halves firmly (fresh adhesive or screws) so nothing shifts or vibrates. A shim can keep the gap consistent on an uneven frame. Replace a low battery, strengthen the mesh, and reduce interference. A solid, well-within-range alignment stops the flapping.
Symptoms
- Rapid open/close flapping
- Sensor toggles repeatedly
- Phantom open/close events
- Flapping state
- Repeated triggers without use
- State bounces
- Erratic open/close
- Nuisance flapping alerts
Recognize these? Here's what usually causes it.
Common Causes
- Magnet gap right at the detection threshold
- Two halves slightly misaligned
- Loose mounting vibrating
- Weak signal causing flaky reports
- Low battery
- Door/frame movement (drafts, HVAC)
- Adhesive shifting
- Interference
Most fixes happen in the first 3 steps.
Do not leave noisy flapping sensors in security-critical automations.
Tools & Requirements
These tools will help you complete this fix.

replacement battery
EBL Pack of 8 AA Batteries 2800mAh High Capacity Pre...

mounting tape or screws
16 Pieces Double-Sided Mounting Tape Compatible with...
As an Amazon Associate we earn from qualifying purchases.
Step-by-Step Solution
Check the magnet gap distance
Open-close flapping (rapid alternation between open and closed states) happens when the magnet is right at the reed switch's activation threshold. The magnetic field is just barely strong enough to close the reed switch — any vibration (wind, foot traffic, HVAC vibration) causes the contacts to bounce. Fix: move the magnet closer to the sensor (reduce the gap to under 10mm). When the gap is too large (15-20mm), the reed switch is in a marginal zone where small vibrations cause rapid state changes. You should hear a definitive 'click' through the sensor body when the door closes if the magnet is close enough.
Secure the sensor and magnet mounting
If the adhesive has weakened and the sensor or magnet has shifted even slightly from its original position: the gap changes and causes flapping. Press on both the sensor and magnet to check if they are firmly attached. If either one moves or rocks: remove it, clean the surface with isopropyl alcohol, and reattach with fresh 3M VHB tape (included with the SNZB-04) or a small dab of E6000 adhesive. For metal door frames: the metal can interfere with the magnetic field — mount the sensor on the door (wood) and the magnet on the frame, not the other way around.

Needed for this step
16 Pieces Double-Sided Mounting Tape Compatible...
This helps complete the fix you are currently reading.
$5.89Check for nearby magnetic interference
Other magnets near the sensor can cause false triggers. Common sources: magnetic door catches, speaker magnets, magnetic phone mounts, or even another SNZB-04 sensor mounted on an adjacent door. If two contact sensors are within 50mm of each other: their magnets can cross-trigger the other sensor's reed switch. Space sensors at least 100mm apart. Also check for large ferrous metal objects (steel door frames, iron railings) near the sensor — they can redirect the magnetic field in unexpected ways.
Add debounce in your automation platform
If the physical installation is correct but you still get occasional false open/close events (1-2 per day): add debounce logic in your automation. In Home Assistant: use a template sensor with a delay filter, or add a 'for:' condition in your automation trigger (e.g., 'trigger when state is open for at least 3 seconds'). In eWeLink scenes: there is no built-in debounce, but you can add a condition that checks if the sensor has been in the new state for more than a set duration before triggering the action. This filters out sub-second flaps.
Replace the sensor if the reed switch is worn
Reed switches have a mechanical lifespan. After hundreds of thousands of cycles (years of use on a frequently opened door), the reed contacts can develop pitting or micro-welding that causes intermittent contact — the switch 'bounces' between open and closed on its own. If you have tried all alignment and mounting fixes and the sensor still flaps: the reed switch is likely worn. Replace the SNZB-04. They are inexpensive ($8-10 USD) and re-pairing to the Zigbee Bridge takes 30 seconds.
Quick Solutions
Still having issues? This is usually the deeper cause below.
If this comes back after following these steps, check whether a recent app or firmware update reset a default setting — the fix works, but the setting gets reverted silently.
Contact sensor alignment should be verified after any door hardware shift.
This issue almost always looks more complex than it is — the majority of cases trace back to a single setting, a stale credential, or a default that shipped wrong.
- Magnet gap right at the detection threshold
- Two halves slightly misaligned
- Loose mounting vibrating
- Weak signal causing flaky reports
- Low battery
Before you go — try one of these (they fix most cases).
Most popular upgrades chosen by Sonoff Contact Sensor Flapping owners.
As an Amazon Associate we earn from qualifying purchases.
Official Manufacturer Manual
SONOFF provides official product documentation through their online manual rather than downloadable PDF. Access setup guides, troubleshooting steps, and product specifications for your Sonoff Contact Sensor Flapping.
Source: sonoff.tech
Need More Help? SONOFF Support
Note: The contact information below connects you directly to SONOFF's official customer support team, not Trunetto. They can help with warranty claims, device replacements, and advanced technical issues.
Accessories owners commonly pair with Sonoff Contact Sensor Flapping.

SONOFF Zigbee 3.0 USB Dongle Plus Gateway, Universal Zigb...

SONOFF Zigbee 3.0 USB Dongle Plus-E Gateway, Universal Wi...

SONOFF Zigbee Indoor Temperature Humidity Sensor, SNZB-02...
As an Amazon Associate we earn from qualifying purchases.





