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.

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.


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.

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.

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.

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

Reading List of Endpoints

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

user@imx8mpnavq:~$ sudo chip-tool descriptor read parts-list 11 0

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

[1698327201.602780][2927:2929] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 1162921196 [1698327201.604573][2927:2929] CHIP:TOO: PartsList: 9 entries [1698327201.604635][2927:2929] CHIP:TOO: [1]: 1 [1698327201.604656][2927:2929] CHIP:TOO: [2]: 17 [1698327201.604674][2927:2929] CHIP:TOO: [3]: 18 [1698327201.604691][2927:2929] CHIP:TOO: [4]: 19 [1698327201.604708][2927:2929] CHIP:TOO: [5]: 22 [1698327201.604726][2927:2929] CHIP:TOO: [6]: 23 [1698327201.604745][2927:2929] CHIP:TOO: [7]: 24 [1698327201.604763][2927:2929] CHIP:TOO: [8]: 25 [1698327201.604796][2927:2929] CHIP:TOO: [9]: 29

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

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

user@imx8mpnavq:~$ sudo chip-tool temperaturemeasurement read measured-value 11 18

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

[1698327459.217923][3154:3156] CHIP:DMG: ReportDataMessage = [1698327459.217949][3154:3156] CHIP:DMG: { [1698327459.217962][3154:3156] CHIP:DMG: AttributeReportIBs = [1698327459.217989][3154:3156] CHIP:DMG: [ [1698327459.218003][3154:3156] CHIP:DMG: AttributeReportIB = [1698327459.218187][3154:3156] CHIP:DMG: { [1698327459.218210][3154:3156] CHIP:DMG: AttributeDataIB = [1698327459.218230][3154:3156] CHIP:DMG: { [1698327459.218249][3154:3156] CHIP:DMG: DataVersion = 0xb4db29ff, [1698327459.218265][3154:3156] CHIP:DMG: AttributePathIB = [1698327459.218458][3154:3156] CHIP:DMG: { [1698327459.218481][3154:3156] CHIP:DMG: Endpoint = 0x12, [1698327459.218499][3154:3156] CHIP:DMG: Cluster = 0x402, [1698327459.218691][3154:3156] CHIP:DMG: Attribute = 0x0000_0000, [1698327459.218708][3154:3156] CHIP:DMG: } [1698327459.218731][3154:3156] CHIP:DMG: [1698327459.218751][3154:3156] CHIP:DMG: Data = 2198, [1698327459.218895][3154:3156] CHIP:DMG: }, [1698327459.218924][3154:3156] CHIP:DMG: [1698327459.218941][3154:3156] CHIP:DMG: }, [1698327459.219136][3154:3156] CHIP:DMG: [1698327459.219156][3154:3156] CHIP:DMG: ], [1698327459.219213][3154:3156] CHIP:DMG: [1698327459.219318][3154:3156] CHIP:DMG: SuppressResponse = true, [1698327459.219336][3154:3156] CHIP:DMG: InteractionModelRevision = 1 [1698327459.219349][3154:3156] CHIP:DMG: }

Temperature is 21.98 Celsius (2198 divided by 100).