Aqara M2 Hub ipv6?

I’m trying to add Aqara M2 Hub as a Matter device. I am running Home Assistant Container (latest) and have Matter integration setup using matter-server container. Containers are hosted on bare metal (6.17.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 14 Nov 2025 06:54:20 +0000 x86_64 GNU/Linux) I understand this is not a supported installation.

Every time I “add device” through the Matter integration on my phone and enter the pairing code, it fails after the “Adding Device to Homeassistant” screen with the error message “Something went wrong”

These are my Matter server logs:

matter-server  | 2025-11-21 13:40:34.880 (Dummy-2) CHIP_ERROR [chip.native.DIS] Failed to advertise records: src/inet/UDPEndPointImplSockets.cpp:417: OS Error 0x02000065: Network is unreachable
matter-server  | 2025-11-21 13:40:34.881 (Dummy-2) CHIP_ERROR [chip.native.DIS] Failed to advertise records: src/inet/UDPEndPointImplSockets.cpp:417: OS Error 0x02000065: Network is unreachable
...
matter-server  | 2025-11-21 15:10:29.925 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning using Node ID 9 and IP fe80::1ac2:3cff:fe5b:b822.
matter-server  | 2025-11-21 15:10:33.808 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:19079i with Node: <0000000000000000, 0> S:0 M:167028065] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4)
matter-server  | 2025-11-21 15:10:40.383 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
matter-server  | 2025-11-21 15:10:40.383 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
matter-server  | 2025-11-21 15:10:40.383 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state
matter-server  | 2025-11-21 15:10:40.384 (MainThread) ERROR [matter_server.server.client_handler] [140570595961808] Error while handling: commission_on_network: Commissioning failed for node 9.
matter-server  | 2025-11-21 23:57:16.383 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning using Node ID 10 and IP fe80::56ef:44ff:fe80:cdaf.
matter-server  | 2025-11-21 23:57:20.016 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:19080i with Node: <0000000000000000, 0> S:0 M:167028066] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4)
matter-server  | 2025-11-21 23:57:26.842 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
matter-server  | 2025-11-21 23:57:26.843 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
matter-server  | 2025-11-21 23:57:26.843 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state
matter-server  | 2025-11-21 23:57:26.844 (MainThread) ERROR [matter_server.server.client_handler] [140570595961808] Error while handling: commission_on_network: Commissioning failed for node 10.

My theory is that this is because the hub isn’t getting an ipv6 address. In my router’s client list, I can observe all my clients and their ipv4 and ipv6 addresses and I never see an ipv6 address for the hub (only ipv4). My router is Asus RT-AX86U running latest merlin firmware (Current Version : 3004.388.10_2)

I have tried

  • resetting the hub’s network interface (holding the button and re-adding it through the aqara app),
  • connecting hub directly to router (ethernet)
  • connecting hub to switch (that is in turn connected to router)
  • turning off and on ipv6 in my router,
  • disconnecting and reconnecting the ethernet cable from the hub, and
  • disconnecting and reconnecting the hub to wifi.

Every time I attempt to add it as a Matter device, I ensure my phone is running on 2.4ghz wifi. And every time I pair the hub to wifi I ensure 5ghz band is turned off.

Anyone have any guidance on if I’m even on the right track with ipv6? Or any advice on how to add it as a Matter device?

This is my compose file for the matter server:

services:
  # python-matter-server
  matter-server:
    image: ghcr.io/matter-js/python-matter-server:stable
    container_name: matter-server
    restart: unless-stopped
    # Required for mDNS to work correctly
    network_mode: host
    security_opt:
      # Needed for Bluetooth via dbus
      - apparmor:unconfined
    volumes:
      # Create an .env file that sets the USERDIR environment variable.
      - /serverfiles/matter-server/data:/data/
      # Required for Bluetooth via D-Bus
      - /run/dbus:/run/dbus:ro
    # If you adjust command line, make sure to pass the default CMD arguments too:
    command: --storage-path /data --paa-root-cert-dir /data/credentials --bluetooth-adapter 0

