logo elektroda
logo elektroda
X
logo elektroda

Which hassle-free door opening sensor for Home Assistant? Sonoff SNZB-04

p.kaczmarek2 2097 14

TL;DR

  • Choose a Zigbee door sensor like the Sonoff SNZB-04 for a simpler, more reliable Home Assistant setup than WiFi-based sensors.
  • The SNZB-04 uses a CR2032 battery, and the transmitter measures 47 x 27 x 13.5 mm while the magnet measures 32 x 15.6 x 13 mm.
  • Home Assistant users who want a hassle-free door or window sensor will find this useful because it pairs easily and needs little maintenance.
  • The sensor reports open or closed state, battery level, and signal quality, which is enough for straightforward automations.
  • Keep in mind that this battery-powered Zigbee device does not extend network range, and WiFi sensors can still offer more custom scripting but are harder to manage.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • Orange box with Sonoff logo, showing a wireless door/window sensor illustration. .
    Door opening sensors with WiFi communication have already been discussed extensively on our forum. We even managed to find, with our joint efforts, a way to reprogram such sensors based on a module from BK7231 so that they could be activated locally and Home Assistant paired over MQTT. However, this proved to be a rather difficult and problematic task, so here I want to show a simpler and more reliable alternative.

    For comparison - the aforementioned topics about sensors on WiFi:
    Door/window sensor without TuyaMCU - deep sleep and energy saving, OpenBeken .
    Energy-saving (?) battery-operated door/window sensor on WiFi DS06

    So let's start with the purchase. It is said that products on Zigbee are a bit more expensive, but I only paid £35 for the Sonoff SNZB-04. Is there a catch somewhere?
    An orange box of the Sonoff SNZB-04 wireless door/window sensor rests on a wooden surface. Orange box with white SNZB-04 text on the top edge. Back of Sonoff SNZB-04 door/window sensor box with technical specifications. .
    Sonoff SNZB-04 door/window sensor kit with manual and mounting tape on a wooden surface. .
    The sensor is very small indeed. The transmitter measures 47x27x13.5mm and the magnet 32x15.6x13mm. The whole thing is powered by a CR2032 (3V) battery. Normally this sensor works with the manufacturer's gateway, so I'll post its instructions here, but I'll pair it myself with HA via Zigbee2MQTT:
    An open user manual showing steps for adding a sensor to an app and removing the battery insulation sheet. Open user manual of Sonoff SNZB-04 sensor with visible QR code and link to the product manual website. .
    Markings:
    White Sonoff SNZB-04 door/window sensor shown from the back with technical markings, lying on a wooden surface. .

    Pairing with Home Assistant .
    There is not much to tell here. I have Home Assistant set up according to a theme from a couple of years ago, but updated of course:
    Home Assistant tutorial - configuration, WiFi, MQTT, Zigbee, Tasmota .
    Zigbee2MQTT I also updated:
    How do I update Zigbee2MQTT Home Assistant to the latest version? Unsupported device? .
    If we need to, we reset the device according to the instructions, at HA we make sure that pairing is enabled. The sensor should appear in our panel:
    Zigbee2MQTT panel showing device list, including a newly added device labeled as “Unsupported.” .
    The sensor provides its status (open or closed door), battery status (separately true/false determination if low and numerical voltage) and signal quality:
    Configuration panel for the Sonoff SNZB-04 door/window sensor in Zigbee2MQTT. Zigbee2MQTT information panel displaying Sonoff SNZB-04 door sensor status: door open, battery full, voltage 3000 mV, signal quality 81 lqi. Screenshot of the Zigbee2MQTT panel showing the state details of a Sonoff SNZB-04 door sensor, including battery, contact, and signal status. .
    And that's it, you can already do automation based on that.


    Interior of the Sonoff SNZB-04 .
    Now we'll take a look inside, essentially just for educational purposes. We remove the lid:
    Opened Sonoff SNZB-04 door sensor with visible CR2032 battery and PCB on a wooden surface. .
    The PCB can also be removed, it is only held on by the clips:
    Disassembled Sonoff SNZB-04 door sensor on a wooden surface: visible case parts, coin cell battery, and PCB. .
    PCB designation: RB-DS01 V1.0 2020/12/17
    Close-up of a PCB with a CC2530 chip inside a Sonoff SNZB-04 door sensor. Inside of Sonoff SNZB-04 door sensor with visible battery and PCB. Sonoff SNZB-04 sensor PCB with visible CC2530 chip on a wooden surface. Close-up of Sonoff SNZB-04 sensor PCB with prominent CC2530 chip and electronic components. .
    The whole is based on a CC2530, just like the relay shown in the past:
    Sonoff Basic ZBR3, which is the famous relay version on Zigbee. Interior, schematic .
    The whole thing runs directly from the battery, there's no inverter, so it's economical and efficient.

    Summary .
    For small battery-powered devices, just like door/window sensors or temperature sensors, Zigbee is in my opinion by far the better and more convenient choice, even more so if you want to pair the whole thing with Home Assistant. With WiFi-based sensors, this is problematic and the batteries wear out quickly anyway. I guess the only plus of the WiFi-based solution is that it can be scripted a bit more, e.g. such a WiFi-based door-opening sensor, after changing the firmware, can send an HTTP GET packet we specify to the server when an event is detected.... but to what end?
    For most applications, what I have shown here will definitely suffice.
    Finally, this Zigbee device, being battery powered, does not extend the range of our network. This should be kept in mind.
    All in all, I recommend it - especially for this price.
    And which door/window sensor do you guys use? .

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14218 posts with rating 12104, helped 647 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21558492
    TechEkspert
    Editor
    What is the estimated battery life?
  • ADVERTISEMENT
  • #3 21558503
    gulson
    System Administrator
    £35 for a ZigBee sensor is really not much.
    If there is nothing wrong with the design, the battery will last for 2 years.
    I use Aqara, although the price is high.
  • ADVERTISEMENT
  • #4 21558505
    p.kaczmarek2
    Moderator Smart Home
    It depends on how many times the door is opened, but more or less.
    The manufacturer's website about the SNZB-04P states that:
    The image shows a CR2477 battery and information stating it can last up to 5 years. .
    Overall, Zigbee solutions are great for battery-powered devices.
    Helpful post? Buy me a coffee.
  • #5 21559082
    krzbor
    Level 29  
    I recommend AQARA - dimensions 41 x 22 x 11 which is even smaller. All AQARA products are characterised by exceptional aesthetics, which is no small matter when it comes to windows and doors. They can be purchased for as little as £54. I installed such a sensor in the garage to check whether the garage door is closed. I glued the sensor itself to the guide rail and the magnet to the trolley. Be sure to buy the AQARA T1 series. By the way, this type of sensor is easy to convert to a switch. We usually have Zigbee buttons. I have not seen the layout of a classic ON/OFF switch. Here it can be easily done - just wires in parallel to the reed switch, although it is better to solder the reed switch.
  • #6 21559157
    gulson
    System Administrator
    Interesting idea with this redesign, basically you could send the state of any electronic device (even a complex one) that makes a momentary short circuit.
    Thanks!
  • ADVERTISEMENT
  • #7 21559180
    TechEkspert
    Editor
    A good result for such small batteries, Zigbee is, however, highly energy efficient.

    For the more power-hungry, a rechargeable version has been developed in the CR2032 format: LIR2032H
    on Ali at £5 or £10 with USB charger.
  • #8 21559582
    TechEkspert
    Editor
    @p.kaczmarek2 is there any chance to compare the dynamic power consumption to send one message in a sensor with WiFi and zigbee and the power consumption in standby?
    E.g. using a measurement resistor and an oscilloscope showing the voltage drop over time?
  • #9 21559614
    łuki_mar44
    Level 18  
    I personally use Shelly BLU Door/Window .

    Shelly BLU Door/Window wireless sensor in wood-like finish, consisting of two rectangular components. .

    This is a bluetooth contractron connected to my HomeAssistant via an ESP32 Gateway. The manufacturer provides a battery life of up to 5 years.

    As a gateway I chose m5stack-atom-lite you can also substitute this on the most ordinary ESP32 as someone has in his resources.

    Communication: Contraktron <--- Bluetooth ---> Gateway <--- WiFi ---> HA.


    Home Assistant notification about window status – “closed” status from 2 hours ago. .

    Plus automation with notification to phone:

    Home Assistant notifications on a smartphone lock screen about opening and closing a dining room window. .
  • #10 21559777
    TechEkspert
    Editor
    BLE, also an interesting solution, 5 years on CR2032 is very good. I wonder how many times a day they report presence regardless of reed switch activity.
  • #11 21560333
    łuki_mar44
    Level 18  
    From what I can see from the Logs in HA the reed switch only reports when there is an event.
  • #12 21560407
    TechEkspert
    Editor
    Is there monitoring of battery status in addition to events?
  • #13 21560420
    łuki_mar44
    Level 18  
    The reed switch has battery control as much as possible. In addition, window angle + light sensor.


    Shelly Bluetooth panel showing two devices with full battery: window sensor (HST) and kitchen switch. .


    Shelly contact sensor control panel showing battery level, window status, light intensity, and event log. .
  • #14 21560441
    TechEkspert
    Editor
    Not bad, what time does it send status information when no events occur?
  • #15 21560485
    łuki_mar44
    Level 18  
    Unfortunately, as far as I can see, this integration does not have a status entity for this device.

    There is only an option to tick regarding the cyclic querying of entities for the BTHome integration.

    Screenshot of BTHome integration settings in Home Assistant with the system options window open. .

    As far as updating entities is concerned, this only happens when there is a physical change in the opening of a door
    or a change in lighting intensity.

    A graph showing light intensity (lux) readings from a Shelly BLU Door/Window D2D1 sensor for May 2025. .

    P.S. In my spare time, I will try to check if the BTHome integration displays some kind of notification when it loses connection
    with the reed switch.
