[RELEASE] Sonoff Zigbee Button, Motion/Temperature&Humidity/Contact Sensor Drivers

These drivers are BETA since they are very new, with that said, they probably work just as expected and might just have a bit to much debug information. When released as non-Beta they will exist in HPM.

Supported Devices

  • Sonoff Zigbee Button (works with model SNZB-01) - Import URL
  • Sonoff Zigbee Contact Sensor (works with model SNZB-04) - Import URL
  • Sonoff Zigbee Motion Sensor (works with model SNZB-03) - Import URL
  • Sonoff Zigbee Temperature & Humidity Sensor (works with model SNZB-02) - Import URL

My other drivers

For my Generic Zigbee Drivers, see this thread .
For my Xiaomi / Aqara Drivers, see this thread .
For my Tasmota WiFi Device drivers, see this thread .

Which driver should I use?

All drivers are as combined as they can be, the list above should make it clear which driver go with which model.

Installation

Install manually using the Import URLs above. When changing from another driver to mine, make sure to PAIR THE DEVICE AGAIN WITHOUT DELETING IT! There are init commands which are easiest to send automatically just after pairing. You can also try activating the device and clicking Initialize on the driver page at the same time, it might work.

Pairing

Start Zigbee pairing in HE then hold the reset button on the device until the red light starts blinking. Wait patiently.

Your mesh

A good and stable mesh is needed for any Zigbee devices.

Presence

All drivers have the Presence capability, if the device doesn’t report in for over 3 hours it will be set as not present. This makes it easy to see that all devices are online at a glance in a Dashboard, or to monitor any change in Presence using RM or a custom App.

Recovery Mode

This mode has been able to get devices that have fallen off to reconnect. There is a warning in the log when it activates for a device. When the device is back another warning message will show that it is disabled again.
This doesn’t always work, it depends on how the device fell off. It at least helps partially. If the device doesn’t come back on its own when in Recovery Mode, try quick-pressing the reset button (do not fully reset and re pair the device). This might nudge the device back. If pressing the reset button works, it works within 30 seconds. On button devices it may be enough to just press any button.
If none of the above works, re pairing without deleting the device is your last option.

Please report your progress in using this, good or bad results are all needed to know how to improve.

Counters

When a device becomes Present after having been Not Present, the restoredCounter is increased by 1. restoredCounter can be reset manually.
For every 3 hours the device is Not Present the notPresentCounter is increased by 1. When Present again, the notPresentCounter is reset to 0.

Errors/Bugs/Feature requests

Post about it in this thread and maybe it will make it into a Github Issue and eventually taken care of :wink:
There may still be some excessive logging, that will be removed shortly, this is mostly so that it will be easier to debug any early issues not caught during beta testing.

Mesh problems

Post about it somewhere else which seems appropriate. Not in this thread.

10 Likes

@markus I have downloaded the v1.0.0.1025b For the contact sensor hoping it would work better than the HPM version. It’s not. I have several of the motion and temperature Sonoff units (8) and they work flawlessly, the contact sensor is not reliable for some reason. I just received my first batch of 4 contact sensors today, and was hoping this driver would be just as reliable as the others.

Do you have any suggestions to help resolve?

What do you mean by not reliable? I have a couple of these (in places where I can’t see them), they work really well. I’d need some more details to know what to look at.

I was having multiple issues with the brand new units. It turned out, they had dead (close to) batteries out of the box. This is what the issue was. The battery level was not reporting back so I wasn’t sure what the issue was until I checked with a meter.

Announcement

Updated all my Zigbee drivers to include the change needed for 2.2.4 since the previous way of doing it, as communicated to me by them earlier, turned out to have been incorrect.

2 Likes

Hi @markus

Thank you for the updates and still supporting us on the HE. I see under the Xiaomi motion sensors now there is a “stop Schedule” and a “Test” button under the commands. I don’t think these are meant to be there?

Just a heads up, if they are what do they do?

1 Like

No, they should not be there, they come from additional code added for the Tuya Alarm device. I will remove them and push a new release tomorrow. Thank you for the heads-up!

1 Like

For buttons, did you manage to add the activations (press/double/long) on the device page, that we discussed (for my direct activation using Maker API)? If not, it’s OK, I can wait, appreciate you will be crazy busy right now :smiley:

Is the Aqara Cube driver ready to be added to HPM? I’m updating it manually for now, but it’d be great if it were deemed mature enough to go into the package manager.

Thanks

@markus

I have a strange thing happening, 2 of my Sonoff Zigbee motion sensors are showing up in the Zigbee table as repeaters. Nothing routes through them but this never happened before. If I reboot the hub, they disappear but come back a few hours later.

Motion_Sensors

The others are IKEA repeaters and 1 Xbee.

It’s not in the release, but should be possible to push soon(ish).

I’d say it is, I’ve moved it in and in the next release it will be there. Thank you for reminding me.

This is indeed odd, do you have an Xbee so you can monitor the routing there as well? There is nothing in a driver that can be done about this, but it would be interesting to know if it could be confirmed with XCTU as well.

1 Like

@markus

I do have an Xbee and XCTU, what should I be looking for, not to skilled with these.

Look for if these sensors show up as routers in XCTU as well.

