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

This is a discord issue. It takes a only bit of time before the site will automatically adjust your abilities. Welcome! Check out some of the other threads, and the site will process your trust level even faster.

1 Like

#FeatureRequest:
Please, can the Battery values be rounded (to integer)?
IMHO 100.0 makes no sense, and that doesnā€™t look good eitherā€¦ :wink:

(Maybe optionally, e.g. for Temperature I can choose the number of digits.)

At the moment Iā€™m not making changes, but adding the Math.round(thePercentage) method would fix it for you.

1 Like

Thanx a lot for your answer!
Of course round does the trick! :+1:

But I donā€™t wanted to change your driver code when maybe a new one is arriving in the near futureā€¦ :wink:

ā€œNot making changesā€ - you mean like ā€œnever againā€? :thinking:

1 Like

No, not never again, just trying to avoid changing things since I donā€™t know what breaks in new versions of HE. This particular change does make sense though. I suppose I could add that for whenever I do push a new version. :wink: Next time I update it will be there, so it is safe to make the change manually for now.

1 Like

Thanx a lot! :+1:

1 Like

Hi Markus.

Thanks for all of your work on this. i originally posted this on HE and the realised it was your work, its such a shame that the tension exists at all.

Anyway im trying some sonoff products and am having problems with the humidity/ temp sensors. They seem to report about every 5 minutes no matter what changes have occured to the levels.

Im trying to use these to trigger a shower room fan, but by the time the sensor has reported the humidity has already reached 99%. This mornings logs showed a rise from 37% to 99% in one report span. Is there any way to ask the sensor to report as soon as the levels increase/decrease but a certain value as well as the 5 minute reporting, or ask it to report more frequently?

EDIT. I WAS USING HEā€™S DRIVERS NOT MARKUSā€™S WHICH WORK JUST FINE!!

Hi @markus
Iā€™m using your Sonoff Motion Sensor driver on HE.
With HEā€™s Hub Mesh utility devices can be linked between hubs.
With the Motion sensor ā€˜resetToActiveā€™ and ā€˜resetToInactiveā€™ is exposed.
Unfortunately pushing the resetToActive/resetToInactive button does not replicate the condition across the hubs.
If I amend your code to just use active/inactive it does work OK.
As Iā€™m not a coder I donā€™t know what is the ā€˜standardā€™ or whether itā€™s what ever you feel.
Just wondering if if should be active/inactive.
I appreciate you are busy on your new project but thought I would ask.
Thanks.

Anyone still using the offset in these drivers?
My assumption is that when I add an offset the reported temp should reflect that offset by reporting a different temp.
Iā€™m using : v1.0.1.1123b with SNZB-02. and the offset does not seem to be working.
When I add a temp offset of 10 deg the temp does not change in the current state, nor does it report a diff temp to other apps.
Am I missing anything?

I donā€™t even have a hub to test this on, sorry, maybe thereā€™s someone who still develops for that platform who can tell you from looking at the code if something has changed in the platform for that to not work?

Question and donā€™t know if anyone has suggestions. Got one of the sonoff motion sensors to put at my door to basically ā€˜ring the doorbellā€™ when motion is detected, as the delivery drivers donā€™t seem to do that anymore. As expected, it got triggered a lot based on shadows and such. Decided to pick up a second one to place in a diffferent area to minimize the chance of that happening. Unfortunately the motion sensors have a fairly long ā€˜activeā€™ time, so they still get triggered quite and inevitably overlap with the other sensor that was triggered earlier. I see this driver doesnā€™t have a time limiter on it, so does anyone have ideas on how i could possibly have the sensors reset to inactive after a specified period of time (maybe 5 seconds would do it)?

1 Like

Do you have any Xiaomi or Aqara motion sensors available.
Apparently there is a mod you can do on those (wiring/soldering a couple of terminals together) that changes the device to reset after 5 seconds of motion.
Iā€™ve never done it but others have.

Maybe the mod can be done on a Sonos device but I donā€™t know.

If you 're doing it in node red you can do it with a rbe node or throttle.

[EDIT]
To clarify, you could limit the number of messages and time interval using node red and your current setup so that you can ignore other messages for a certain amount of time after the first trigger. Node-RED is a powerful tool.

1 Like

ā€¦or you can buy the latest model, aqara P1.
It should have an exposed cooldown parameter with values down to 1 second . And its battery (2) lasts 5 yrs.

Hue motion sensor has a short reset time too.

1 Like

I am using the Zigbee - Sonoff Motion Sensor Version: v1.0.1.1123 downloaded via the Hubitat Package Manager and used it for a SNZB-03 notion sensor. It is monitoring motion and performing check-ins correctly, but the battery level is not being reported - ie there are no battery events triggered. Here is a snippet from an info entry in the log (such reporting every 2 hours):

Battery data - description:read attr - raw: 652D01000108210020C8, dni: 652D, endpoint: 01, cluster: 0001, size: 08, attrId: 0021, encoding: 20, command: 0A, value: C8 | parseMap:[raw:652D01000108210020C8, dni:652D, endpoint:01, cluster:0001, size:08, attrId:0021, encoding:20, command:0A, value:C8, clusterInt:1, attrInt:33, valueParsed:200]

May I please ask you check this out and advise accordingly.

Many thanks, Peter

You can use the built-in HE driver for this motion sensor. Just change the driver to the ā€œGeneric Zigbee Motion Senor (no temp)ā€. I use the built in driver for some of my Sonoff motion sensors and Markusā€™ driver for the others and both work fine for me.

1 Like