What is presence in a contact sensor

Hello! I am using Zigbee - Sonoff Contact sensor driver for a contact sensor.
My question is: what does the present /not present event means in a contact sensor? I noticed that is not always related to the window in question being open or closed.

Edit: corrected the driver's name

Which driver is that (screen shot of the Device Info tab would be helpful)? On the Generic Zigbee Contact sensor I only see:

2 Likes

Can you provide the exact name of the driver your using (from the device's "Type" field)?

I don't ever recall seeing those options with the native/stock zigbee contact-sensor drivers.

Were you using a different (community-developed) driver for this device at some point before using the native driver?

If so, then I suspect that's an artifact left over that other driver, since present/not was used a long time ago as a form of a device-level health-check by some community developers.

1 Like

That is what I was thinking too. The remedy is to change to the generic "Device" driver and delete all attribute states, then switch back to the contact sensor driver and configure.

1 Like

Sorry guys, I had informed the wrong driver's name. It is corrected now. (Sonoff Zigbee contact sensor driver.
It seems to me that the driver changes the presence state after some time the device hasn't responded. Which can be useful, but since it is battery powered, I am not sure how useful it is. Even when it was marking my device as not present, its contact state changed when I closed the window (and then its presence also got updated).

I think the staff and most developers would say that this isn’t the intended use of the presence capability, but it’s something that some developers chose to do as a means of displaying a “heartbeat” from a device.

Is this an old driver written by Markus?

2 Likes

Ha, yep, that was my thought exactly. Good ol' Oh-La-Labs (or whatever it was).

3 Likes

Yes! It is! But let me know if you recommend another driver then! Tks!

Is there something you desire missing in the native/stock driver? I just use that for my zigbee contact sensors.

Any time you switch drivers, it's a good idea to first switch to (plain) "Device" and then use its various options to clear out all current states, scheduled jobs, etc. Then when you switch to the desired final driver, it'll be working from a totally clean slate.

1 Like

Most (probably all :wink:) of the old not-presence drivers have been updated to Health Status and can be found here:

The Sonoff contact specific driver (RAW LINK) is here:

1 Like

And it looks like the Sonoff sensor is not working that great with your ZigBee mesh.
A few repeater capable devices may be in order. :thinking:

Screenshot 2026-04-16 124704