They don’t seem to show up only the IKEA repetaers the Xbee itself and the HE HUB as the coordinator. As I say this is new so maybe something in the latest HE software updates. The strange thing is I don’t even see them as end devices?

1 Like

If it doesn’t show up in XCTU as well, then that is likely. That’s good to know. Thank you :slight_smile:

Just received 4 new SNZB-03 motion sensors, and paired with my HE C-7 running 2.2.4.148. I installed your driver version 1.0.1.1123b before pairing any of these, and had no problems that I could see during pairing. I did, however, note that a warning popped up in the logs for each device during the pairing process. Here’s a sample of the complete set of entries I see when paring a device… hope this is helpful to you in some way. Most of this looks informational and not very interesting, however the 2nd-to-most-recent event caught my eye:

Summary

dev:824 2020-11-28 11:00:14.085 pm info Battery data - description:read attr - raw: 13E801000108210020C8, dni: 13E8, endpoint: 01, cluster: 0001, size: 08, attrId: 0021, encoding: 20, command: 0A, value: C8 | parseMap:[raw:13E801000108210020C8, dni:13E8, endpoint:01, cluster:0001, size:08, attrId:0021, encoding:20, command:0A, value:C8, clusterInt:1, attrInt:33, valueParsed:200]
dev:824 2020-11-28 10:58:13.257 pm warn Unhandled Event PLEASE REPORT TO DEV - description:catchall: 0000 8005 00 00 0040 00 13E8 00 00 0000 00 00 4200E8130101 | msgMap:[raw:catchall: 0000 8005 00 00 0040 00 13E8 00 00 0000 00 00 4200E8130101, profileId:0000, clusterId:8005, clusterInt:32773, sourceEndpoint:00, destinationEndpoint:00, options:0040, messageType:00, dni:13E8, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:00, data:[42, 00, E8, 13, 01, 01]]
dev:824 2020-11-28 10:58:12.711 pm info Battery data - description:read attr - raw: 13E8010001142000202021000020C8, dni: 13E8, endpoint: 01, cluster: 0001, size: 14, attrId: 0020, encoding: 20, command: 01, value: 2021000020C8 | parseMap:[raw:13E8010001142000202021000020C8, dni:13E8, endpoint:01, cluster:0001, size:14, attrId:0020, encoding:20, command:01, value:20, clusterInt:1, attrInt:32, additionalAttrs:[[value:C8, encoding:20, attrId:0021, consumedBytes:4, attrInt:33]], valueParsed:32]
dev:824 2020-11-28 10:58:12.158 pm info Cluster 0500 attribute 0002 - description:read attr - raw: 13E80105000C0200190100, dni: 13E8, endpoint: 01, cluster: 0500, size: 0C, attrId: 0002, encoding: 19, command: 01, value: 0100 | parseMap:[raw:13E80105000C0200190100, dni:13E8, endpoint:01, cluster:0500, size:0C, attrId:0002, encoding:19, command:01, value:0001, clusterInt:1280, attrInt:2, valueParsed:1]
dev:824 2020-11-28 10:58:09.385 pm info Cluster 0500 attribute 0001 - description:read attr - raw: 13E80105000C0100310D00, dni: 13E8, endpoint: 01, cluster: 0500, size: 0C, attrId: 0001, encoding: 31, command: 01, value: 0D00 | parseMap:[raw:13E80105000C0100310D00, dni:13E8, endpoint:01, cluster:0500, size:0C, attrId:0001, encoding:31, command:01, value:000D, clusterInt:1280, attrInt:1, valueParsed:13]
dev:824 2020-11-28 10:58:08.836 pm info No VALID lastCheckin event available! This should be resolved by itself within 1 or 2 hours and is perfectly NORMAL as long as the same device don’t get this multiple times per day…
dev:824 2020-11-28 10:58:08.552 pm info No VALID lastCheckin event available! This should be resolved by itself within 1 or 2 hours and is perfectly NORMAL as long as the same device don’t get this multiple times per day…
dev:824 2020-11-28 10:58:08.527 pm info Recovery feature ENABLED
dev:824 2020-11-28 10:58:08.465 pm info getDriverVersion() = v1.0.1.1123b
dev:824 2020-11-28 10:58:08.460 pm info installed()

All 4 devices appear to be functioning normally and have been deployed and tested in their final locations.

1 Like

Hey @markus I just deployed 6 snzb-03 and they are working wonderfully with your drivers, thank you for your work.
Wanted to ask you about the capabilities listed, they include Illuminance, does the device really have the capability or is just an implementation that still on the oven.
I

that one is fine, I’ve added a filter for it to be included in the next release, thank you for reporting it :slight_smile:

They do not, it’s a remnant from another driver this one was based on. I’ve updated it for the next release so that it’s not included. Thank you for reporting this!

1 Like

Thanx a lot for your drivers: I love the presence feature! :+1:

BTW: Even changing to your driver was very easy - just changed the “type” (and pressing “Save Device”), than clicked “Initialize”, and then waved to the sensor to activate it. => Presence!

2 Likes

I’ve forgotten to say: No (re)pairing was necessairy! :blush:

BTW: How can I edit a posting?

1 Like