SONOFF SNZB-04 ZigBee Door Window Contact Sensor Internal

Finally received my SONOFF SNZB-04 ZigBee Wireless Door Window Sensor ON/ OFF Sync Status on e-WeLink Smart Home Security Works with ZigBee Bridge and got to take it apart and see what's under the hood. Actually came very quick, under 2 weeks with cheapest shipping from AliExpress SONOFF Factory Store, not counting on that to happen again though.

My hope is that these will be a less expensive hacking option than the more feature rich($$) SmartThings contact sensors. "Dry Contact Sensor"
Turns out it's a pretty basic Zigbee sensor with a CC2530, reed switch, reset switch, LED and a battery.
@markus' drivers show the reported open/close states, battery level and he's included a presence monitoring feature.

Anyhow, on with the show:

Package

Vs. SmartThings

All the bits

Side A

Side B

LED Location


3 - Copy

Although the gull wing style reed switch isn't as easy to connect to as the old glass style ones, it appears quite feasible to re-purpose these as dry contact sensors. Yahoo. :smiley:

Discovery

Edit: Although it's not documented anywhere I could find, you want to open the case by splitting it open on the end without the reset pin hole, otherwise you might damage the cover's latch loop.

Opening Case

Pairing Procedure
  1. Pry open the case, starting opposite the reset hole.
  2. Remove battery isolation strip, test battery, replace cover.
    (Edit: Check for "rattle" adjust as needed. I've never bothered to bend the battery contacts. The cover ensures good contact.)
  3. Start HE Zigbee discovery.
  4. Push and hold Reset/Pairing switch until LED flashes.
  5. Wait. If the HE doesn't complete discovery/initialization, repeat steps 3 and 4.
2 Likes

I won’t suggest you checkout the bundle of 10 x Ecolink Zigbee Door/window sensors that include Temp, that are up in Fleabay, at bargain prices. :mask:

1 Like

:wink: Whatever do you mean?
Although those are definitely a deal (on the way :+1:) I think these will have a smaller form factor when taken out of the case. And I don't really want the temp. and tamper functions complicating things.

1 Like

Confirmed as a great "Dry Contact Sensor" of the Zigbee flavour.
A couple bits of wire.
A 1/8" hole and two quick solders and good to go.
And with @markus's SNZB-04 Driver you can select a button or reverse function to suit any application.
:smiley:

A couple pics.

3 Likes

I cannot get these to connect. I had loose battery contacts for 4 units I received, I bent them in to ensure good connection and still, nothing.
I’ve held the buttons down for 5 seconds to get the 3 flash sequence on the led and nothing still. I tried also with my old HE (C1 I think?) and still nothing, also with my smartthings hub (V3?) and even an old smartthings WiFi hub, still nothing. Am I doing something wrong here, or perhaps I received a whole batch of duds??

This has always worked for me.

  1. Pry open the case, starting opposite the reset hole.
  2. Remove battery isolation strip, test battery, replace cover.
    (Edit: Check for "rattle" adjust as needed. I've never bothered to bend the battery contacts. The cover ensures good contact.)
  3. Start HE Zigbee discovery.
  4. Push and hold Reset/Pairing switch until LED flashes.
  5. Wait. If the HE doesn't discover it, repeat steps 3 and 4.

Are you getting any LED activity?

The LED works fine. It will flash 3 Times after holding the reset for 5 seconds.

I’ve even tried holding for the entire scan cycle of the HE and even ST. Still a no go.

I suspect a batch of duds. Perhaps they have a newer firmware that’s not good?

Hopefully not, I just ordered another one.

Have you tried pairing it with a repeater nearby?
Not sure what else you can do... :man_shrugging:

I literally tried pairing all 4 b by placing them on the hubs themselves and still nothing. It’s not looking good for these Sonoff units. I have 12 of the Sonoff zigbee devices and they have all pretty much given me issues, but these are my first batch of the contact sensors, and it’s really not looking good.

Anything displayed in the log when pairing ?

Saw something once about having a minimum distance to the hub while pairing, don't remember what was recommended though. One foot maybe?
Also, from the docs:

  1. Are there Zigbee bulbs interfering? Certain Zigbee bulbs may interfere with the routing of the Zigbee network traffic. If you're having trouble with Zigbee device discovery, try temporarily removing nearby bulbs to see if this alleviates the issue.

Okay,
It looks like one of two (or both) issues were causing this.
1: the brand new Sonoff SNZB-04s were shipped with dead batteries!
2: I had to hold them vertical with the battery side (antenna on the board) facing the HE.

When I replaced the batteries with new ones, AND held them vertical with the battery side facing the HE, they connected INSTANTLY! otherwise, no matter how many times I tried (I spent 3 hours trying to connect!) they absolutely would NOT connect.

So, this perhaps is a weak signal in the joining mode combined with cheap batteries being sent preinstalled!

2 Likes

I was almost ready to throw in the towel, tried everything, except for holding it with the battery side facing the hub (vertically of course). That was the trick! Thank you so much.

1 Like

I just got a couple of these and while I managed to pair them to HE, I'm not having luck 'configuring' them. Is there any trick to it?

Not sure if it is hidden in your screenshots, but what device type do you have these paired as?
Looking at mine, it is "Sonoff Zigbee Contact Sensor". I do recall that some of my Sonoff devices took several minutes to report appropriate data.

I just received a new SNZB-04 Contact Sensor and noticed a difference while setting it up.
With the new one after re-assembling the sensor there is a rattle coming from inside, movement from the battery within it's holder. The strange thing is if I swap the cover from an older sensor the rattle follows the cover, there's no visual difference between old and new covers. To stop the rattle I ended up bending the battery pcb negative contacts up quite a bit and adding some cushioning on the cover to push against the battery positive contact.
I did not have any issues pairing the sensor even with the battery moving around in it's holder but still prefer it to not be able to make noises.

Haven't had any issues but not using the built in drivers.

Which drivers are you using then?

Also, after successful pairing, do you also need to press the 'reset' button for the lights to blink so that the device can be initialised / configured, using whatever drivers one is using? Or does it initialise / configure without you having to do anything else (bring close to the hub, vertical, etc. etc. -- sometimes it feels like some sort of 'voodoo IT').

I've tried three different drivers: 'Generic Zigbee' and 'Sonoff Zigbee' both from HE and these ones: [RELEASE] Sonoff Zigbee Button, Motion/Temperature&Humidity/Contact Sensor Drivers

And yes, my device has also the rattling issue, fixed by putting a toothpick in there... Does everything from Sonoff feel like it's more DYI than a market-ready product...?

That's helpful, thanks. I've tried all 3 drivers that I've seen people using, including the one you mentioned. Did you have to do anything in particular to do the initial 'configuration' or 'it just worked'?

Using the community driver mentioned before, here is what I am now getting after initialising the driver. It's probably something silly that I'm missing, but what do these mean..?