[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.

4e224c55e323c94ee1d7a18b9b77e97ab1e120ef_2_666x500 (2)

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

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 that 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.

FAQ

  1. "Your idea is stupid and slow and I don't like it" - Don't use the code
  2. "Your app/driver is crashing my Hub. I submitted a support ticket" - Don't do that, the fine folks at Hubitat Inc. do NOT maintain this code. This software is given free of charge with no support, implied or otherwise. I may still help...
  3. "The latest update broke it, FIX IT" - I do this for fun, please don't make it un-fun.
  4. "I have a great idea for a feature" - Go ahead and post it, I might get around to it...
  5. "You ignored my great idea" - See #2
  6. "I hate you for getting my hopes up, your app/driver is awful/buggy/stupid" - Ok, please write a better one so I can use it
  7. "Please fix your code, it's broken" - I write this because I enjoy coding. I will continue to support and provide updates as long as that remains the case.
  8. "I stole your code and made it soooo much better" - Thanks. Please post it so I can start using it.
  9. "You are awfully sarcastic, I don't like you" - That's ok, I don't need you to
    (thank you @thomas.c.howard for the original FAQ this one was based on)
11 Likes

Reserved

Also reserved

@markus I have noticed you can start buying these on Aliexpress now at very reasonable prices :slight_smile:

Love the FAQ!!

I can't wait to give this a whirl when mine come in.