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

Hello Markus.
I have sonoff reply 1 channel PSF-B01 and I wanted to use it with Hubitat. Since with Sonoff firmware on it, I think I cannot use it with Hubitat, I think I need to flush it with your firmware. I was reading through all the document you provided but I lost in middle. Please provide steps how to flush Sonoff Relay (one channel) with your firmware so that it can be detected by HE.

Thanks
SOM

I now have around 20 of the SNZB-04 contact sensors installed and some of them keep dropping off the network and I have to keep re-discovering them.
I have IKEA Tradfri plugs around the house, 1 in every room which I hoped would improve things but I still have issues.
I know this is most likely my zigbee mesh but any ideas on how I can improve things?

I have a few of these, the problem I discovered with them is the battery connections are poor at best. If you take a look at just one that you're having issues with, check the battery terminals are sound and touching the battery. If they're not you may have to manipulate them (squeeze / poke / prod) to ensure good connection and then monitor them to see if it cures the problem. If it works then try it with the rest :smiley:

6 Likes

I am finding this issue as well. Half my sonoff stuff keeps going to notPresent. I did notice the battery terminals were poor and have done the same. Pressing the reset button always seems to work on the device so I'm not sure why they keep dropping off yet. Very frustratig.

I'm having no end of trouble with these damn sensors. They are the only zigbee devices here and I seem to be having trouble with all of them. They'll work fine for a few hours after pairing and then go into notPresent mode. Some can be as little as 5 metres away from the @#&@^# hub. I haven't got any additional router devices yet but have ordered a Tuya one off ali express. Even so, a contact sensor about 4-5 metres away from the hub will drop off. I've tried replacing batteries and pushing the contacts inside the sensors down. Seems to happen with all the devices - I have 2 motion sensors, 4 contact sensors and a push button. Kinda wishing I never got into this zigbee crap.

Meaning the ony ones you can find where you live or just the only ones you happen to have? If the latter, I'd suggest adding repeaters to your network. It sounds like you've ordered one. Yes, if you're close to the hub, you don't need them in theory, but the radiation pattern of the antenna, construction materials and other obtacles in your home, the other RF in the area, and other factors can all play into difficulty for Zigbee (or Z-Wave, for that matter)--so it's just a good idea regardless. So, hopefully yours helps! With the Sonoff sensors in particular, people have anecdotally reported that their antennas seem "weak" (not sure if there have been any objective measurements of this, other than that being close to a repeater or the hub helps), so it may be particularly helpful here.

It's also important to note that the "not present" value you see this driver report is just a best guess based on typical "checkin" behavior of the device. It's probably a good indicator, but if the device is in fact working as expected, it's not necessarily a problem (but it's not something coming from the device or determined by the hub). Also, these devices are, to my knoweldge, not certified, but do appear to behave like "standard" Zigbee devices, hence their ability to be included in a Hubitat network. But there may still be oddities with them (not that certification guarantees none, ha). I wouldn't let this put you off from Zigbee in general--maybe just suspiciously cheap devices. :smiley:

I have ~20 of these, and I have to do the rediscover/reset dance on roughly one every five days or so.

I don't even crack them open, I just poke them with a paper clip for 5 seconds .. so I don't feel the battery terminals (which do stink) are a factor as the earlier poster suggested.

What "recovery speed" do you have the devices set to? Anecdoctal, but I feel like since I cranked them all down to the slowest recovery speed option that this has been less frequent. Would be curious if it helps your enviornment.

Thanks guys. I will wait for the zigbee router to arrive in January from ali express and see what happens. In the meantime, I re-paired one of the worst offender devices, a contact sensor, with my Amazon Echo 4th Gen which also has a zigbee hub (which I havenā€™t been using til now). Interestingly the echo is probably double the distance than the HE is from it (even more if you factor in a couple of walls in between also) - Lo and behold, itā€™s been operating correctly for several days now! As for the environment. Iā€™m in a pretty clear area when it comes to the 2.4ghz spectrum. We are kinda urban fringe so thereā€™s not a lot out here that can interfere. I also have an Ekahau Sidekick for wifi surveys and used this to confirm there is no wifi or other RF interfering with the zigbee channel Iā€™m using on the HE (god knows what the echo is using but hey, itā€™s working). The building is a typical timber construction house with drywall walls. Iā€™m not sure what recovery speed Iā€™ve set the devices to - can you confirm where I find this ?

