Aqara M2 gateway support

Problem solved. As it turned out, it was all about the static IP on the device on which HA is installed. After changing to DHCP, the hub was immediately found.

Just as a FYI, I managed to connect the Aqara M2 to Home Assistant via Matter, using the Home Assistant app on an 2017 iPad and Aqara Home on an Android device. No need to do the Apple stuff.
On the HA app just go to devices and select “Add matter device”, then generate the Matter QR pairing code on the Aqara Home app and you are set. Sensors appeared BUT without the custom names, just a bunch of “Aqara Temperature and Humidity Sensor”. To tell them apart I compared the readings from Aqara Home and what I could see on HA, and then renamed them.

1 Like

Hello everybody,
First of all, im a real NEWBY in this section. So please don’t hesitate to correct me if necessary. I have the following problem: I have bought an Aqara Hub M2 and many Aqara Sensors. At home I do have a few HomePods Minis. I also have a Synology NAS DS923+ where Docker runs a Homeassistant container with the home automation system. Until here all good. Now the problem: I want to connect my Aqara Sensors to Homeassistant. I recently read that the easiest way to post the sensors to HA is to use the HomeKit Controller Integration. Well that went good and was very easy. Now to the sensors: I have bought some Aqara P1 Sensors and the do have a lux sensor (light). But it is impossible to post via HomeKit Controller Integration in HA these values. What am I doing wrong?
Is there any other possibility to connect the whole Aqara M2 Hub to my NAS (Docker Container with HA) where I can get every setting possible (like the lux sensor value or the sensitivity setting for the sensor)? I do also want to purchase in the next month some Aqara FP2 (presence sensor) which do have many features paired with the Aqara App). So it would be nice to have a constellation where the Aqara App also “sees” everything from my devices.

TL;DR
Is there any possibility to connect the Aqara Hub M2 with my HA running on Docker Container (on NAS) with every paired sensor (i.e. Aqara P1 or Aqara FP2, vibration, etc.) with the following two requirements: 1) The Aqara App should be usable also after posting sensors to HA
2) I want to see every sensor possible (i.e. light in P1) and settings of sensors (i.e. sensitivity of P1) in HA.

Thank you very much in advance,
Jaime

this worked for me

  • Reset the Aqara hub m2. make sure the light is blinking
  • Go to homeassistant.local:8123 or whatever your ip for home assistant interface is.
  • Go to Settings > Devices & Services > Devices >
  • click Add Device
  • Search Apple > HomeKit Controller
  • It should popup the aqara hub m2. Enter the code, which is printed on the back of the m2 device.
  • Done.
  • You should now see Aqara Hub and all accessories in the home kit.

thank you everyone for the help. I just tried and it worked.

Hi, thank you for your response, but this worked also for me :slight_smile: My problem is, that the light sensors are not being shown in HA and I think thats because HomeKitController doesn’t support that type of sensor. So Im searching for alternative ways to implement Aqara M2 Hub with sensors in HA without HomeKitController Integration. Is there any way?

You could try Homekit-Integration(another native ha integration), thou i doubt it will work there(and it’s not local, but cloud polling, .with higher latency, and whatever

Most likely it’s do to Aqara gives a S… whether there products work outside there APP, it’s not only the light sensors, IR other sensors etc wont appear in HA

Thanks for reaching out. But how is it then possible, that I’ve seen a lot of people having the sensors being posted on HA (incl. light and IR?)?

could be because they dont use Aqara M2, but another Zigbee-Controller

Ok thank you very much for the answer! Do you know any Zigbee-Controller where all the states are being posted? And is it recommended to use an external Zigbee-Controller for Aqara products? Won’t be there lack of features that Aqara offers through their app?
Thanks for reaching out!

Most likely

I have no experience from other Zigbee controllers, but there are lots of options, and many people in here using Aqara products in other Controllers, just search for the specific Zigbee device, or “issue” , here in the Forum

any of the home assistant zigbee cordinators will pick up aqara zigbee devices.

I received my Aqara M2 Hub yesterday and I am very interested in using it in HA.
I red this topic and tried it via VPN from work but I didnt manage to add the HUB to HA.

I think the issue is that I need to first unplug the HUB so that the Homekit-Controller doesnt instantly detect the HUB, is that right? Or do i have to fully reset the hub and the sensors? In addition the HomeKit Controller also finds my Philips HUE Bridge. Do i also have to unplug it HomeKit-Controller can install?

Thanks in advance for your help.

@daniel1to You could try it via the Matter integration, that is also possible

I’ve been able to connect the Aqara M2 Hub to Home Assistant via the HA Matter integration but I don’t see in HA the two Aqara devices I’ve got connected to the M2 Hub. I do see (and can talk to) those devices via the Aqara app. The two devices are an Aqara Water Leak Sensor and an Aqara Cube controller. Any suggestions on what I need to do to see and interact with those devices in Home Assistant?

And are these 2 devices capable of using the Matter “technology” ?, most likely the Matter Integration only “expose” Matter Devices

“”"
Home Assistant, as a Matter controller, only supports control of Matter devices. Home Assistant is not a bridge itself and it cannot turn existing devices within Home Assistant into Matter compatible devices.
“”"

I just paired an Aqara Door/Window Contact Sensor thru the Aqara M2 hub and I am able to see that sensor in Home Assistant via the HA Matter Integration. So it would seem that the Aqara Door/Window Sensor is Matter compatible while the Aqara Water Sensor and Aqara Cube are not Matter compatible.

1 Like

Ok, as i have my M2 in the Homekit-Controller_Integration , i still only have Zigbee devices,and dont know whether Homekit-Controller_Integration ever will support Matter Devices ( even thou it supports Thread and Zigbee ) :frowning: . i hope so . or either ways , would be better if 1 Integration Supports both Matter and Zigbee, so one don’t need 2 separate Controllers/Bridges , and 2 Integrations

PS: Read this, might be the “culprit” you are wondering about (If your devices is supported !, see list in Aqara M2 page/url )

https://www.aqara.com/en/article-1583275073188196352.html

I updated to HA Matter Server 4.7. The Aqara Door Window Open/Close sensor showed in Home Assistant via the Aqare M2 Hub two entities before this upgrade and they were:

binary_sensor.aqara_door_and_window_sensor_contact
sensor.aqara_door_and_window_sensor_battery

Both of the above entities became unavailabe after the HA Matter Server 4.7 upgrade and a new entity showed up which accurately reported open/close status in HA and that entity is:

binary_sensor.none_contact

What was strange was that with this new entity the open/close status reported much quicker in HA than it did in the Aqara Home App.

I decided to power cycle the M2 Hub to see if that would have an impact on performance and on which entities were seen by the HA Matter Server and the USB connector used for power that is in the body of the M2 hub fell into the hub! So I do not have a working Aqara M2 hub to test further. Aqara, I think, is going to replace the M2 hub.

In the mean time I just updated HA to Matter Server version 4.8 and I’ll see what happens when I get the replacement M2 hub from Aqara.

Just got my M2 Hub, tried to add it to HA using Matter however, it shows as “Can’t connect to your device. Check your device instructions”. What could be wrong?
Do I really have to go through the HomeKit-Controller approach?
Any help is appreciated, thank you

this information is pure gold, ty very much for sharing!! :v: