matterbridge
Version:
Matterbridge plugin manager for Matter
177 lines (176 loc) • 8.04 kB
TypeScript
/**
* This file contains the class MatterbridgeDevice.
*
* @file matterbridgeDeviceTypes.ts
* @author Luca Liguori
* @date 2024-11-08
* @version 1.0.0
*
* Copyright 2024, 2025, 2026 Luca Liguori.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. *
*/
import { ClusterId, DeviceTypeId, EndpointNumber } from '@matter/main';
import { Semtag } from '@matter/main/types';
export declare enum DeviceClasses {
/** Node device type. */
Node = "Node",
/**
* Utility device type.
* A Utility device type supports configuration and settings.
*/
Utility = "Utility",
/**
* Application device type.
* Application devices types are typically the most datatype endpoints on a node and in the network.
*/
App = "App",
/**
* Simple device type.
* A Simple device type supports local control that is persistent, independent, and unsupervised.
*/
Simple = "Simple",
/**
* Dynamic device type.
* A Dynamic device type supports intelligent and supervisory services, such as commissioning,
* monitoring, trend analysis, scheduling and central management. A dynamic device type is an
* application device type.
*/
Dynamic = "Dynamic",
/** There exists a client application cluster on the endpoint. */
Client = "Client",
/** There exists a server application cluster on the endpoint. */
Server = "Server",
/** The device type is composed of 2 or more device types. */
Composed = "Composed",
/** Composed device type that is composed of 2 or more endpoints with the same device type. */
Multiple = "Multiple",
/** The endpoint is an Initiator for Zigbee EZ-Mode Finding & Binding. */
'EZInitiator' = "EZ-Initiator",
/** The endpoint is a Target for Zigbee EZ-Mode Finding & Binding. */
'EZTarget' = "EZ-Target",
/**
* The endpoint represents a Bridged Device, for which information about the state of
* its power source is available to the Bridge
*/
BridgedPowerSourceInfo = "BridgedPowerSourceInfo"
}
export interface DeviceTypeDefinition {
name: string;
code: DeviceTypeId;
deviceClass: DeviceClasses;
superSet?: string;
revision: number;
requiredServerClusters: ClusterId[];
optionalServerClusters: ClusterId[];
requiredClientClusters: ClusterId[];
optionalClientClusters: ClusterId[];
unknown: boolean;
}
export declare const DeviceTypeDefinition: ({ name, code, deviceClass, superSet, revision, requiredServerClusters, optionalServerClusters, requiredClientClusters, optionalClientClusters, unknown, }: {
name: string;
code: number;
deviceClass: DeviceClasses;
superSet?: string;
revision: number;
requiredServerClusters?: ClusterId[];
optionalServerClusters?: ClusterId[];
requiredClientClusters?: ClusterId[];
optionalClientClusters?: ClusterId[];
unknown?: boolean;
}) => DeviceTypeDefinition;
export interface MatterbridgeEndpointOptions extends EndpointOptions {
tagList?: Semtag[];
}
export interface EndpointOptions {
endpointId?: EndpointNumber;
uniqueStorageKey?: string;
}
export declare const bridge: DeviceTypeDefinition;
export declare const aggregator: DeviceTypeDefinition;
export declare const powerSource: DeviceTypeDefinition;
/**
2.5.3. Conditions
Please see the Base Device Type definition for conformance tags.
This device type SHALL only be used for Nodes which have a device type of Bridge.
2.5.6. Endpoint Composition
• A Bridged Node endpoint SHALL support one of the following composition patterns:
◦ Separate Endpoints: All application device types are supported on separate endpoints, and
not on the Bridged Node endpoint. The Bridged Node endpoint’s Descriptor cluster PartsList
attribute SHALL indicate a list of all endpoints representing the functionality of the bridged
device, including the endpoints supporting the application device types, i.e. the full-family
pattern defined in the System Model specification.
◦ One Endpoint: Both the Bridged Node and one or more application device types are sup
ported on the same endpoint (following application device type rules). Endpoint composi
tion SHALL conform to the application device type(s) definition
*/
export declare const bridgedNode: DeviceTypeDefinition;
export declare const genericSwitch: DeviceTypeDefinition;
export declare const onOffLight: DeviceTypeDefinition;
export declare const dimmableLight: DeviceTypeDefinition;
export declare const colorTemperatureLight: DeviceTypeDefinition;
export declare const onOffOutlet: DeviceTypeDefinition;
export declare const dimmableOutlet: DeviceTypeDefinition;
export declare const doorLockDevice: DeviceTypeDefinition;
export declare const coverDevice: DeviceTypeDefinition;
/**
* Remark: it may have a thermostat device type.
* Additional device types MAY also be included in device compositions.
* The FanControl cluster must have the FanModeSequence attribute.
*/
export declare const fanDevice: DeviceTypeDefinition;
export declare const thermostatDevice: DeviceTypeDefinition;
export declare const contactSensor: DeviceTypeDefinition;
export declare const lightSensor: DeviceTypeDefinition;
export declare const occupancySensor: DeviceTypeDefinition;
export declare const temperatureSensor: DeviceTypeDefinition;
export declare const pressureSensor: DeviceTypeDefinition;
export declare const flowSensor: DeviceTypeDefinition;
export declare const humiditySensor: DeviceTypeDefinition;
export declare const modeSelect: DeviceTypeDefinition;
export declare const roboticVacuumCleaner: DeviceTypeDefinition;
export declare const onOffSwitch: DeviceTypeDefinition;
export declare const dimmableSwitch: DeviceTypeDefinition;
export declare const colorTemperatureSwitch: DeviceTypeDefinition;
export declare const airQualitySensor: DeviceTypeDefinition;
export declare const waterFreezeDetector: DeviceTypeDefinition;
export declare const waterLeakDetector: DeviceTypeDefinition;
export declare const rainSensor: DeviceTypeDefinition;
export declare const smokeCoAlarm: DeviceTypeDefinition;
/**
* Remark: LevelControl cluster:
* 0 N/A Pump is stopped,
* 1–200 Level / 2 (0.5–100.0%) Pump setpoint in percent
* 201–255 100.0% Pump setpoint is 100.0%
*/
export declare const pumpDevice: DeviceTypeDefinition;
export declare const waterValve: DeviceTypeDefinition;
/**
* Remark: it may have a Thermostat, Temperature Sensor, Humidity Sensor and an Air Quality Sensor device type.
* Additional device types MAY also be included in device compositions.
*/
export declare const airPurifier: DeviceTypeDefinition;
/**
* Remark: it may have a temperature sensor and a humidity sensor device.
* Additional device types MAY also be included in device compositions.
* The DF (Dead Front) feature is required for the On/Off cluster in this device type:
* - Thermostat LocalTemperature null
* - Temperature Measurement MeasuredValue null
* - Relative Humidity Measurement MeasuredValue null
* - Fan Control SpeedSetting null
* - Fan Control PercentSetting null
*/
export declare const airConditioner: DeviceTypeDefinition;
export declare const electricalSensor: DeviceTypeDefinition;
export declare const deviceEnergyManagement: DeviceTypeDefinition;
//# sourceMappingURL=matterbridgeDeviceTypes.d.ts.map