Connecting Aqara P2 Door and Window sensors to Hubitat (Working steps)

After trial and error, I found how to connect the Aqara P2 window and door sensors to the Hubitat c8 through the Google Nest Hub v2. This took some major trial and error. I don't know if this will work with Homekit or SmartThings.

  1. Reboot everything, Google Nest Hub, Hubitat, your phone. Some of these may not be necessary, but rebooting the google hub solved some issues.

  2. If the Aqara P2 has been paired previously, it needs factory reset. Press the sensor button a few times and then holding it for about 5 seconds will enter pairing mode. The sensor will respond with a slow flash blue light. Press and hold another 5 seconds and the sensor will flash red. I am guessing that is factory reset even though it is undocumented. Then press for 5 more seconds to get to the slow blue flash for pairing.

  3. Pair it to your Google Nest Hub or Max.

  4. Immediately (and this is the key part, do not wait), open the sensor on the Google Home app and click the gear icon.

  5. Click Linked Matter apps & services.

  6. Click Link apps & services.

  7. Click Use pairing code.

  8. You have 3 minutes to open your Hubitat app, go to Devices, Add a device.
    8a. Click Matter.
    8b. Enter that code in the Matter setup code box. If you were fast enough it should get recognized by your Hubitat.

Hopefully these instructions can be streamlined and checked on other smart hubs. Good luck.