Connecting Aqara Devices Using the Matter Protocol


This application note provides a detailed guide on how to connect Aqara devices to the NAVQ Plus using the Matter protocol.

1. Matter Protocol

The Matter protocol (formerly known as Project CHIP - Connected Home over IP) is a unified, secure, and reliable smart home communication standard developed by the Connectivity Standards Alliance (CSA). It aims to provide interoperability and seamless connectivity between smart home devices from different manufacturers.

The Matter protocol is designed to enable devices such as smart lights, thermostats, door locks, security systems, and other smart home devices to work together effortlessly. By adopting a common set of standards and protocols, Matter allows devices to communicate with each other and be controlled through a unified ecosystem, regardless of their brand or connectivity technology.

Key features of the Matter protocol include:

  1. Interoperability: Matter ensures that devices from different manufacturers can seamlessly connect and communicate with each other, offering a unified smart home experience.

  2. IP-Based Connectivity: Matter utilizes IP (Internet Protocol) as the foundation for communication, making it compatible with existing network infrastructure and enabling devices to connect directly to home networks without relying on additional hubs or gateways.

  3. Security: The Matter protocol prioritizes security and privacy, implementing strong encryption and authentication mechanisms to protect data and ensure secure device communication.

  4. Cloud Neutrality: Matter offers flexibility by allowing devices to work locally within a home network without requiring cloud connectivity. However, it also supports cloud integration for enhanced functionality if desired.

  5. Easy Setup: Matter aims to simplify device setup and configuration by providing a user-friendly and consistent onboarding experience across different devices and platforms.

2. Prerequisites

Before proceeding with the setup, make sure you have the following:

  1. Zigbee Hub: You will need a Zigbee hub that can serve as a Zigbee to Matter gateway. In this application note, we will be using the Aqara M2 Hub (available for purchasing on Amazon) as the Zigbee hub and gateway.

  2. Zigbee Sensor: You will also need a Zigbee sensor to connect to the Zigbee hub. For this setup, we will be using the Aqara Temperature and Humidity Sensor (available for purchasing on Amazon) as the Zigbee sensor.

3. Hardware Setup

Follow these steps to set up the hardware components:

  1. Install the Aqara Home app on your smartphone and connect your Aqara M2 Hub. Ensure that your smartphone is connected to the same Wi-Fi network as the hub.

  2. Update the firmware of your Aqara M2 Hub to the latest version. In the Aqara Home app, select the Hub from the device list, tap on the ... menu, and choose Firmware Upgrade. Follow the on-screen instructions to update the firmware.

  3. Follow the instructions provided in the Aqara Home app to connect the Aqara Temperature and Humidity Sensor. When asked, press and hold the reset button on the sensor until the LED on the sensor starts blinking. This usually takes approximately 5 seconds.

  4. Once successfully connected, the Aqara Temperature and Humidity Sensor will appear on the Home page of the Aqara Home app, allowing you to monitor and control it.

4. Matter Pairing Code

To obtain the Matter pairing code in the Aqara Home app, follow these steps:

  1. Open the Aqara Home app on your smartphone.

  2. Tap on the ... menu located in the Aqara M2 Hub section.

  3. Select "Matter" and then choose Matter pairing code.

  4. A QR code will appear on the screen, which represents the Matter pairing code.

This Matter pairing code will be used during the pairing process to connect your Matter-compatible devices to the Aqara M2 Hub.


Here, 24778527649 is the code we will be using to establish a connection from the NAVQ Plus to the Aqara M2 Hub using the Matter protocol.

5. Connecting Aqara Hub Using Matter

To connect the Aqara Hub using the Matter protocol, follow these steps:

  1. If you have any previous Matter configuration files that are no longer required, it is recommended to clean them up. Use the following command to remove the chip-tool data:

user@imx8mpnavq:~$ sudo rm -rf /tmp/chip_*


  1. Next, issue the following command to connect the Aqara Hub as node 11 (replace "24778527649" with your specific pairing code):

user@imx8mpnavq:~$ sudo chip-tool pairing code 11 24778527649 --paa-trust-store-path /usr/share/matter/credentials/paa-root-certs/

This command initiates the pairing process between the NAVQ Plus (as node 11) and the Aqara Hub using the provided pairing code. Make sure to use the correct path for the trust store as per your system configuration.

  1. If the commissioning process is successful, you will see a line in the log indicating the completion of device commissioning:

[1698327118.653580][2848:2851] CHIP:TOO: Device commissioning completed with success

6. Reading List of Endpoints

To retrieve the list of endpoints, use the following command:

Executing this command will provide you with the list of endpoints associated with the connected device:

The sensor we are interested in is connected to endpoint 18.

To request the temperature from the sensor, use the following command:

In the command output, you will observe a JSON array containing the measured data:

Temperature is 21.98 Celsius (2198 divided by 100).