Aqara Zigbee Contact Sensor

Hi All,

I have some of these Aqara contact sensors I've been trying to use with my C8. A while back I tried using the generic Zigbee contact sensor driver, but it would ultimately stop communicating with my hub. I hoped that with the native driver, now available in the list, that perhaps this problem may have resolved. Unfortunately this is not the case.

I did notice periodic errors in the log, for example:

[dev:1513] (http://--.--.--.--/logs#)2025-12-27 22:13:00.557 error java.lang.StringIndexOutOfBoundsException: begin 2, end 20, length 18 on line 50 (method parse)
[dev:1513] (http://--.--.--.--/logs#)2025-12-27 22:13:00.550 debug description: read attr - raw: 64D70100001801FF42090421A8130A215452, dni: 64D7, endpoint: 01, cluster: 0000, size: 18, attrId: FF01, encoding: 42, command: 0A, value: 090421A8130A215452

This sensor has been added as a device, but never used with an app. My intention was to monitor its function, given the past problems, before putting it into service. Is there any chance this error is related?

Thanks

The general rule is, that excepting a very badly written driver, changing drivers won't have direct effect on devices staying connected to your hub, so unforunately having a native driver won't solve connectivity issues. Aqara devices are well known around here to have difficulty staying connected for some users, can be particular about which repeaters they "like," etc.

It's interesting you're having an HTTP error in your logs w/the native driver if you haven't used the device in any apps/automations. If you click on the red "Error" chicklet in the logs do you go to the contact sensor's Device page? On the "In Use By" tab on the contact sensor's device page, do you have any apps listed?

Did you try using the native 'Aqara Zigbee Contact Sensor' driver? That driver, or one of the few community drivers, will get rid of the error you're seeing. As to maintaining a connection to the hub, as @danabw explained, the driver choice will not effect the connection. I've had very good luck with Aqara devices over the years, but it required a lot of compatible (Zigbee 3.0) repeaters.

2 Likes

Thanks for responding.

It opens the device properties, but under the "In Use By" tab, nothing is listed.

1 Like

He's evidently using the new native Aqara contact sensor driver.

@ddalder - you did switch to the native driver, right? Usually best to hit Configure on the driver page after switching.

Also, what are you redacting in the http address in the logs? Just your hub's IP? If so, you don't need to do that, your hubs internal IP address is not something you need to keep private, not a security issue at all.

Yes, the IP address is the only information hidden. I figured it wasn't a big deal either way.

When I paired the sensor, it automatically detected the native driver (rather than the generic Zigbee version). I also hit Configure, despite not having to actually change the driver.

I really want to avoid adding extra devices such as repeaters for the purpose of supporting another single type/brand of device. None of my other other 20+ Zigbee devices have ever been a problem. Many are battery operated so I feel that my mesh is pretty solid since I've had zero issues with the battery devices.

What drew me to these is their size. I designed, and 3D printed custom housings that convert them to a recessed door sensor. I have several of the Aeotec recessed sensors and wanted something about the same diameter to keep hole size reasonably small. The new housing is virtually the same diameter, yet about half the length of the Aeotec. I plan to add another 6-10 door sensors and the Aeotec Z-Wave version is fairly pricey.

I've also ordered a couple of the Philips Hue sensors since these may work much better. Since I have a few of the Aqara that are brand new, I didn't want to give up on them without exhausting all my options.

Aqara battery-powered Zigbee contact sensors, buttons, and motion sensors are known to be among the most difficult devices to pair and keep connected. There are dozens of threads in the forum discussing this exact issue.

When you have alternatives and don’t want to spend hours troubleshooting, it may be worth considering other brands where possible.

I'd be interested to hear how these work for you.
There hasn't been much feedback on the forum for the Philips Hue Secure Smart Contact Sensors.

Sad, but it seems to be all too true. I think I've reached the end with these.

Certainly. I have some Hue lighting and feel optimistic I'll have better luck. They use the CR2 battery, which is likely an advantage for converting them into a recessed device more than larger button cells.

I've had another sensor very close in size to the Aqara, that has been completely reliable. This:

Comparison to Aqara:

If you're OK w/Z-Wave sensors, the Zooz door sensors are tiny, and I have found the one I'm using (800LR version of ZSE41), on back gate over 100 yards from the hub) to be completely reliable on my C8-Pro:

1 Like

I bought a few of those MOES ones recently, so far I'm only using one, but it has been connected for about a month and seems to work well. I paid $3.39 each for them on Ali Express. I'm using kkossev's Tuya Zigbee Contact Sensor++ Driver.

Yup - same driver, and these seem to be pretty miserly w/the battery like the Aqara are (I think I've only ever replaced the battery on one of my Aqara contact sensors). I'd have more of them but I have too many extra contact sensors to justify buying any more. :slight_smile:

I really appreciate all the replies and suggestions, thanks!

I'm not entirely sure which way I'm going to go just yet. I received the Philips Hue contact sensors yesterday. The biggest drawback of these is really the cost. They are normally $45/ea. when purchased in a 2-Pack. I got these on sale as 12% off on Amazon.

My initial thoughts are mixed. Most importantly, it paired easily on the first attempt. I used the native Hubitat driver and bypassed my Hue bridge. For what I plan to do, I think these will be perfect. Upon disassembly, the PCB is only 17mm wide. I should have no difficulty designing and printing a housing to make this similar in diameter to the Aeotec sensor. The other positive is that the battery is a CR2 rather than the CR123A. This also lends itself to using all the original parts an components while maintaining a small profile.

As for overall size.... If you're looking for small and discreet, this probably isn't the right choice. Out of the box, the casing looks rather intrusive with its very rectangular, square cornered, shape. I, personally, prefer something that is much less apparent. This is what drives my desire for recessed sensors to begin with. In my case, I'm confident I'll be able to overcome this.

I did find one small issue that's probably related to the driver. When it's removed from the backing plate, the LED shows tamper status. This however, does not show in Hubitat.

In the three photos I've attached, You'll see the Philips Hue sensor, which is longer, with the battery connection terminals. The PCB is 17mm wide, whereas the Aqara PCB is 16.1mm. The disadvantage to the Aqara is the button battery because the holder increases the width to 16.5mm. Still narrower than the Hue, but it's not centered which requires the casing to be a slightly larger diameter than preferred. In any event, I should be able to make the Hue sensor work as a recessed device.



2 Likes

Goe with the Moes as @danabw has stated he has used as well. I have 16 of them in service for over 6 months and have had zero issues with any of them. They are my go to contact sensor now.

1 Like

Looking at your application, I'd use either the Moes (1.58x1.02x.51) on Zigbee, or the Zooz ZSE41 800LR or 700 series (1.9” x 1” x 0.3”) on Z-Wave LR or Z-Wave. CR2032.

image

There's also Visonic...users have reported 1 year battery life:
image
25-12-30-4703

...and you can get a pack of 10 on eBay for $45. I believe they use CR2450 batteries?

1 Like

I think he wants a hidden, invisible, solution.
How would those work?

He's talking about taking the contact sensors apart, just uses their guts in his own enclosure...the ones I noted are on the smaller size, so more likely to fit in a small enclosure.

1 Like

But aren’t the reed switches on the side? Might find a way.

He's clearly a crafty guy... :slight_smile:

1 Like