homebridge/homebridge · error
${pluginIdentifier}: All ${accessories.length} Matter access
Error message
${pluginIdentifier}: All ${accessories.length} Matter accessories failed validation What it means
registerPlatformAccessories in MatterAPIImpl logs an error and returns when every accessory in the call failed validateMatterAccessory (validAccessories.length === 0). Nothing is registered. All passed objects were structurally invalid, not just one — typically missing UUID, displayName, or a valid Matter device type.
Source
Thrown at src/matter/MatterAPIImpl.ts:297
platformName: PlatformName,
accessories: MatterAccessory[],
): Promise<void> {
if (accessories.length === 0) {
log.warn(`${pluginIdentifier}: Attempted to register 0 Matter accessories`)
return
}
this.assertMatterReady(`${pluginIdentifier}: Cannot register Matter accessories`)
// Validate all accessories before registration
const validAccessories = this.validateAccessories(
accessories,
`registerPlatformAccessories (${pluginIdentifier}/${platformName})`,
)
if (validAccessories.length === 0) {
log.error(`${pluginIdentifier}: All ${accessories.length} Matter accessories failed validation`)
return
}
if (validAccessories.length < accessories.length) {
log.warn(
`${pluginIdentifier}: ${accessories.length - validAccessories.length} of ${accessories.length} Matter accessories failed validation`,
)
}
// Split accessories into normal (bridge) and external (standalone) based on device type
const normalAccessories: MatterAccessory[] = []
const externalAccessories: MatterAccessory[] = []
for (const accessory of validAccessories) {
if (requiresExternalBridge(accessory.deviceType)) {
externalAccessories.push(accessory)
} else {
normalAccessories.push(accessory)
}View on GitHub (pinned to edf5493034)
Solutions
- Read the validator's per-accessory logs to see which required fields are missing.
- Construct accessories with the documented MatterAccessory shape and a device type helper (e.g. api.matter.switch.*).
- Pass MatterAccessory objects, not HAP PlatformAccessory objects.
- Align plugin and Homebridge versions so device-type helpers exist.
Example fix
// before
const accs = devices.map(d => ({ name: d.name }))
api.matter.registerPlatformAccessories(plugin, platform, accs)
// after
const accs = devices.map(d => ({
UUID: hap.uuid.generate(d.id),
displayName: d.name,
...api.matter.switch.createSwitchDevice(),
}))
api.matter.registerPlatformAccessories(plugin, platform, accs) Defensive patterns
Strategy: type-guard
Validate before calling
function isWellFormedAccessory(a: unknown): boolean {
const x = a as Partial<MatterAccessory>
return typeof x.UUID === 'string' && typeof x.displayName === 'string' && x.device !== undefined
}
const accs = devices.map(toMatterAccessory).filter(isWellFormedAccessory) Type guard
function isMatterAccessory(a: unknown): a is MatterAccessory {
return (
typeof a === 'object' && a !== null &&
typeof (a as any).UUID === 'string' &&
typeof (a as any).displayName === 'string' &&
(a as any).device !== undefined
)
} Try / catch
try {
await api.matter.registerPlatformAccessories(plugin, platform, accs)
} catch (err) {
log.error('Matter registration failed', err)
} Prevention
- Build accessories through the official api.matter device-type helpers.
- Never pass HAP PlatformAccessory objects to the Matter API.
- Validate accessory shape in plugin unit tests.
- Read per-accessory validation logs to fix the failing fields.
When it happens
Trigger: 1) Plugin passes plain objects missing required MatterAccessory fields. 2) HAP-style PlatformAccessory objects passed to the Matter API. 3) Device-type helpers misused so deviceType is undefined for all accessories.
Common situations: Plugins ported from HAP code paths; custom device objects missing required metadata; api.matter.switch.* helpers used incorrectly.
Related errors
- Matter accessory "${accessory.displayName || 'unknown'}" is
- Matter accessory (${accessory.UUID}) is missing required fie
- Matter accessory "${accessory.displayName}" is missing requi
- Matter accessory "${accessory.displayName}" is missing requi
- Matter accessory "${accessory.displayName}" is missing requi
AI-assisted analysis of homebridge/homebridge@edf5493034 (2026-08-30).
Data as JSON: /api/errors/20b4190d812766f0.
Report an issue: GitHub.