Questions

Hello,

I have a few questions about Matter integration and IPv6 detection in Gladys.
Some time ago I changed my internal network and after some bad manipulations, I had to disable IPv6 forwarding from the WAN to the LAN.
So I only have internal IPv6 left (fe80:: ).
This caused an error in Gladys because we check whether the IPv6 is an external IP or not:

And since that day I can no longer access my Matter devices, nor matterbridge :frowning:
But it’s only with Gladys that I have no access because after some tests on Apple Home, Homey Self Hosted and HA, it worked very well: everything was detected, visible and functional.

Looking at the matterbridge docs, I saw this:


At the time of testing, I had noticed that if Gladys and matterbridge did not have the same IPv6 configuration (both had to be either internal or external, but not one internal and the other external), it had been decided to block internal IPv6 on Gladys. I realize that this was not such a good idea :roll_eyes:

@pierre-gilles do you think we can « reactivate » internal IPv6 on Gladys?
I’m available for testing :wink:

Hi @mutmut :slightly_smiling_face:

Gladys doesn’t enable anything in particular and doesn’t directly manage the network configuration. Everything related to IPv6 depends solely on your machine and your network configuration. On its side, Gladys simply displays a message based on whether it detects an IPv6 address.

So, this message is purely informational, and the changes we made don’t really change the situation in this case :sweat_smile:

I hope that’s clearer! Don’t hesitate if anything isn’t obvious.

argh, unfortunately yes it’s clearer and I have a problem with the Matter integration then :weary_face:

So here’s what I have:

  • I no longer see my matterbridge in the Matter configuration interface
  • I still have my devices from matterbridge but they’re not controllable
  • I add Matter over Wi-Fi devices but nothing appears in the Matter configuration
  • I added the same devices a second time and Gladys tells me they are already associated but I don’t see them.

Do you have any idea by chance to point my troubleshooting in the right direction? I don’t know what else to do if it’s not the network.

By any chance, do you have any errors in the Gladys logs related to Matter?

I found quite a few occurrences of this:

2026-03-16T16:46:03+0100 \u003cwarn\u003e errorMiddleware.js:68 (errorMiddleware) CachedClientNodeStore unavailable due to initialization error
      at crashedError (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:605:32)
      at handleRejection (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:312:69)
    Caused by: (ValidationOutOfBoundsError/135) EndpointNumber must be between 0 and 0xFFFE, got NaN
      at EndpointNumber (/src/server/services/matter/node_modules/@matter/types/src/datatype/EndpointNumber.ts:23:11)
      at CachedClientNodeStore.#loadEndpointStore (/src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:52:32)
      at /src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:46:28

and when I tried to add my device (already added but not visible), I got this:

