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).