📢 Listen (AI):

Topic summary

✨ The discussion evaluates hassle-free door/window opening sensors compatible with Home Assistant, focusing on the Sonoff SNZB-04 Zigbee sensor as a simpler and more reliable alternative to WiFi-based sensors requiring complex reprogramming. The Sonoff SNZB-04 is priced around £35, considered affordable for Zigbee devices, with an estimated battery life of up to 2 years depending on usage. Comparisons include Aqara sensors, noted for compact size (41 x 22 x 11 mm), aesthetic design, and a higher price (~£54), recommended especially the AQARA T1 series. Another alternative presented is the Shelly BLU Door/Window sensor using Bluetooth communication via an ESP32 gateway, offering up to 5 years battery life on a CR2032 battery. The discussion highlights Zigbee's energy efficiency and mentions rechargeable CR2032 format batteries (LIR2032H) as an option. Battery status monitoring is limited; reed switches report events only on state changes, with no continuous status updates unless polled cyclically via BTHome integration. Additional sensor features include window angle and light sensors. The conversation also touches on the possibility of converting reed switch sensors into switches by wiring in parallel. Overall, Zigbee sensors like Sonoff SNZB-04 and Aqara provide reliable, low-power solutions for door/window monitoring integrated with Home Assistant, while BLE options like Shelly BLU offer extended battery life with different communication architecture.

