Replies: 2 comments
-
|
Ok, not a bug. It was a PEBKAC error. The root cause was missing the bridgedNode device type in the device type array. When creating Matter bridged devices, you must include bridgedNode as the first device type: // BROKEN - single device type // WORKING - array with bridgedNode first The bridgedNode device type (0x0013) includes the required revision field (value 3) that Matter's descriptor cluster validation requires. Without it, Matterbridge 3.4.5's stricter validation rejected the devices with "Conformance M: Matter requires you to set this attribute" errors. In 3.3.8, the devices just silently stayed inactive. |
Beta Was this translation helpful? Give feedback.
-
|
Ok. Check if you correctly linked the active instance of matterbridge to the plugin. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Maybe I'm doing something wrong here.
Environment
Summary
When creating a DynamicPlatform plugin, devices created with
MatterbridgeEndpointand registered viaregisterDevice()remain in an "inactive" state and never receive endpoint numbers. The devices are never added to the Matter endpoint tree, even thoughregisterDevice()completes without throwing an error.Matterbridge's own virtual devices (RestartMatterbridge, UpdateMatterbridge) work correctly and receive endpoint numbers 2 and 3.
Behavior by Version
Matterbridge 3.3.8
registerDevice()completes without errornumber: undefinedMatterbridge 3.4.5
registerDevice()attempts to add devices to the Matter treeConformance "M": Matter requires you to set this attribute (135)fordescriptor.state.0.revisionMinimal Reproduction
1. Create plugin directory structure
2. package.json
{ "name": "matterbridge-test-plugin", "version": "1.0.0", "description": "Minimal reproduction of device registration issue", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { "build": "tsc" }, "engines": { "node": ">=18.0.0" }, "devDependencies": { "@types/node": "^20.10.0", "typescript": "^5.3.0" } }3. tsconfig.json
{ "compilerOptions": { "target": "ES2022", "module": "NodeNext", "moduleResolution": "NodeNext", "lib": ["ES2022"], "outDir": "./dist", "rootDir": "./src", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "declaration": true }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"] }4. src/index.ts
5. src/platform.ts
6. Plugin config file (
~/.matterbridge/matterbridge-test-plugin.config.json){ "name": "matterbridge-test-plugin", "type": "DynamicPlatform" }7. Build and install
Expected Behavior
After
registerDevice()is called, the devices should:Actual Behavior
Matterbridge 3.3.8 Log Output
Key observations:
number: undefinedand never transition to "ready"registerDevice()registerDevice()is processing the deviceMatterbridge 3.4.5 Log Output
In 3.4.5, the actual root cause is visible: the
revisionattribute in the descriptor cluster'sdeviceTypeListis not being set, causing a Matter conformance validation failure.Investigation Notes
onStart(): Same result - devices remain inactiveonConfigure(): Same result[bridgedNode, onOffLight]array: Same conformance error in 3.4.5onOffOutlet,dimmableOutlet): Same erroraddVirtualDevice()helper, not through the pluginregisterDevice()pathHypothesis
The issue appears to be in how
registerDevice()(or the underlying#addBridgedEndpoint) constructs the endpoint's descriptor cluster. ThedeviceTypeListentries are missing the requiredrevisionfield:The virtual devices created by
addVirtualDevice()must be setting this correctly, while the path throughregisterDevice()is not.Workaround Attempts
Additional Context
This is blocking the development of a Matterbridge plugin for the Litetouch 2000 lighting control system. The plugin successfully:
But the devices never appear in Matter controllers because they're never added to the endpoint tree.
Related
The error pattern (
AggregateError: Behaviors have errors) has been seen in related projects:Request: Could you please investigate why plugin-created devices via
registerDevice()don't receive endpoint numbers and remain inactive? The 3.4.5 error message about missingrevisionindescriptor.state.0seems to point to the root cause.Beta Was this translation helpful? Give feedback.
All reactions