
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?




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:


Markings:

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:

The sensor provides its status (open or closed door), battery status (separately true/false determination if low and numerical voltage) and signal quality:



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:

The PCB can also be removed, it is only held on by the clips:

PCB designation: RB-DS01 V1.0 2020/12/17




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.