Advice on integrating Aqara sensors to give a physical or audible warning

I have successfully “hacked” three Aquara MCCGQ11LM magnetic door sensors to be Night Latch and Mortice Lock sensors. I have done this by using a piece of plain copper circuit board and some bronze contact strips from model trains to create the contacts. When the mortice lock is locked the brass bolt makes contact with the two strips closing the contact. I left the original reed relay in place and just soldered a wire to each end.

All three Aquara devices successfully connected to Smartthings however they appear to be recognised as ZigBee switches rather than contact sensors. Is there any way to change this. When I search for another driver nothing else comes up.

I now need to create a way of notifying me when the doors are unlocked, and I thought I would ask advice here as I am sure someone has already figured this out.

There is no physical indication that the deadlock bolt is unlocked and there are no warning notifications from the app. Possibly because its identified as a switch rather than a sensor?

I have seen on this forum and elsewhere that some users have a “night time routine” but I am not sure how this works. Is it initiated by a physical check of the app or have users set up a timed event e.g. at 10:30 pm a routine runs that checks the status of the sensors?

Any guidance on the best way to set this up would be appreciated. At some point I think I might sign up to Smart Tiles which would hopefully give a visual indication of a door unlocked but I don’t have an android tablet to use full kiosk browser currently. I utilise Amazon Alexa for voice control and notifications e.g. smoke alarms so perhaps this is an option. Would I have to use a virtual contact for these like I had to for smoke detectors?


If you need a sensor, then, sure, you can use the Vedge creator to create a virtual sensor, which you can then turn on and off with its connected virtual switch.

[ST Edge] vEdge Creator: a virtual device generator for end users

So you have your aqara device switch turn on the virtual switch, which opens the virtual sensor and then you can use that sensor any way you would use any other sensor. :sunglasses:

1 Like

Over the years different people have had different approaches to a nighttime routine.

In my own case because my schedule is so irregular, it’s voice activated. It’s just a scene, turns off a certain set of lights, Turns off the living room fan, turns off the TV, a few more things. I don’t have to include locking the door because my door is on autolock all the time (or my dog would be able to let himself out).

Other people have one based on a time schedule, or based on someone getting into the bed or based on motion sensor being inactive for certain period of time… Different things will work for different people. :sunglasses:

1 Like

You can give a try to Mariano’s Edge driver:
(EDGE Driver-Mc): Zigbee Drivers for Motion, Open/Close, Moisture, Smoke-Co Sensors and others Devices

That’s what the SmartThings Home Monitor is for. If you activate it, it will tell you if a contact sensor is open when it should be closed.

It works pretty much like a conventional alarm system that can’t be armed if a sensor isn’t in its predefined state.

German screenshots but you’ll get the idea:

The Home Monitor is one of my favorite features! Very powerful and it supports many different devices like sirens, smoke detectors, water leak detectors, cameras, …

So a major part of the night time routine is covered by the STHM.

Our STHM activates automatically when all members have left the location; at a specific time; if the presence sensor is certain that a specific area isn’t occupied; manually by a button pressed.

Yakovs Zigbee sensors edge driver works with the aqara contact sensor

https://account.smartthings.com/?redirect=https%3A%2F%2Fapi.smartthings.com%2Finvitation-web%2Faccept%3Fid%3Db119aed9-4083-46bc-bc16-584b9d738abe

If the device is added to ST as a Thing, or any other type that is not correctly detected, it is possible to use Edge Device Builder. This is a device certification tool that allows you to actually create a custom driver using a simple graphical interface in 3 steps.

  1. Select the device from the list of those connected to the hub.
  2. Select the appropriate driver, and specify the necessary Capabilities, Components, and Attributes.
  3. Upload the created test driver to the hub.

This tool is designed to test devices before certifying them, but in fact you can create a test driver for the device you need and use it constantly. The only thing is that when you delete a device or change the driver to another, this driver will be deleted and you will have to repeat these steps again if necessary.

