Can't add additional matter over Wifi device

Hello

I need some help finding the reason why a new matter device can’t be added. Situation

  • Matter over Wifi only, no VLAN etc. configured
  • HA and matter running in docker container (see below)
  • I have one working matter device (SONOFF MINI Extreme Wi-Fi Smart Switch). I had some problems connecting it at first but after a few tries it’s now successfully connected and working for almost two months.
  • I see three IPv6 addresses listed for the Network Adapter in HA (Autoconfigure)
  • I believe the “sysctl.net.ipv6.conf.XXX” commands suggested in some other topics are only needed for matter over threads? I tried them anyway, no luck

I’m trying to connect another matter device “Leviton Decora Smart Wi-Fi Dimmer Switch”. While doing so I get the following error message. I tried completely reseting the Leviton by holding the on-buttong for 14+ seconds, same result.

2026-01-19 15:57:19.974 (MainThread) INFO [matter_server.server.device_controller] Starting Matter commissioning using Node ID 19 and IP fe80::207:a6ff:fe23:3df.
2026-01-19 15:57:23.725 (Dummy-2) CHIP_ERROR [chip.native.EM] <<5 [E:44593i with Node: <0000000000000000, 0> S:0 M:202917696] (U) Msg Retransmission to 0:0000000000000000 failure (max retries:4)
2026-01-19 15:57:30.426 (Dummy-2) CHIP_ERROR [chip.native.SC] PASESession timed out while waiting for a response from the peer. Expected message type was 33
2026-01-19 15:57:30.427 (Dummy-2) CHIP_ERROR [chip.native.ZCL] Secure Pairing Failed
2026-01-19 15:57:30.429 (Dummy-2) WARNING [chip.ChipDeviceCtrl] Failed to establish secure session to device: src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp:96: CHIP Error 0x00000003: Incorrect state
2026-01-19 15:57:30.431 (MainThread) ERROR [matter_server.server.client_handler] [548281669424] Error while handling: commission_on_network: Commissioning failed for node 19.

Afterwards the device is connected to my router and an IPv6 address is assigned but I always get the “Something went wrong” message and the device is not visible in HA.

Some more background information

I can ping both - the working sonoff as well as the not working Leviton device - from both docker containers. I can also ping6 the respective other container from within one container.

pi@homeassistant:~ $ sudo docker exec -it HADockerId bash
homeassistant:/config# ping6 fd11:4552:cb56:0:26ec:4aff:feca:4b00
PING fd11:4552:cb56:0:26ec:4aff:feca:4b00 (fd11:4552:cb56:0:26ec:4aff:feca:4b00): 56 data bytes
64 bytes from fd11:4552:cb56:0:26ec:4aff:feca:4b00: seq=0 ttl=255 time=97.996 ms
64 bytes from fd11:4552:cb56:0:26ec:4aff:feca:4b00: seq=1 ttl=255 time=121.498 ms
homeassistant:/config# ping6 fd11:4552:cb56::30a
PING fd11:4552:cb56::30a (fd11:4552:cb56::30a): 56 data bytes
64 bytes from fd11:4552:cb56::30a: seq=0 ttl=255 time=2.495 ms
64 bytes from fd11:4552:cb56::30a: seq=1 ttl=255 time=21.362 ms
homeassistant:/config# ping6 fe80::207:a6ff:fe23:3df%eth0
PING fe80::207:a6ff:fe23:3df%eth0 (fe80::207:a6ff:fe23:3df%2): 56 data bytes
64 bytes from fe80::207:a6ff:fe23:3df: seq=0 ttl=255 time=9.057 ms
64 bytes from fe80::207:a6ff:fe23:3df: seq=1 ttl=255 time=1.693 ms
pi@homeassistant:~ $ sudo docker exec -it MatterDockerId bash
root@homeassistant:/app# ping6 fd11:4552:cb56:0:26ec:4aff:feca:4b00
PING fd11:4552:cb56:0:26ec:4aff:feca:4b00(fd11:4552:cb56:0:26ec:4aff:feca:4b00) 56 data bytes
64 bytes from fd11:4552:cb56:0:26ec:4aff:feca:4b00: icmp_seq=1 ttl=255 time=162 ms
64 bytes from fd11:4552:cb56:0:26ec:4aff:feca:4b00: icmp_seq=2 ttl=255 time=184 ms
root@homeassistant:/app# ping6 fd11:4552:cb56::30a
PING fd11:4552:cb56::30a(fd11:4552:cb56::30a) 56 data bytes
64 bytes from fd11:4552:cb56::30a: icmp_seq=1 ttl=255 time=2.67 ms
64 bytes from fd11:4552:cb56::30a: icmp_seq=2 ttl=255 time=10.2 ms
root@homeassistant:/app# ping6 fe80::207:a6ff:fe23:3df%eth0
PING fe80::207:a6ff:fe23:3df%eth0(fe80::207:a6ff:fe23:3df%eth0) 56 data bytes
64 bytes from fe80::207:a6ff:fe23:3df%eth0: icmp_seq=1 ttl=255 time=3.65 ms