FAQ

TL;DR: For Home Assistant users wanting a low-maintenance door sensor, the 47×27×13.5 mm Sonoff SNZB-04 is a strong pick: "Zigbee solutions are great for battery-powered devices." It pairs through Zigbee2MQTT, reports open/closed state plus battery data, and avoids the fast battery drain discussed for WiFi sensors. [#21558505]

Why it matters: This FAQ helps you choose a door/window sensor that is easy to integrate with Home Assistant and does not become a battery-maintenance problem.

Sensor Radio path to Home Assistant Battery / life claim in thread Notable details
Sonoff SNZB-04 Zigbee via Zigbee2MQTT CR2032, approx. 2 years mentioned 47×27×13.5 mm transmitter; shows battery voltage and link quality
Aqara T1 Zigbee approx. 2 years mentioned 41×22×11 mm; praised for aesthetics
Shelly BLU Door/Window BLE sensor + ESP32 gateway + WiFi up to 5 years claimed Adds window angle and light sensor

Key insight: In this thread, Zigbee and BLE beat WiFi for battery door sensors because they reduce maintenance. The simplest Home Assistant path is a sensor that reports only event-driven state changes and battery data.

Quick Facts

  • Sonoff SNZB-04 uses a CR2032 3 V battery, with a 47×27×13.5 mm transmitter and a 32×15.6×13 mm magnet, making it a compact contact sensor for doors and windows. [#21558390]
  • In Home Assistant through Zigbee2MQTT, the Sonoff sensor exposes open/closed state, battery low true/false, numerical battery voltage, and link quality, which is enough for automations and maintenance alerts. [#21558390]
  • The thread gives a practical battery-life expectation of about 2 years for a well-designed Zigbee door sensor, while also noting that actual runtime depends on how often the door opens. [#21558503]
  • Aqara T1 is presented as a smaller Zigbee alternative at 41×22×11 mm and around £54, while Shelly BLU Door/Window is shown as a BLE option with a claimed up to 5 years battery life. [#21559082]
  • Shelly BLU works as sensor → Bluetooth → ESP32 gateway → WiFi → Home Assistant and adds battery monitoring, window angle, and a light sensor, but its integration does not show a dedicated periodic status entity in the thread. [#21560420]

How do I pair a Sonoff SNZB-04 door/window sensor with Home Assistant through Zigbee2MQTT?

You pair it by resetting the sensor and letting Zigbee2MQTT discover it. 1. Reset the SNZB-04 according to the included instructions. 2. Enable pairing in Home Assistant with Zigbee2MQTT active. 3. Wait for the sensor to appear in the panel, then use its entities in automations. The thread describes this as a simple process with no extra gateway required. [#21558390]

What entities and readings does the Sonoff SNZB-04 expose in Home Assistant, such as open/closed state, battery voltage, low-battery flag, and link quality?

It exposes the door state, battery information, and signal quality. In the thread, Home Assistant shows open or closed status, a low-battery true/false flag, a numerical battery voltage value, and link quality. That covers both automation logic and basic health monitoring without extra templates. [#21558390]

How long does the battery typically last in the Sonoff SNZB-04, and what factors most affect CR2032 runtime?

Typical battery life in the thread is about 2 years, but door activity matters. The sensor uses one CR2032 3 V cell, and more frequent opening events will shorten runtime because each event triggers radio activity. One reply explicitly says runtime depends on how many times the door is opened, while another estimates 2 years if the design is sound. [#21558503]

Sonoff SNZB-04 vs Aqara T1 vs Shelly BLU Door/Window — which sensor is the best fit for Home Assistant if I want low maintenance and long battery life?

Shelly BLU Door/Window looks best for maximum battery life, while Sonoff SNZB-04 looks simplest for a straightforward Zigbee setup. The thread gives Shelly a manufacturer claim of up to 5 years, Sonoff about 2 years in practice, and Aqara T1 as a smaller, more aesthetic Zigbee option at around £54. Choose Sonoff for simple Zigbee2MQTT pairing, Aqara for size and appearance, and Shelly for long-life BLE plus extra sensors. [#21559614]

Why is Zigbee usually a better choice than WiFi for battery-powered door/window sensors in Home Assistant?

Zigbee is preferred here because it is more energy efficient and easier to live with on coin cells. The thread says WiFi door sensors are problematic, their batteries wear out quickly, and Zigbee is a far more convenient choice for small battery devices such as door and temperature sensors. As one poster puts it, "Zigbee solutions are great for battery-powered devices." [#21558505]

What is Zigbee2MQTT and why do people use it instead of the manufacturer's gateway for sensors like the Sonoff SNZB-04?

Zigbee2MQTT is middleware that connects Zigbee devices to Home Assistant through MQTT, avoiding dependence on a vendor cloud gateway. In the thread, the Sonoff sensor is paired directly with Home Assistant via Zigbee2MQTT instead of the manufacturer's hub, which gives local integration and immediate access to entities such as contact state, battery data, and link quality. [#21558390]

What is the BTHome integration in Home Assistant, and how does it work with BLE door sensors like Shelly BLU Door/Window?

BTHome is a Home Assistant integration for Bluetooth Low Energy sensors that report data locally without a traditional Zigbee hub. In this thread, Shelly BLU Door/Window sends data over Bluetooth to an ESP32 gateway, and the gateway forwards it over WiFi to Home Assistant. The setup shown is sensor → Bluetooth → gateway → WiFi → HA. [#21559614]

How can I reset the Sonoff SNZB-04 and put it into pairing mode if Home Assistant does not discover it?

Reset the device using the included instructions, then start discovery again in Zigbee2MQTT. 1. Follow the sensor's reset procedure from the manual. 2. Confirm that pairing is enabled in Home Assistant. 3. Retry discovery and check whether the sensor appears in the Zigbee panel. The thread does not list a button timing sequence, so the manual remains the reset reference. [#21558390]

Why doesn’t a battery-powered Zigbee device like the Sonoff SNZB-04 extend the Zigbee mesh range?

It does not extend the mesh because this type of device is battery powered and designed for low-energy end-device behavior, not routing. The thread explicitly warns that the Sonoff SNZB-04, being battery powered, does not increase Zigbee network range. That matters if you expect distant doors or windows to improve coverage automatically. [#21558390]

How does the internal design of the Sonoff SNZB-04 based on the CC2530 affect power consumption and battery life?

Its design helps battery life because it runs directly from the battery and avoids a power converter. The thread identifies the main chip as a CC2530 on PCB RB-DS01 V1.0 dated 2020/12/17, and notes there is no inverter, so the circuit stays economical and efficient. Fewer conversion losses are the key practical advantage here. [#21558390]

What are the dynamic power consumption differences between a WiFi door sensor and a Zigbee door sensor when sending one message and when sitting in standby?

The thread does not provide measured current numbers for either radio. It only states that WiFi sensors drain batteries quickly, while Zigbee is highly energy efficient for battery devices. A later post asks for dynamic send and standby measurements, but no oscilloscope results or shunt-resistor traces are posted, so you should treat the comparison as qualitative here, not numerical. [#21559582]

How can I measure current draw spikes of a door/window sensor with a shunt resistor and oscilloscope to compare WiFi and Zigbee?

This thread does not give a finished measurement procedure. It only suggests using a measurement resistor and an oscilloscope to observe the voltage drop over time during one transmission and in standby. That means the idea is valid as a test concept here, but the post stops before specifying resistor value, sampling setup, or expected waveforms. [#21559582]

How often does the Shelly BLU Door/Window report status to Home Assistant when no door events occur, and how are battery updates handled?

In this thread, it does not show a regular idle status entity, and updates appear only on real changes. The user reports that entity updates happen when the door state changes or light intensity changes, while battery monitoring is available. An edge case is explicit: the BTHome integration shown does not expose a dedicated status entity for this device. [#21560485]

In what way can an Aqara door/window sensor be modified to work like a simple Zigbee ON/OFF switch using the reed switch connections?

You can repurpose it by wiring external contacts in parallel with the reed switch. The thread says this lets the Aqara sensor report the state of another simple contact source, effectively behaving like a Zigbee ON/OFF input. It also recommends soldering directly to the reed switch points for a better result than loose parallel wiring. [#21559082]

What is a reed switch in a door/window sensor, and how does it detect whether a door or window is open or closed?

A reed switch is an electromechanical contact that changes state in a magnetic field, giving a door sensor a simple, ultra-low-power way to detect position. In these sensors, the magnet sits on the moving door or window, and the reed switch sits in the sensor body. When alignment changes, the contact state changes and Home Assistant sees open or closed. [#21559082]
ADVERTISEMENT