ReadonlyclusterMatter cluster names for type safety and autocomplete Use these constants with updateAccessoryState() and getAccessoryState()
ReadonlyclustersMatter clusters - Direct access to Matter.js cluster definitions For advanced use cases requiring low-level cluster access
Definitions for the AirQuality cluster.
This cluster provides an interface to air quality classification using distinct levels with human-readable labels.
Definitions for the BooleanState cluster.
This cluster provides an interface to a boolean state.
Definitions for the CarbonMonoxideConcentrationMeasurement cluster.
Definitions for the ColorControl cluster.
This cluster provides an interface for changing the color of a light. Color is specified according to the CIE 1931 Color space. Color control is carried out in terms of x,y values, as defined by this specification.
Additionally, color may optionally be controlled in terms of color temperature, or as hue and saturation values based on optionally variable RGB and W color points. It is recommended that the hue and saturation are interpreted according to the HSV (a.k.a. HSB) color model.
Control over luminance is not included, as this is provided by means of the Level Control for Lighting cluster. It is recommended that the level provided by this cluster be interpreted as representing a proportion of the maximum intensity achievable at the current color.
Definitions for the DoorLock cluster.
The door lock cluster provides an interface to a generic way to secure a door. The physical object that provides the locking functionality is abstracted from the cluster. The cluster has a small list of mandatory attributes and functions and a list of optional features.
Definitions for the FanControl cluster.
This cluster specifies an interface to control the speed of a fan.
Definitions for the LevelControl cluster.
This cluster provides an interface for controlling a characteristic of a device that can be set to a level, for example the brightness of a light, the degree of closure of a door, or the power output of a heater.
Definitions for the NitrogenDioxideConcentrationMeasurement cluster.
Definitions for the OnOff cluster.
Attributes and commands for turning devices on and off.
Definitions for the OzoneConcentrationMeasurement cluster.
Definitions for the Pm10ConcentrationMeasurement cluster.
Definitions for the Pm25ConcentrationMeasurement cluster.
Definitions for the RvcOperationalState cluster.
This cluster is derived from the Operational State cluster and provides an interface for monitoring the operational state of a robotic vacuum cleaner.
Definitions for the Thermostat cluster.
This cluster provides an interface to the functionality of a thermostat.
Definitions for the ValveConfigurationAndControl cluster.
This cluster is used to configure a valve.
Definitions for the WindowCovering cluster.
The window covering cluster provides an interface for controlling and adjusting automatic window coverings such as drapery motors, automatic shades, curtains and blinds.
ReadonlydeviceMatter device types for creating accessories.
Maps friendly names to Matter.js device types, including stateless controller types like GenericSwitch.
Get a Matter accessory's current cluster state
Returns the current attribute values that are exposed to Matter controllers. Useful for:
Similar to HAP's characteristic.value getter.
Typed overload for known clusters - returns typed state
OptionalpartId: stringFallback for unknown/custom clusters
OptionalpartId: stringOptional: ID of the part to get state from (for composed devices with multiple endpoints)
const state = await api.matter?.getAccessoryState(uuid, api.matter?.clusterNames.OnOff)
if (state?.onOff) {
console.log('Light is currently on')
}
Get state of a specific outlet in a power strip:
const outletState = await api.matter?.getAccessoryState(
uuid,
api.matter?.clusterNames.OnOff,
'outlet-3' // Part ID
)
Register Matter platform accessories (works exactly like HAP's registerPlatformAccessories)
Returns a promise that resolves when all accessories are fully registered and ready for state updates. This is especially important for external accessories (like robot vacuums) which require additional setup time.
The plugin identifier (e.g., 'homebridge-example')
The platform name (e.g., 'ExamplePlatform')
Array of Matter accessories to register
ReadonlyswitchHelpers for GenericSwitch accessories (stateless remotes and buttons).
Device-type-specific helpers live under nested namespaces (e.g. api.matter?.switch)
to keep the top-level MatterAPI surface focused on the generic, UUID-addressed primitives.
ReadonlytypesMatter types - Access to Matter.js cluster type definitions and enums Use these for type-safe attribute values (modes, states, etc.)
Definitions for the AirQuality cluster.
This cluster provides an interface to air quality classification using distinct levels with human-readable labels.
Definitions for the BooleanState cluster.
This cluster provides an interface to a boolean state.
Definitions for the CarbonMonoxideConcentrationMeasurement cluster.
Definitions for the ColorControl cluster.
This cluster provides an interface for changing the color of a light. Color is specified according to the CIE 1931 Color space. Color control is carried out in terms of x,y values, as defined by this specification.
Additionally, color may optionally be controlled in terms of color temperature, or as hue and saturation values based on optionally variable RGB and W color points. It is recommended that the hue and saturation are interpreted according to the HSV (a.k.a. HSB) color model.
Control over luminance is not included, as this is provided by means of the Level Control for Lighting cluster. It is recommended that the level provided by this cluster be interpreted as representing a proportion of the maximum intensity achievable at the current color.
Definitions for the DoorLock cluster.
The door lock cluster provides an interface to a generic way to secure a door. The physical object that provides the locking functionality is abstracted from the cluster. The cluster has a small list of mandatory attributes and functions and a list of optional features.
Definitions for the FanControl cluster.
This cluster specifies an interface to control the speed of a fan.
Definitions for the LevelControl cluster.
This cluster provides an interface for controlling a characteristic of a device that can be set to a level, for example the brightness of a light, the degree of closure of a door, or the power output of a heater.
Definitions for the NitrogenDioxideConcentrationMeasurement cluster.
Definitions for the OnOff cluster.
Attributes and commands for turning devices on and off.
Definitions for the OzoneConcentrationMeasurement cluster.
Definitions for the Pm10ConcentrationMeasurement cluster.
Definitions for the Pm25ConcentrationMeasurement cluster.
Definitions for the RvcOperationalState cluster.
This cluster is derived from the Operational State cluster and provides an interface for monitoring the operational state of a robotic vacuum cleaner.
Definitions for the Thermostat cluster.
This cluster provides an interface to the functionality of a thermostat.
Definitions for the ValveConfigurationAndControl cluster.
This cluster is used to configure a valve.
Definitions for the WindowCovering cluster.
The window covering cluster provides an interface for controlling and adjusting automatic window coverings such as drapery motors, automatic shades, curtains and blinds.
Unregister Matter platform accessories by UUID
The plugin identifier
The platform name
Array of Matter accessories to unregister (only uuid is required)
Update a Matter accessory's cluster state when device changes externally
Use this for state updates from:
DO NOT use inside handlers - state auto-updates after handlers complete! Similar to HAP's characteristic.updateValue()
Typed overload for known clusters - provides autocomplete for attribute names
OptionalpartId: stringFallback for unknown/custom clusters
OptionalpartId: stringDevice turned on via native app:
await api.matter?.updateAccessoryState(
uuid,
api.matter?.clusterNames.OnOff,
{ onOff: true }
)
Device brightness changed via physical button:
await api.matter?.updateAccessoryState(
uuid,
api.matter?.clusterNames.LevelControl,
{ currentLevel: 200 }
)
Update a specific outlet in a power strip (composed device):
await api.matter?.updateAccessoryState(
uuid,
api.matter?.clusterNames.OnOff,
{ onOff: true },
'outlet-2' // Part ID
)
Update Matter platform accessories in the cache
Use this to update cached accessory information (displayName, manufacturer, model, etc.) without unregistering and re-registering. This is useful when:
Similar to api.updatePlatformAccessories() for HAP accessories.
Array of Matter accessories to update (must include uuid)
ReadonlyuuidUUID generator (alias of api.hap.uuid for convenience) Use this to generate unique identifiers for Matter accessories
Matter API Interface.
Provides access to Matter protocol functionality for creating Matter-compatible accessories. Similar to
api.hapfor HomeKit Accessory Protocol.api.matterisMatterAPI | undefined— it's defined on bridges where Matter is configured (matchesapi.isMatterEnabled()), undefined otherwise. Plugins must use optional chaining or guard withisMatterEnabled().Example
Example