Hola a todos, necesitaría vuestra ayuda para integrar una bombilla Matter.
Origen:
IKEA Dirigera, unos 15 dispositivos Matter over Thread (bombillas, sensores de temperatura, mandos a distancia, chips ESP32)
Procedimiento anterior:
Obtener nuevo código de IKEA Dirigera, añadir dispositivo Matter en las integraciones de Gladys, introducir código, iniciar escaneo, añadir.
Ahora, sin embargo:
Bombilla IKEA:
Primer escaneo:
Segundo escaneo:
¿Otra vez? Vale, un intento:
¿Notáis que Gladys detecta la bombilla en algún momento y parece incluso haberla añadido, pero no aparece entre los dispositivos?
Es extraño, por desgracia no conozco solución por el momento.
Hasta ahora, siempre he conseguido añadir todos los dispositivos Matter de esta manera. La distancia entre la bombilla y el hub es de unos 5 metros. El Wi-Fi funciona. Todos los demás dispositivos funcionan.
Aquí tenéis el extracto correspondiente del registro de Docker:
…
Me encantaría que alguien tuviera una idea para resolver este problema. Gracias de antemano por vuestra atención y apoyo. Un saludo, Tom
¡Hola a todos!
Este tema ahora está en desarrollo .
Se ha abierto una PR para corregir el error de emparejamiento Matter « Node ID X ya está comisionado » (actualización de matter.js a 0.17.9):
master ← claude/confident-hypatia-wpt1ah
ouvert 02:39PM - 21 Sep 26 UTC
### Description
Pairing a new Matter device could fail with:
```
matter.pairDe… vice.js:50 Error commissioning device: Error: Node ID 1 is already commissioned and can not be reused
```
and, on the next attempt, `Node ID 2 ...`, `Node ID 3 ...` — one node ID burned per attempt, on a controller that already has nodes 1–16.
**Root cause (matter.js 0.17.6, the version pinned by the service lockfile):** when allocating the next sequential node ID for a commissioning, `ControllerBehavior.allocatePeerAddress()` checks collisions through `IdentityService.peerAddressInUse()`, which in 0.17.6 only knew about addresses reserved at runtime (`peers.added` events). Nodes already commissioned by the controller were not taken into account, so as soon as the persisted `nextNodeId` counter was behind the existing nodes, the allocator handed out an ID that `ControllerCommissioner` then rejected against the `PeerSet` with `NodeIdConflictError`.
**Fix:** matter.js 0.17.7 ships *"Fix: Consider existing node IDs when determining the next node ID to commission"* — `peerAddressInUse()` now also consults the `PeerSet`:
```diff
peerAddressInUse(address) {
- return this.#reservedPeerAddresses.has(PeerAddress(address));
+ address = PeerAddress(address);
+ return this.#reservedPeerAddresses.has(address) || !!this.#node.env.maybeGet(PeerSet)?.has(address);
}
```
0.17.8 / 0.17.9 additionally bring fixes for unreachable peers and subscription re-establishment.
`server/services/matter/package.json` already declared `^0.17.6`, but the service lockfile pinned 0.17.6 and `cli/install_service_dependencies.js` runs `npm install`, which keeps a lockfile that satisfies the range — so nobody ever got the upstream fix. This PR bumps the service dependencies (`@matter/main`, `@project-chip/matter.js`) and the server devDependency (`@matter/main`) to `^0.17.9` and refreshes both lockfiles. Lockfile changes are limited to the `@matter/*` packages and their `@noble/hashes` dependency. No Gladys code change.
Verification done locally:
- `npm run test-service --service=matter`: 302 passing
- smoke-loaded the real 0.17.9 modules used by the service (`@matter/main`, `@matter/main/types`, `@matter/main/clusters`, `@project-chip/matter.js`) and confirmed the installed `IdentityService.peerAddressInUse()` carries the upstream fix
- `prettier --check` on the four changed manifest files
### Related request
Forum: https://community.gladysassistant.com/t/matter-over-thread-decouvert-mais-non-accepte/10881
### Checklist
- [x] If a forum topic or GitHub issue exists, the description links it (`Forum: https://community.gladysassistant.com/t/...` or `Closes #...`)
- [x] Tests pass: `cd server && npm run coverage` (Codecov requires 100% coverage on changed lines) and Cypress (`npm run cypress:run`) if the UI changed — dependency-only change, no JS lines touched; the Matter service suite (302 tests) passes locally
- [x] Linter and prettier pass on both front and server (`npm run eslint`, `npm run prettier`)
- [x] No undocumented breaking change
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ThmubNV1qfGSC65L5cD3qc
---
_Generated by [Claude Code](https://claude.ai/code/session_01ThmubNV1qfGSC65L5cD3qc)_
## Summary by CodeRabbit
- **Chores**
- Updated internal components to newer versions.
- No user-facing feature changes, behavior changes, or interface updates are included in this release.
No duden en seguir la PR, probar (opcional, especialmente para pequeñas solicitudes) y dar sus comentarios aquí si es necesario.
Hola Tom,
¡Gracias por los logs, son muy claros! El mensaje clave es este:
Error commissioning device: Error: Node ID 1 is already commissioned and can not be reused
luego Node ID 2 ... en el siguiente intento. Por lo tanto, no es tu lámpara, ni el Wi-Fi, ni la Dirigera: el emparejamiento en sí funciona bien (se ve que Gladys habla con la bombilla), es la biblioteca Matter utilizada por Gladys (matter.js 0.17.6) la que asigna a la nueva bombilla un número de nodo ya tomado por uno de tus dispositivos existentes. Tienes 16 nodos (tus dispositivos + la Dirigera), y el contador interno se reinicia en 1: cada intento «quema» un número, falla y vuelve a intentarlo con el siguiente. Es un error de matter.js, corregido en la versión 0.17.7.
He preparado el parche en Gladys (actualización de matter.js a 0.17.9): #3122 .
Estará en el próximo lanzamiento.
@ruegerth La corrección está en vivo en Gladys Assistant 5.1.0
¡Vaya, vaya, vaya…! Muchas gracias, de verdad, por esta respuesta ultrarrápida y por su ayuda… Ya estaba al borde de la desesperación. Lo probaré mañana y les haré saber.
Atentamente,
Tom
Ya probado, Gladys versión 5.1.0:
Es tan rápido que ni siquiera tienes tiempo de «mirar»… Todo se resuelve en unos segundos.
Excelente trabajo, gracias por su ayuda
ladys | 2026-09-22T00:15:24+0200 matter.handleNode.js:138 (MatterHandler.handleNode) Matter: Node 13 handled, 1 device(s) with features (connected)
gladys | 2026-09-22T00:15:24+0200 matter.handleNode.js:138 (MatterHandler.handleNode) Matter: Node 12 handled, 2 device(s) with features (connected)
gladys | 2026-09-22T00:15:24+0200 matter.handleNode.js:138 (MatterHandler.handleNode) Matter: Node 11 handled, 3 device(s) with features (connected)
gladys | 2026-09-22T00:15:24+0200 matter.handleNode.js:138 (MatterHandler.handleNode) Matter: Node 3 handled, 2 device(s) with features (connected)
gladys | 2026-09-22T00:15:24+0200 matter.refreshDevices.js:30 (MatterHandler.refreshDevices) Matter: Refresh complete, 19 device(s) with features discovered
gladys | 2026-09-22 00:15:59.959 WARN PeerConnection @1 :8 udp://[fd1a:9a82:f69e:1:6e6a:3dcd:5d61:badd]:5540 Peer error (retry in 5m): [channel-status-response] (Failure (1) / NoSharedTrustRoots (1)) Received general error status for protocol 0 (Sigma2(Resume))
gladys | 2026-09-22T00:18:05+0200 matter.setValue.js:72 (MatterHandler.setValue) Setting value for node 17, value = 0
gladys | 2026-09-22T00:18:06+0200 matter.setValue.js:72 (MatterHandler.setValue) Setting value for node 17, value = 1
gladys | 2026-09-22T00:19:26+0200 device.getDuckDbMigrationState.js:11 (DeviceManager.getDuckDbMigrationState) Device : getDuckDbMigrationState
gladys | 2026-09-22T00:19:26+0200 system.runHostPowerDbusCommand.js:156 (System.runHostPowerDbusCommand) System: running host power command CanReboot via docker-helper
gladys | 2026-09-22T00:19:26+0200 system.isDocker.js:13 (System.isDocker) System.isDocker: This system is running inside Docker.
gladys | 2026-09-22T00:19:26+0200 device.getDuckDbMigrationState.js:20 (DeviceManager.getDuckDbMigrationState) Device : getDuckDbMigrationState : isDuckDbMigrated: true
gladys | 2026-09-22T00:19:26+0200 device.getDuckDbMigrationState.js:21 (DeviceManager.getDuckDbMigrationState) Device : getDuckDbMigrationState : duckDbDeviceStateCount: 495039
gladys | 2026-09-22T00:19:26+0200 device.getDuckDbMigrationState.js:22 (DeviceManager.getDuckDbMigrationState) Device : getDuckDbMigrationState : sqliteDeviceStateCount: 0
gladys | 2026-09-22T00:19:26+0200 device.getDuckDbMigrationState.js:23 (DeviceManager.getDuckDbMigrationState) Device : getDuckDbMigrationState : sqliteDeviceStateAggregateCount: 0
gladys | 2026-09-22T00:19:27+0200 system.detectHostPowerManagement.js:69 (probeHostPowerCapabilities) System: host power management not reachable via docker-helper: Host power helper container exited with status 1: �Failed to open connection to « system » message bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
gladys |
gladys | 2026-09-22T00:19:57+0200 system.isDocker.js:13 (System.isDocker) System.isDocker: This system is running inside Docker.
gladys | 2026-09-22T00:20:27+0200 system.isDocker.js:13 (System.isDocker) System.isDocker: This system is running inside Docker.
gladys | 2026-09-22T00:20:57+0200 system.runHostPowerDbusCommand.js:156 (System.runHostPowerDbusCommand) System: running host power command CanReboot via docker-helper
gladys | 2026-09-22T00:20:57+0200 system.isDocker.js:13 (System.isDocker) System.isDocker: This system is running inside Docker.
gladys | 2026-09-22T00:20:57+0200 system.detectHostPowerMan