my compose.yaml looks as follows:

services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /usr/share/hassio:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    restart: unless-stopped
    privileged: true
    network_mode: host
    environment:
      TZ: America/Detroit
    devices:
      - /dev/serial/by-id/usb-Nabu_Casa_Home_Assistant_Connect_ZBT-1_b82a1b2c6f39ef11889c53f454516304-if00-port0:/dev/ZBT-1 # devices can't be symlinks

## Matter-server from https://github.com/home-assistant-libs
  matter-server:
    image: ghcr.io/home-assistant-libs/python-matter-server:stable
    container_name: matter-server
    restart: unless-stopped
    network_mode: host
    privileged: true
    security_opt:
      - apparmor:unconfined
    volumes:
      - /usr/share/hassio/addons/data/core_matter_server:/data
      - /usr/share/hassio/addons/config/core_matter_server:/config
      - /run/dbus:/run/dbus:ro
      - /etc/localtime:/etc/localtime:ro
      - /dev/hci0  # bluetooth device, might not be necessary, just in case

Any idea what I can do to see where the problem is? Can I increase the debug level for the matter container somehow?

Update: I had an old 2025 supervisor install still laying on my desk. I can successfully add the device there and was able to record the Wifi communication using Wireshark. Both start exactly the same but while the not working one keeps sending the MDNS requests the working one sends the same package but then continues, without anything visible on Wifi, the pairing.
Thus, there is some shenanigan going on between the homeassistant and the matter container.
Looking at the supervisor install I see that there is one additional container hassio_multicast connect to host (see below)

sudo docker network inspect host
    {
        "Name": "host",
        "Id": "e8ae21a612a72d3eae5651c61d4649250dcf7f6354cfdc76f4f3b24b903153fb",
        "Created": "2022-01-15T14:27:31.535544408-05:00",
        "Scope": "local",
        "Driver": "host",
        "EnableIPv4": true,
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": null
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "9e675dd7bed93e9a92e1bf8a54146b7631ec271deedd52fa2943b28901d53faf": {
                "Name": "addon_core_matter_server",
                "EndpointID": "d76044ef1d9a908a4c41f8577ae80ad340366403fca8c90474807f06c6b82026",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "bc7f922905558c911e58afbb129fab82815c1d9250c03715163fc21e6a50b8fa": {
                "Name": "homeassistant",
                "EndpointID": "e12bef8e053d838be8f045a067bbd1fd6201b5aa330eaf2e2500216c7c804f19",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            },
            "cee981e5a28acca7b8307160f6c15ade43c48abfde077667e17d1c2073eafd0d": {
                "Name": "hassio_multicast",
                "EndpointID": "9b32df0aebc506487bb04520d868093e5f8fbcbfb4055fd308d07e29b6633dfb",
                "MacAddress": "",
                "IPv4Address": "",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    },
    {
        "Name": "none",
        "Id": "054a5a98f04be1b4c1363d55f3d99df235b3a5d9c86ae4d3d16d338a410c0f95",
        "Created": "2022-01-15T14:27:31.442458474-05:00",
        "Scope": "local",
        "Driver": "null",
        "EnableIPv4": true,
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": null
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {},
        "Options": {},
        "Labels": {}
    }

I tried adding this one but it fails to start. Anyone has a docker yaml that include this one?

Searching this forum as well as sources on the internet did not reveal anything. Since I was desperate for a solution I simply tried to connect to http://homeassistant.local:5580/, clicked on “Commission node”, "Commission existing device, entered the “Share code” from the qr-code, and voila the device got added.
Long story short: Don’t try to add devices through HA web-interface as long as they can’t get the container setup working correctly but directly use the python matter server