Matter.js update to 0.16

@prohand I’ve made a few fixes, but I need your help to test :slight_smile:

The image is the same:

gladysassistant/gladys:updgrade-matter-0-16-8

Can you re-test and see if everything works?

As for me, I haven’t managed it yet. I even tried with Home Assistant but I can’t get anything to work.
I probably have an issue in my configuration but haven’t had time to look into it further.

1 Like

Thanks; after upgrading I end up with all this:

I need to purge the config
I should be able to do better testing tonight, normally :slight_smile:

Thanks @prohand!

I pushed a new update of the same image (building) to move to 0.16.9, and I fixed a device control bug.

If you can check that the data is coming through correctly, and that the devices are controllable, that would be perfect :slight_smile:

1 Like

Yes I’ll let you know tonight :wink:
Is there a way to completely purge matter so I can restart the tests from scratch?
If not, never mind, I’ll figure something out tonight.

You need to delete the Matter folder on the disk and restart Gladys, but in your case I’m not sure if that’s desirable, because here we specifically want to test that it works with the existing setup :slight_smile:

I managed to remove what was extra and start again from a clean slate :slight_smile:
I have to leave so I can’t continue the tests :slight_smile:

I’ll let you know tonight when 0.16.9 is ok

1 Like

@pierre-gilles Is the build for 0.16.9 finished?

I’m getting the following error:
image

@prohand, @pierre-gilles indicated he used the same image. So on 0.16.8

1 Like

Exactly! Same image as before!

Ah sorry :slight_smile:
I’ll test it :slight_smile:

After the update, devices appear as disconnected:

Devices are not controllable

When I go to the page that displays offline devices, I have this in the logs:

2026-02-20T19:31:11+0100 \u003cwarn\u003e errorMiddleware.js:68 (errorMiddleware) [retransmission-limit-reached] Device @1:8215ef04bf407844 is unreachable
      at ReconnectableExchangeProvider.\u003canonymous\u003e (/src/server/services/matter/node_modules/@matter/protocol/src/peer/PeerSet.ts:372:23)
      at ReconnectableExchangeProvider.reconnectChannel (/src/server/services/matter/node_modules/@matter/protocol/src/protocol/ExchangeProvider.ts:125:20)
      at ClientInteraction.#begin (/src/server/services/matter/node_modules/@matter/protocol/src/action/client/ClientInteraction.ts:770:34)
      at ClientInteraction.read (/src/server/services/matter/node_modules/@matter/protocol/src/action/client/ClientInteraction.ts:187:31)
      at ClientStructure.mutate (/src/server/services/matter/node_modules/@matter/node/src/node/client/ClientStructure.ts:190:26)
      at ClientNodeInteraction.read (/src/server/services/matter/node_modules/@matter/node/src/node/client/ClientNodeInteraction.ts:75:9)
      at InteractionClient.#processReadResult (/src/server/services/matter/node_modules/@project-chip/matter.js/src/cluster/client/InteractionClient.ts:467:26)
      at InteractionClient.getMultipleAttributesAndEvents (/src/server/services/matter/node_modules/@project-chip/matter.js/src/cluster/client/InteractionClient.ts:424:16)
      at InteractionClient.getAttribute (/src/server/services/matter/node_modules/@project-chip/matter.js/src/cluster/client/InteractionClient.ts:571:38)
      at AttributeClient.get (/src/server/services/matter/node_modules/@project-chip/matter.js/src/cluster/client/AttributeClient.ts:140:16)
      at handleDevice (/src/server/services/matter/lib/matter.handleNode.js:46:28)
      at /src/server/services/matter/lib/matter.handleNode.js:88:7

Are you sure your devices are available? Is your Matterbridge instance up and properly configured? You haven’t reset Matterbridge since then?

Before the update the devices were up and available. (I use the plugin that generates devices)
I could perform an on/off and it was properly propagated to matterbridge

1 Like

Okay, well we’ll have to investigate :sweat_smile:

If this can help I got the following in the logs:

[Gladys 5F78@Matterbridge (Air Conditioner) 93@Matterbridge (Air Conditioner) 93@On] characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics
[Gladys 5F78@Matterbridge (Update Matterbridge) 3@Matterbridge (Update Matterbridge) 3@On] characteristic was supplied illegal value: null! Home App will reject null for Apple defined characteristics

And when I try to re-run a commissioning in Gladys with the code present in matterbridge I get this:

2026-02-20T20:05:29+0100 \u003cinfo\u003e gateway.getLatestGladysVersion.js:11 (Gateway.getLatestGladysVersion) Gladys : getLatestGladysVersion
2026-02-20T20:05:29+0100 \u003cinfo\u003e system.isDocker.js:13 (System.isDocker) System.isDocker: This system is running inside Docker.
2026-02-20T20:05:29+0100 \u003cinfo\u003e gateway.getLatestGladysVersion.js:19 (Gateway.getLatestGladysVersion) Device state count in DuckDB: 83499776
2026-02-20T20:05:38+0100 \u003cinfo\u003e matter.pairDevice.js:38 (MatterHandler.pairDevice) Commissioning device with options: {\"commissioning\":{\"regulatoryLocation\":0,\"regulatoryCountryCode\":\"XX\",\"regulatoryLocationType\":0},\"discovery\":{\"identifierData\":{\"shortDiscriminator\":12},\"discoveryCapabilities\":{\"ble\":false}},\"passcode\":40218369,\"commissioningTimeoutSeconds\":90,\"commissioningAttempts\":4,\"commissioningRetryDelayMs\":1000}
2026-02-20T20:05:38+0100 \u003cerror\u003e matter.pairDevice.js:50 (MatterHandler.pairDevice) Error commissioning device: Error: Received incorrect key confirmation from the receiver. Commissioning failed.
2026-02-20T20:05:40+0100 \u003cwarn\u003e errorMiddleware.js:68 (errorMiddleware) [discovery] @1:8215ef04bf407844 is not reachable right now.
      at PeerSet.#connectOrDiscoverNode (/src/server/services/matter/node_modules/@matter/protocol/src/peer/PeerSet.ts:541:23)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at PeerSet.#resume (/src/server/services/matter/node_modules/@matter/protocol/src/peer/PeerSet.ts:443:20)
1 Like

Hi @prohand :slight_smile:

Sorry for the delay, I’m gradually clearing my todos — there’s a lot going on right now :smiley:

I read the Matter.js CHANGELOG, and I get the impression it might have just been a bug in 0.16.9, which is fixed in 0.16.10.

I’m thinking of these two lines:

Fix: Fixes crash when decommissioning a node while a reconnection is in progress
Fix: Keep an active reconnection timer running when we detect a node shutdown

So I updated the version and made a release, still on:

gladysassistant/gladys:updgrade-matter-0-16-8

(Yes, the tag doesn’t make much sense anymore :p)

Can you test and tell me if it works?

If not, I’d like the full log in private (don’t bother filtering it, I prefer to have everything!) :slight_smile:

Thanks!

No worries :slight_smile:
I’ll do the test tonight and I’ll let you know :slight_smile:

That works out well — I even have a dedicated instance for my tests now :wink:

Thanks

1 Like

I was finally able to test and the problem remains the same.
I’ll send you the logs privately :slight_smile:

1 Like

Hi @prohand :slight_smile:

I’ve made progress on this!

There are clearly deep changes in the way the initial connection of Matter nodes works in Matter.js 0.16 — I found an implementation that seems to work for me, and I contacted the Matter.js maintainer to make sure I’m heading in the right direction.

For now, the Docker image is available under the following tag:

gladysassistant/gladys:updgrade-matter-0-16-8

If you can test it and confirm that it works for you as well!

Meanwhile, I’m continuing to work on it; it’s my #1 priority right now on the development side :slight_smile:

Thanks for your patience :raising_hands:

1 Like