Many Thanks @JDRoberts. Firstly sorry for delayed response but have had other work priorities which prevented me having time to post on the forum. My biggest issue is the contact sensor is recognised by the native Smartthing driver as a switch rather than a sensor. This means I have to use the vEdge creator to be able to integrate it with anything else. I think in the first instance I will try Yakov Gerlovin (@ygerlovin) drivers that appear to provide better functionality than the native drivers. However I will need a vEdge Creator contact later to use with Alexa.

Thanks @marcos.scheffler I already have Mariano’s drivers installed but they are not recognised when I try and change away from the native Smarthings Driver. As I said to @JDRoberts I think I should try Yakov’s driver first as it specifically works with the Aquara Sensor

Many thanks @Andreas_Roedl. I thought Home Monitor might be the go to module in smartthings but when I activated it and tried to add the door sensors they did not appear. I think this is because they are identifies as a switch rather than a sensor. I am hoping if I can change the driver to Yakov’s sensor driver they will then appear in Home Monitor and I can then use HM for notifications exactly as you describe.

1 Like

Many thanks @paulonthenet . I think this is exactly what I am looking for. I will subscribe to Yakov’s channel and install, the drivers on the hub and hope I can change each aquara sensor to the new driver.
It might also be more stable as at the moment the sensors keep dropping off the network. It’s not the zigbee signal but something to do with Smartthings Cloud according to the error below

The important thing to publish is the fingerprints, not the commercial model.

If it really is the commercial model you say, then the fingerprint model must be lumi.sensor_magnet.aq2 and it should work with the zigbee driver, contact Mc

Many thanks @Mariano_Colmenarejo. Please can you remind me how to find the fingerprint of the device? I assume it has to be installed first but I have no idea where to find the information.

Connect it to your network, even if it just shows up as a “thing.” Then you will be able to see the “fingerprint“ on the advanced page of the official web interface to your account.

The following FAQ gives the exact instructions, including screenshots

FAQ: Manufacturer/Model Shows All Zeroes

This is also covered in the community FAQ on edge drivers.

2 Likes

Many thanks @JDRoberts :+1:

1 Like

@FozzieBear , i´m currently using one of this Aqara open/close sensor with @Mariano_Colmenarejo “Zigbee Contact MC” driver. Works like a charm.


1 Like

Many thanks @marcos.scheffler I am using Yakov Gerlovin Edge drivers and they are also working great. The layout is similar to Mariano’ driver but has similar info. It took quite a while for the data to populate into the driver as they were all blank initially but they all show battery, signal strength and history as well as reporting open or closed. This is great as the original workaround using a virtual switch swapped open and closed. I have now got them showing in SmartThings Home Monitor along with the smoke detectors and I am working on a night time routine which will trigger warnings if an exterior door is not locked. I have ordered four more Aquara sensors from Ali Express to put on some internal doors. There are two doors we leave open during the day but close at night so perhaps I can use this as a trigger. Eg IF sensor A and sensor B are both closed the trigger Alexa to make an announcement if any external door is unlocked. Not sure how to do this yet but happy for any suggestions

Just be aware that Aqara may not honor warranties for devices purchased at AliExpress. Too many counterfeits and returns sold as new, so they treat most of those as used items unless it happens to be one of their approved sellers. :man_shrugging:t2:

Hi @marcos.scheffler. Using drivers written by @Mariano_Colmenarejo do the Aquara sensors appear in Home Monitor as sensors to add? Originally I tried to use virtual switches/contacts with the native Smartthings driver and they were visible. Now that I am using Yakov Gerlovin drivers alone they do not appear as sensors in security sensors. What I thought were the sensors when I replied to you previously were the leftover virtual switches but now I have deleted them the sensors are not visible.

This is strange, if they are identified as contact sensors, they should appear in SHM to use, independently of the driver.


This is an example of my config:

  • The green one is the aqara contact sensor (same model of yours) using mariano’s “zigbee contact Mc” driver;
  • The yellow one is an aqara motion sensor using Yakov’s “zigbee sensors” driver;
  • Orange ones are old smartthings multipurpouse sensors also using “zigbee contact MC”;
  • The blue one is an old smartthings motion sensor using default “zigbee motion sensor” driver.