2026-03-16T16:47:08+0100 \u003cinfo\u003e matter.pairDevice.js:38 (MatterHandler.pairDevice) Commissioning device with options: {\"commissioning\":{\"regulatoryLocation\":0,\"regulatoryCountryCode\":\"XX\",\"regulatoryLocationType\":0},\"discovery\":{\"identifierData\":{\"shortDiscriminator\":5},\"discoveryCapabilities\":{\"ble\":false}},\"passcode\":38085971,\"commissioningTimeoutSeconds\":90,\"commissioningAttempts\":4,\"commissioningRetryDelayMs\":1000}
2026-03-16 16:47:10.750 ERROR  Controller~missioner Commissioning step 11.1: OperationalCredentials.Certificates failed with error: Commission error: This device is already commissioned into this fabric. You can not commission it again. ... Aborting commissioning
2026-03-16T16:47:10+0100 \u003cerror\u003e matter.pairDevice.js:50 (MatterHandler.pairDevice) Error commissioning device: Error: Commission error: This device is already commissioned into this fabric. You can not commission it again.

After disabling and re-enabling Matter:

2026-03-15T22:57:20+0100 \u003cinfo\u003e index.js:36 (Object.stop) Stopping Matter service
2026-03-15T22:57:22+0100 \u003cinfo\u003e index.js:18 (Object.start) Starting Matter service
2026-03-15T22:57:22+0100 \u003cinfo\u003e index.js:24 (Object.start) Matter is enabled, starting...
2026-03-15T22:57:22+0100 \u003cinfo\u003e matter.init.js:20 (MatterHandler.init) Matter.init: storagePath: /var/lib/gladysassistant/matter
2026-03-15 22:57:22.632 WARN   Commission~ontroller BLE is not supported on this platform
2026-03-15T22:58:05+0100 \u003cwarn\u003e service.start.js:44 (Service.start) Unable to start service matter CachedClientNodeStore unavailable due to initialization error
      at crashedError (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:605:32)
      at handleRejection (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:312:69)
    Caused by: (ValidationOutOfBoundsError/135) EndpointNumber must be between 0 and 0xFFFE, got NaN
      at EndpointNumber (/src/server/services/matter/node_modules/@matter/types/src/datatype/EndpointNumber.ts:23:11)
      at CachedClientNodeStore.#loadEndpointStore (/src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:52:32)
      at /src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:46:28
2026-03-15T22:58:05+0100 \u003cwarn\u003e errorMiddleware.js:68 (errorMiddleware) CachedClientNodeStore unavailable due to initialization error
      at crashedError (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:605:32)
      at handleRejection (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:312:69)
    Caused by: (ValidationOutOfBoundsError/135) EndpointNumber must be between 0 and 0xFFFE, got Na
      at EndpointNumber (/src/server/services/matter/node_modules/@matter/types/src/datatype/EndpointNumber.ts:23:11)
      at CachedClientNodeStore.#loadEndpointStore (/src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:52:32)
      at /src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:46:28
2026-03-15T22:58:05+0100 \u003cwarn\u003e errorMiddleware.js:68 (errorMiddleware) CachedClientNodeStore unavailable due to initialization error
      at crashedError (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:605:32)
      at handleRejection (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:312:69)
    Caused by: (ValidationOutOfBoundsError/135) EndpointNumber must be between 0 and 0xFFFE, got NaN
      at EndpointNumber (/src/server/services/matter/node_modules/@matter/types/src/datatype/EndpointNumber.ts:23:11)
      at CachedClientNodeStore.#loadEndpointStore (/src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:52:32)
      at /src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:46:28
2026-03-15T22:58:06+0100 \u003cwarn\u003e errorMiddleware.js:68 (errorMiddleware) CachedClientNodeStore unavailable due to initialization error
      at crashedError (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:605:32)
      at handleRejection (/src/server/services/matter/node_modules/@matter/general/src/util/Construction.ts:312:69)
    Caused by: (ValidationOutOfBoundsError/135) EndpointNumber must be between 0 and 0xFFFE, got NaN
      at EndpointNumber (/src/server/services/matter/node_modules/@matter/types/src/datatype/EndpointNumber.ts:23:11)
      at CachedClientNodeStore.#loadEndpointStore (/src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:52:32)
      at /src/server/services/matter/node_modules/@project-chip/matter.js/src/device/CachedClientNodeStore.ts:46:28

Ok, the issue is pretty clear — there’s a bug in the matter-js library we’re using, the error is CachedClientNodeStore unavailable due to initialization error caused by EndpointNumber must be between 0 and 0xFFFE, got NaN

For info, I’m working on updating this dependency because you’re not the only one having problems!

I’m encountering some issues due to breaking changes in the library, but nothing insurmountable :wink:

I’ll keep you posted as soon as I have a testable version!

3 Likes

Great, thanks @pierre-gilles !

For info I have a test Gladys that has another matterbridge visible in the configuration and I can control my Somfy shutters.
The difference is that on my test platform, everything is in Docker on the same host (same IP everywhere), whereas for my production, I have Gladys on one IP and matterbridge on another.

1 Like