Are you talking about the "Recovery Mode" setting under each device? Hmm, it's currently set to Normal per default but no harm in trying "slow" for a few days and seeing what happens.

Interesting.. I literally just added the new Tuya repeater to the mesh and then deleted and re-added most of the Sonoff zigbee devices that had gone awol (and replaced a couple of batteries). Anyway in the past half hour I've checked the routing table on the Hubitat and it looks like this:

Child Data
child:[Lounge Motion Sensor, B2EB, type:EMBER_SLEEPY_END_DEVICE]

Neighbor Table Entry
[Tuya Zigbee Repeater, 8469], LQI:253, age:4, inCost:3, outCost:1

Route Table Entry
status:Active, age:64, routeRecordState:0, concentratorType:None, [Garage Door, 021E] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Back door, CC22] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Hallway Motion Sensor, 4967] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Front Door, 4BC8] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Garage Motion Sensor, 2EA7] via [Tuya Zigbee Repeater, 8469]

The interesting part is that literally everything except the Lounge Motion Sensor - which is probably because I moved the Hubitat to about 2m away from it - is routing through the Tuya repeater! Including the hallway motion sensor and backdoor - which are much closer to the Hubitat than the Tuya repeater is...

Everything's still looking pretty good so far on the repeater side. The stuff in the garage works well. Ironically everything now is routing through the Tuya repeater. Is this because the Zigbee radio in the Hubitat is sub-par or something???

Child Data

Neighbor Table Entry
[Tuya Zigbee Repeater, 8469], LQI:254, age:4, inCost:1, outCost:1

Route Table Entry
status:Active, age:32, routeRecordState:0, concentratorType:None, [Lounge Motion Sensor, B2EB] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Tuya Zigbee Repeater, 8469] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Back door, CC22] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Garage Door, F625] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Front Door Button, 6A11] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Front Door, 4BC8] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Hallway Motion Sensor, 4967] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Downstairs Door, 2AFD] via [Tuya Zigbee Repeater, 8469]
status:Active, age:64, routeRecordState:0, concentratorType:None, [Garage Motion Sensor, 2EA7] via [Tuya Zigbee Repeater, 8469]
status:Unused
status:Unused

I am looking for some assistance. I have been able to get about a half dozen of the door contact sensors functioning reliably is various situations. The only issue I am having is that the battery percentage isn't reporting. It always says 100%.

Is there something I can do to solve this issue?

That is absolutely normal - maybe for weeks.

I just saw this and realize itā€™s an old post, but itā€™s not at all ironic. The Tuya is the only repeater you have and Zigbee is a mesh network. The recommendation is 1 repeater for every 5-6 devices. Zigbee hubs can generally only connect directly to a maximum of 32 devices and require repeaters to increase the number of devices that they can control. Also, I think most home automation Zigbee battery powered devices have 1mW transmission power (no added amplifier). This may not be high enough power to rise above the ā€œnoise floorā€ of your environment. So even if the device can hear the hub and accept configuration info, the hub may not be able to hear the device.

1 Like

Iā€™m using the built in contact sensor (no temp) driver and battery reporting works. I would expect it to remain at 100% for months due to the voltage drop characteristics of lithium batteries.

1 Like

It work fine for temperature but I am not getting any humidity being reported.

I have seen that the sonoff temp sensors only report on a 0.5C. change, so with a stable well insulated room, they may not report for hours and log the no presence.
I have 2 sonoff sensors at opposite ends of a large room running into a virtual thermostat doing the average between. This is because the Vthermostat will switch to emergency mode if it does not see a change after so many hrs. From either sensor.
I just leave them alone, when the sensor(s) report , the Vthermostat switches back to normal.
I sometimes check them just by blowing/breathing on them which if working (but asleep) they will start reporting again

If you need a lower reporting threshold ( 0.1 deg for example) or more frequent reporting for SNZB-02 SonOff T/H sensor, you can temporarily use the driver linked here, and then switch back to the driver that you are using now.

2 Likes

Drivers featured in this post are no longer maintained and users may experience issues using them. If you'd like to continue the conversation about these drivers, please consider creating a new thread.