homebridge/homebridge · warning
Your config.json contains an illegal accessory configuration
Error message
Your config.json contains an illegal accessory configuration object at position %d. Missing property 'accessory'. Skipping entry...
What it means
Homebridge validates every entry in config.json's accessories[] array at startup. Each entry must have an 'accessory' property naming which registered accessory plugin to instantiate. When the property is missing, loadAccessories logs this warning and skips the entry instead of crashing the bridge.
Source
Thrown at src/server.ts:458
MDNSAdvertiser.AVAHI,
MDNSAdvertiser.RESOLVED,
].includes(config.bridge.advertiser)) {
config.bridge.advertiser = undefined
log.error('Value provided in bridge.advertiser is not valid, reverting to platform default.')
}
} else {
config.bridge.advertiser = undefined
}
return config as HomebridgeConfig
}
private loadAccessories(): void {
log.info(`Loading ${this.config.accessories.length} accessories...`)
this.config.accessories.forEach((accessoryConfig, index) => {
if (!accessoryConfig.accessory) {
log.warn('Your config.json contains an illegal accessory configuration object at position %d. '
+ 'Missing property \'accessory\'. Skipping entry...', index + 1) // we rather count from 1 for the normal people?
return
}
const accessoryIdentifier: AccessoryName | AccessoryIdentifier = accessoryConfig.accessory
const displayName = accessoryConfig.name
if (!displayName) {
log.warn('Could not load accessory %s at position %d as it is missing the required \'name\' property!', accessoryIdentifier, index + 1)
return
}
let plugin: Plugin
let constructor: AccessoryPluginConstructor
try {
plugin = this.pluginManager.getPluginForAccessory(accessoryIdentifier)
} catch (error: any) {
log.error(error.message)View on GitHub (pinned to edf5493034)
Solutions
- Open config.json and add the 'accessory' property with the exact accessory identifier the plugin registered
- Remove the empty/invalid object from the accessories array if it is a leftover placeholder
- Validate config.json with a JSON linter and compare against the plugin's documented config schema.example
Example fix
// before
"accessories": [
{ "name": "Lamp" }
]
// after
"accessories": [
{ "accessory": "DomoticaLamp", "name": "Lamp" }
] Defensive patterns
Strategy: validation
Validate before calling
const missing = config.accessories?.filter(a => !a || typeof a !== 'object' || !a.accessory) ?? []
if (missing.length) throw new Error(`Accessory entries missing 'accessory' property: ${missing.length}`) Type guard
function isValidAccessoryConfig(c: unknown): c is { accessory: string; name: string; [k: string]: unknown } {
return typeof c === 'object' && c !== null && typeof (c as any).accessory === 'string' && (c as any).accessory.length > 0
} Prevention
- Use Homebridge config.schema.json validation (config-ui-x does this automatically)
- Never hand-edit config.json without running it through a JSON validator
- Keep the 'accessory' key copied verbatim from plugin documentation
When it happens
Trigger: An object in config.json under 'accessories' has no 'accessory' key (e.g. only 'name', or a malformed/renamed key like 'accessoryName').
Common situations: Hand-edited config with a typo, a config editor writing an empty placeholder object, copy-pasting a platform block into accessories, or trailing incomplete entry after a truncated edit.
Related errors
- Could not load accessory %s at position %d as it is missing
- Your config.json contains an illegal platform configuration
- Ignoring config for the accessory "${accessoryIdentifier}" i
- Ignoring config for the platform "${platformIdentifier}" in
- Matter configuration validation failed: ${errors.map(e => `
AI-assisted analysis of homebridge/homebridge@edf5493034 (2026-08-30).
Data as JSON: /api/errors/e7e3f8b73e707130.
Report an issue: GitHub.