and I can verify my container host is receiving ipv6 addresses (both through the router and ip addr).

Are you able to share how you have configured IPv6 in your router? If you have DHCPv6 enabled, it is possible that the Aqara hub doesn’t support it (and only supports SLAAC-based IPv6 configuration). I don’t have an ASUS router to test on, so sharing the screenshots from there would be good.

If your network is using SLAAC, can you share the output of ip neigh - check this list to see if the MAC address of your Aqara hub is visible (there should be at least an IPv4 address visible; hopefully an IPv6 one too)

I believe I am running a SLAAC network. This is my current ipv6 config page:

I’ve also tried re-configuring to Stateful, but the results are the same.

ip seems to confirm the device is getting an ipv4 address but not an ipv6 address.

ip neigh 
192.168.1.221 dev br0 lladdr 18:c2:3c:5b:b8:22 STALE

Thanks for sending through those details.

Probably a really silly suggestion, but have you connected to the hub with whatever Aqara’s app is and confirmed that IPv6 isn’t explicitly disabled in its network settings?

I think you are generally on the right track with this being an IPv6 issue, as it is required by the matter spec.

I can’t see anywhere in the device settings to turn on or off ipv6 (or really have any control over the networking):


Interestingly, when the Matter pairing fails, the app reports it is participating in a Google Home ecosystem (despite my not using Google Home or even having the app installed on my phone).

I put a ticket in with aqara, we’ll see if they get back to me on that.

Pretty crazy that there aren’t any settings for that - keen for an update once you hear back from aqara

When I asked whether Matter over Wifi was supported and how to get it to pair, the response from Aqara was:

The wireless protocol for Hub M2 is
Wi-Fi IEEE 802.11 b/g/n 2.4GHz, Zigbee3.0 IEEE 802.15.4, BLE 5.0
Could you please disable IPv6 and configure the Wi-Fi to operate on both 2.4GHz and 5GHz, then connect the Hub M2 to a 2.4GHz Wi-Fi network?
It does not support Matter over Wi-Fi.

Which is confusing to me because there are threads on this forum where users describe getting the M2 hub to pair as a Matter device.

I’m not sure if Aqara Support is simply incorrect on this one, or if the product specs have changed or what. But I’m definitely becoming less optimistic about getting this hub to work as a Matter device in HA.

A quick search suggest that the M2 hub, when it first shipped a few years ago, did not support Matter, but the Matter bridge capability was added via firmware update (4.0 or later, I believe). The hub is not a Matter controller, it is a bridging device that can pair with a Matter controller and present its Zigbee children as connected devices, controllable via Matter.

That said, I notice some confusion in this topic about IPv6. Such as this:

When using auto-configuration, devices do not “get” an IPv6 address. When you enable IPv6 for a device, it does two things: (1) it self-assigns a Link Local Address (LLA) on every interface, and (b) it starts listening for Router Advertisements (RA) and self-assigns an IP on all discovered subnets (and do a quick check to make sure the IP isn’t already taken). IPv6 auto-configuration (i.e. SLAAC) was intended to make the address management side of DHCP obsolete.

Your router is configured to broadcast RAs — but you don’t even need this for Matter, because Matter was designed (and in fact some implementations prefer) to use LLAs so that you don’t need to enable anything on any routers to use Matter with IPv6.

There are down sides of all this auto-configuration — (a) Matter only works on a single subnet; you can’t pass critical Matter traffic through routers (except Thread Border Routers) due to the use of LLAs, and (b) it’s hard to see what’s going on, and the debugging tools are often new / unfamiliar / poorly documented / hard to find.

I recommend starting with the Zeroconf Browser tool built into HA (Settings → System → Network → Zeroconf). If you have a Matter device with an open commissioning window anywhere on your subnet, it should appear with a _matterc._udp service. If you have Matter devices on your subnet, they should appear with _matter._tcp service. In both cases you should be able to discover what IPv6 addresses they assigned themselves.