Unable to commision new Matter device due to failing node discovery

Hi all,

I am running HA in a container and using a container version of Matter-serverjs. Due to me failing to migrate from the matter-server python container properly I will need to recommission all of my matter devices. However, the configuration fails. I have already reconfigured my thread network, sent the credentials to my phone and recreated both the home assistant container and the matter-server container.

The logs say the following:
2026-07-19 17:49:29.048 [Info] > HomeAssistant-Extensions-Matter Version: 2026.7.1 Build: 2026.2346 PID: 65637
2026-07-19 17:49:29.048 [Info] > XCGLogger Version: 7.0.1 - Level: Debug
2026-07-19 17:49:29.057 [Info] > XCGLogger appending log to: file:///private/var/mobile/Containers/Shared/AppGroup/EC7729C0-26B5-4DB0-8F8E-57928BD53A90/logs/HomeAssistant-Extensions-Matter.txt
2026-07-19 17:49:29.074 [Verbose] [main] [ConnectivityWrapper.swift:121] syncNetworkInformation(completion:) > Current SSID: Optional(“TMNL-6CD1ED”), current BSSID: Optional(“14:36:0e:4f:6b:24”)
2026-07-19 17:49:29.078 [Verbose] [main] [ConnectivityWrapper.swift:121] syncNetworkInformation(completion:) > Current SSID: Optional(“TMNL-6CD1ED”), current BSSID: Optional(“14:36:0e:4f:6b:24”)
2026-07-19 17:49:29.083 [Verbose] [com.apple.root.user-initiated-qos.cooperative] [MatterRequestHandler.swift:30] selectThreadNetwork(from:) > preferredNetworkMacExtendedAddress: Optional(“5b198cfc19917d57”)
2026-07-19 17:49:29.083 [Verbose] [com.apple.root.user-initiated-qos.cooperative] [MatterRequestHandler.swift:34] selectThreadNetwork(from:) > threadScanResults: [“Network name: gw2-d5132bba0adc, Extended PAN ID: 3684120817691572360, Mac extended address: b20af25435747eb6”, “Network name: NEST-PAN-7395, Extended PAN ID: 4283075221952726179, Mac extended address: da847c395f35466f”]
2026-07-19 17:49:29.083 [Verbose] [com.apple.root.user-initiated-qos.cooperative] [MatterRequestHandler.swift:38] selectThreadNetwork(from:) > Preferred Extended PAN ID (UInt64): Optional(3684120817691572360)
2026-07-19 17:49:29.084 [Verbose] [com.apple.root.user-initiated-qos.cooperative] [MatterRequestHandler.swift:46] selectThreadNetwork(from:) > Using selected thread network, name: gw2-d5132bba0adc
2026-07-19 17:49:35.883 [Info] [com.apple.root.user-initiated-qos.cooperative] [HAAPI.swift:100] init(server:urlConfig:) > [mTLS] Creating HAKit URLSession for server: Home
2026-07-19 17:49:35.885 [Info] [com.apple.root.user-initiated-qos.cooperative] [HAAPI.swift:101] init(server:urlConfig:) > [mTLS] Has client certificate: false
2026-07-19 17:49:35.886 [Info] [com.apple.root.user-initiated-qos.cooperative] [HAAPI.swift:102] init(server:urlConfig:) > [mTLS] Has security exceptions: false
2026-07-19 17:49:35.888 [Info] [com.apple.root.user-initiated-qos.cooperative] [HAAPI.swift:193] makeCertificateAwareURLSession(server:) > [mTLS] Using default URLSession for HAKit
2026-07-19 17:49:35.899 [Info] [main] [Environment.swift:72] init() > WebSocket: connecting using HAConnectionInfo(url: http://192.168.1.221:8123, userAgent: Optional(“Home Assistant/2026.7.1 (io.robbie.HomeAssistant; build:2026.2346; iOS 27.0.0)”), engine: nil, evaluateCertificate: Optional((Function)), clientIdentity: nil)
2026-07-19 17:49:35.912 [Info] [main] [Environment.swift:72] init() > WebSocket: Viability changed: true
2026-07-19 17:49:35.915 [Info] [main] [Environment.swift:72] init() > WebSocket: connected with headers: [“Sec-WebSocket-Accept”: “AetxwgBnGjCfbYPdZe0z1y0tAqw=”, “Server”: “Python/3.14 aiohttp/3.14.1”, “Sec-WebSocket-Extensions”: “permessage-deflate”, “Connection”: “upgrade”, “Date”: “Sun, 19 Jul 2026 15:49:35 GMT”, “Upgrade”: “websocket”]
2026-07-19 17:49:35.915 [Info] [main] [Environment.swift:72] init() > WebSocket: phase transition to auth
2026-07-19 17:49:35.917 [Error] [main] [TokenManager.swift:123] currentToken > Token 3453579125760833417 is expired by 255 seconds
2026-07-19 17:49:35.917 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Received: auth: required
2026-07-19 17:49:35.921 [Info] [main] [TokenManager.swift:178] refreshToken() > starting refreshToken cache
2026-07-19 17:49:35.960 [Info] [main] [TokenManager.swift:145] refreshToken() > storing refresh token
2026-07-19 17:49:35.970 [Info] [refresh-promise-cache-mutex] [TokenManager.swift:148] refreshToken() > reset cached refreshToken promise
2026-07-19 17:49:35.970 [Info] [main] [TokenManager.swift:174] refreshToken() > refresh token got success
2026-07-19 17:49:35.970 [Info] [main] [TokenManager.swift:83] bearerToken > providing token -2742293736970387601
2026-07-19 17:49:35.970 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Sending: (auth)
2026-07-19 17:49:35.973 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Received: auth: ok(version: “2026.7.2”)
2026-07-19 17:49:35.973 [Info] [main] [Environment.swift:72] init() > WebSocket: phase transition to command(version: “2026.7.2”)
2026-07-19 17:49:35.973 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Sending: {“event_type”:“component_loaded”,“id”:1,“type”:“subscribe_events”}
2026-07-19 17:49:35.973 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Sending: {“code”:“MT:CUO004G112L0RT2VA10”,“id”:2,“type”:“matter/commission”}
2026-07-19 17:49:35.973 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Sending: {“event_type”:“core_config_updated”,“id”:3,“type”:“subscribe_events”}
2026-07-19 17:49:35.976 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Received: result success HARequestIdentifier(rawValue: 1)
2026-07-19 17:49:35.978 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Received: result success HARequestIdentifier(rawValue: 3)
2026-07-19 17:50:31.298 [Info] [main] [Environment.swift:72] init() > WebSocket: Ping
2026-07-19 17:50:40.063 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Sending: {“id”:4,“type”:“ping”}
2026-07-19 17:50:40.072 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Received: result success HARequestIdentifier(rawValue: 4)
2026-07-19 17:51:36.128 [Info] [main] [Environment.swift:72] init() > WebSocket: Ping
2026-07-19 17:51:45.063 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Sending: {“id”:5,“type”:“ping”}
2026-07-19 17:51:45.070 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Received: result success HARequestIdentifier(rawValue: 5)
2026-07-19 17:52:36.595 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Received: result failure HARequestIdentifier(rawValue: 2): external(HAKit.HAError.ExternalError(code: “1”, message: “Commission failed: discovery of node with discriminator 970 failed: No device could be commissioned (1 of 1 started attempt(s) failed, 1 discovered)”)) via {“id”:2,“type”:“result”,“success”:false,“error”:{“code”:“1”,“message”:“Commission failed: discovery of node with discriminator 970 failed: No device could be commissioned (1 of 1 started attempt(s) failed, 1 discovered)”}}
2026-07-19 17:52:43.603 [Info] [main] [Environment.swift:72] init() > WebSocket: Ping
2026-07-19 17:52:50.063 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Sending: {“id”:6,“type”:“ping”}
2026-07-19 17:52:50.072 [Info] [hakit-work-queue] [Environment.swift:72] init() > WebSocket: Received: result success HARequestIdentifier(rawValue: 6)

Any suggestions as to what I can do to fix this problem?

Logs from the container

SOLVED: I reconfigured all of my containers and rebuilt my HA configuration. I presume the problem was somewhere in the Data dir, and that the matterjs-server did not fetch the old data properly.

Now that I’m using matterjs-server I have not had a single instance of matter devices becoming unavailble or unable to be configured.

1 Like