matterbridge 1.2.17 → 1.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -1
- package/dist/AirQualityCluster.js +1 -1
- package/dist/AirQualityCluster.js.map +1 -1
- package/dist/matterbridge.d.ts +0 -7
- package/dist/matterbridge.d.ts.map +1 -1
- package/dist/matterbridge.js +237 -201
- package/dist/matterbridge.js.map +1 -1
- package/dist/matterbridgeAccessoryPlatform.d.ts +0 -36
- package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -1
- package/dist/matterbridgeAccessoryPlatform.js +0 -48
- package/dist/matterbridgeAccessoryPlatform.js.map +1 -1
- package/dist/matterbridgeDevice.d.ts +174 -2
- package/dist/matterbridgeDevice.d.ts.map +1 -1
- package/dist/matterbridgeDevice.js +68 -22
- package/dist/matterbridgeDevice.js.map +1 -1
- package/dist/matterbridgeDynamicPlatform.d.ts +0 -36
- package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -1
- package/dist/matterbridgeDynamicPlatform.js +0 -48
- package/dist/matterbridgeDynamicPlatform.js.map +1 -1
- package/dist/matterbridgePlatform.d.ts +36 -0
- package/dist/matterbridgePlatform.d.ts.map +1 -1
- package/dist/matterbridgePlatform.js +48 -0
- package/dist/matterbridgePlatform.js.map +1 -1
- package/dist/utils.d.ts +2 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +29 -1
- package/dist/utils.js.map +1 -1
- package/frontend/build/asset-manifest.json +3 -3
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/js/{main.eab44937.js → main.23829a0f.js} +3 -3
- package/frontend/build/static/js/main.23829a0f.js.map +1 -0
- package/package.json +4 -4
- package/frontend/build/static/js/main.eab44937.js.map +0 -1
- /package/frontend/build/static/js/{main.eab44937.js.LICENSE.txt → main.23829a0f.js.LICENSE.txt} +0 -0
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { Matterbridge, PlatformConfig } from './matterbridge.js';
|
|
24
24
|
import { MatterbridgePlatform } from './matterbridgePlatform.js';
|
|
25
|
-
import { MatterbridgeDevice } from './matterbridgeDevice.js';
|
|
26
25
|
import { AnsiLogger } from 'node-ansi-logger';
|
|
27
26
|
/**
|
|
28
27
|
* Represents a Matterbridge accessory platform.
|
|
@@ -36,40 +35,5 @@ export declare class MatterbridgeAccessoryPlatform extends MatterbridgePlatform
|
|
|
36
35
|
* @param {PlatformConfig} config - The platform configuration.
|
|
37
36
|
*/
|
|
38
37
|
constructor(matterbridge: Matterbridge, log: AnsiLogger, config: PlatformConfig);
|
|
39
|
-
/**
|
|
40
|
-
* This method must be overridden in the extended class.
|
|
41
|
-
* It is called when the platform is started.
|
|
42
|
-
* Use this method to create the MatterbridgeDevice and call this.registerDevice().
|
|
43
|
-
* @param {string} [reason] - The reason for starting.
|
|
44
|
-
* @throws {Error} - Throws an error if the method is not overridden.
|
|
45
|
-
*/
|
|
46
|
-
onStart(reason?: string): Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
* This method can be overridden in the extended class.
|
|
49
|
-
* It is called after the platform has been commissioned.
|
|
50
|
-
* Use this method to perform any configuration of your devices.
|
|
51
|
-
*/
|
|
52
|
-
onConfigure(): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* This method can be overridden in the extended class.
|
|
55
|
-
* It is called when the platform is shutting down.
|
|
56
|
-
* Use this method to clean up any resources.
|
|
57
|
-
* @param {string} [reason] - The reason for shutting down.
|
|
58
|
-
*/
|
|
59
|
-
onShutdown(reason?: string): Promise<void>;
|
|
60
|
-
/**
|
|
61
|
-
* Registers a device with the Matterbridge platform.
|
|
62
|
-
* @param {MatterbridgeDevice} device - The device to register.
|
|
63
|
-
*/
|
|
64
|
-
registerDevice(device: MatterbridgeDevice): Promise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* Unegisters a device registered with the Matterbridge platform.
|
|
67
|
-
* @param {MatterbridgeDevice} device - The device to unregister.
|
|
68
|
-
*/
|
|
69
|
-
unregisterDevice(device: MatterbridgeDevice): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Unegisters all devices registered with the Matterbridge platform.
|
|
72
|
-
*/
|
|
73
|
-
unregisterAllDevices(): Promise<void>;
|
|
74
38
|
}
|
|
75
39
|
//# sourceMappingURL=matterbridgeAccessoryPlatform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matterbridgeAccessoryPlatform.d.ts","sourceRoot":"","sources":["../src/matterbridgeAccessoryPlatform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"matterbridgeAccessoryPlatform.d.ts","sourceRoot":"","sources":["../src/matterbridgeAccessoryPlatform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;GAGG;AACH,qBAAa,6BAA8B,SAAQ,oBAAoB;IACrE;;;;;OAKG;gBACS,YAAY,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc;CAOhF"}
|
|
@@ -37,53 +37,5 @@ export class MatterbridgeAccessoryPlatform extends MatterbridgePlatform {
|
|
|
37
37
|
this.type = 'AccessoryPlatform';
|
|
38
38
|
this.log.debug(`Matterbridge${this.type} loaded`);
|
|
39
39
|
}
|
|
40
|
-
/**
|
|
41
|
-
* This method must be overridden in the extended class.
|
|
42
|
-
* It is called when the platform is started.
|
|
43
|
-
* Use this method to create the MatterbridgeDevice and call this.registerDevice().
|
|
44
|
-
* @param {string} [reason] - The reason for starting.
|
|
45
|
-
* @throws {Error} - Throws an error if the method is not overridden.
|
|
46
|
-
*/
|
|
47
|
-
async onStart(reason) {
|
|
48
|
-
this.log.error('Plugins must override onStart.', reason);
|
|
49
|
-
throw new Error('Plugins must override onStart.');
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* This method can be overridden in the extended class.
|
|
53
|
-
* It is called after the platform has been commissioned.
|
|
54
|
-
* Use this method to perform any configuration of your devices.
|
|
55
|
-
*/
|
|
56
|
-
async onConfigure() {
|
|
57
|
-
this.log.debug("**The plugin doesn't override onConfigure.");
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* This method can be overridden in the extended class.
|
|
61
|
-
* It is called when the platform is shutting down.
|
|
62
|
-
* Use this method to clean up any resources.
|
|
63
|
-
* @param {string} [reason] - The reason for shutting down.
|
|
64
|
-
*/
|
|
65
|
-
async onShutdown(reason) {
|
|
66
|
-
this.log.debug("The plugin doesn't override onShutdown.", reason);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Registers a device with the Matterbridge platform.
|
|
70
|
-
* @param {MatterbridgeDevice} device - The device to register.
|
|
71
|
-
*/
|
|
72
|
-
async registerDevice(device) {
|
|
73
|
-
await this.matterbridge.addDevice(this.name, device);
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Unegisters a device registered with the Matterbridge platform.
|
|
77
|
-
* @param {MatterbridgeDevice} device - The device to unregister.
|
|
78
|
-
*/
|
|
79
|
-
async unregisterDevice(device) {
|
|
80
|
-
await this.matterbridge.removeBridgedDevice(this.name, device);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Unegisters all devices registered with the Matterbridge platform.
|
|
84
|
-
*/
|
|
85
|
-
async unregisterAllDevices() {
|
|
86
|
-
await this.matterbridge.removeAllBridgedDevices(this.name);
|
|
87
|
-
}
|
|
88
40
|
}
|
|
89
41
|
//# sourceMappingURL=matterbridgeAccessoryPlatform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matterbridgeAccessoryPlatform.js","sourceRoot":"","sources":["../src/matterbridgeAccessoryPlatform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"matterbridgeAccessoryPlatform.js","sourceRoot":"","sources":["../src/matterbridgeAccessoryPlatform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE;;;GAGG;AACH,MAAM,OAAO,6BAA8B,SAAQ,oBAAoB;IACrE;;;;;OAKG;IACH,YAAY,YAA0B,EAAE,GAAe,EAAE,MAAsB;QAC7E,KAAK,CAAC,YAAY,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAEjC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAEhC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,IAAI,SAAS,CAAC,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -28,6 +28,7 @@ import { MatterHistory } from 'matter-history';
|
|
|
28
28
|
import { AirQuality } from './AirQualityCluster.js';
|
|
29
29
|
import { AnsiLogger } from 'node-ansi-logger';
|
|
30
30
|
import { TvocMeasurement } from './TvocCluster.js';
|
|
31
|
+
import { BridgedDeviceBasicInformation } from './BridgedDeviceBasicInformationCluster.js';
|
|
31
32
|
type MakeMandatory<T> = Exclude<T, undefined>;
|
|
32
33
|
interface MatterbridgeDeviceCommands {
|
|
33
34
|
identify: MakeMandatory<ClusterServerHandlers<typeof Identify.Complete>['identify']>;
|
|
@@ -53,6 +54,8 @@ interface MatterbridgeDeviceCommands {
|
|
|
53
54
|
unlockDoor: MakeMandatory<ClusterServerHandlers<typeof DoorLock.Complete>['unlockDoor']>;
|
|
54
55
|
setpointRaiseLower: MakeMandatory<ClusterServerHandlers<typeof Thermostat.Complete>['setpointRaiseLower']>;
|
|
55
56
|
}
|
|
57
|
+
export declare const powerSource: DeviceTypeDefinition;
|
|
58
|
+
export declare const bridgedNode: DeviceTypeDefinition;
|
|
56
59
|
export declare const onOffSwitch: DeviceTypeDefinition;
|
|
57
60
|
export declare const dimmableSwitch: DeviceTypeDefinition;
|
|
58
61
|
export declare const colorTemperatureSwitch: DeviceTypeDefinition;
|
|
@@ -440,8 +443,8 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
440
443
|
readonly reachable: import("@project-chip/matter-node.js/cluster").Attribute<boolean, any>;
|
|
441
444
|
readonly uniqueId: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<string, any>;
|
|
442
445
|
readonly productAppearance: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<import("@project-chip/matter.js/tlv").TypeFromFields<{
|
|
443
|
-
finish: import("@project-chip/matter.js/tlv").FieldType<
|
|
444
|
-
primaryColor: import("@project-chip/matter.js/tlv").FieldType<
|
|
446
|
+
finish: import("@project-chip/matter.js/tlv").FieldType<BridgedDeviceBasicInformation.ProductFinish>;
|
|
447
|
+
primaryColor: import("@project-chip/matter.js/tlv").FieldType<BridgedDeviceBasicInformation.Color | null>;
|
|
445
448
|
}>, any>;
|
|
446
449
|
}, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{}>>, {
|
|
447
450
|
readonly startUp: import("@project-chip/matter-node.js/cluster").OptionalEvent<import("@project-chip/matter.js/tlv").TypeFromFields<{
|
|
@@ -1313,6 +1316,66 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
1313
1316
|
* @param contact - Optional boolean value indicating the contact state. Defaults to `true` if not provided.
|
|
1314
1317
|
*/
|
|
1315
1318
|
createDefaultBooleanStateClusterServer(contact?: boolean): void;
|
|
1319
|
+
/**
|
|
1320
|
+
* Get a default power source replaceable battery cluster server.
|
|
1321
|
+
*
|
|
1322
|
+
* @param batPercentRemaining - The remaining battery percentage (default: 100).
|
|
1323
|
+
* @param batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
|
|
1324
|
+
* @param batVoltage - The battery voltage (default: 1500).
|
|
1325
|
+
* @param batReplacementDescription - The battery replacement description (default: 'Battery type').
|
|
1326
|
+
* @param batQuantity - The battery quantity (default: 1).
|
|
1327
|
+
*/
|
|
1328
|
+
getDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number, batReplacementDescription?: string, batQuantity?: number): import("@project-chip/matter-node.js/cluster").ClusterServerObj<Pick<import("@project-chip/matter-node.js/util").Merge<{
|
|
1329
|
+
readonly status: import("@project-chip/matter-node.js/cluster").Attribute<PowerSource.PowerSourceStatus, any>;
|
|
1330
|
+
readonly order: import("@project-chip/matter-node.js/cluster").Attribute<number, any>;
|
|
1331
|
+
readonly description: import("@project-chip/matter-node.js/cluster").FixedAttribute<string, any>;
|
|
1332
|
+
}, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1333
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1334
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1335
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1336
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1337
|
+
}>>, "clusterRevision" | "featureMap" | "attributeList" | "eventList" | "acceptedCommandList" | "generatedCommandList" | "status" | "description" | "order"> & Omit<{
|
|
1338
|
+
readonly batVoltage: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1339
|
+
readonly batPercentRemaining: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1340
|
+
readonly batTimeRemaining: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1341
|
+
readonly batChargeLevel: import("@project-chip/matter-node.js/cluster").Attribute<PowerSource.BatChargeLevel, any>;
|
|
1342
|
+
readonly batReplacementNeeded: import("@project-chip/matter-node.js/cluster").Attribute<boolean, any>;
|
|
1343
|
+
readonly batReplaceability: import("@project-chip/matter-node.js/cluster").FixedAttribute<PowerSource.BatReplaceability, any>;
|
|
1344
|
+
readonly batPresent: import("@project-chip/matter-node.js/cluster").OptionalAttribute<boolean, any>;
|
|
1345
|
+
readonly activeBatFaults: import("@project-chip/matter-node.js/cluster").OptionalAttribute<PowerSource.BatFault[], any>;
|
|
1346
|
+
} & {
|
|
1347
|
+
readonly batReplacementDescription: import("@project-chip/matter-node.js/cluster").FixedAttribute<string, any>;
|
|
1348
|
+
readonly batCommonDesignation: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<PowerSource.BatCommonDesignation, any>;
|
|
1349
|
+
readonly batAnsiDesignation: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<string, any>;
|
|
1350
|
+
readonly batIecDesignation: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<string, any>;
|
|
1351
|
+
readonly batApprovedChemistry: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<PowerSource.BatApprovedChemistry, any>;
|
|
1352
|
+
readonly batCapacity: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<number, any>;
|
|
1353
|
+
readonly batQuantity: import("@project-chip/matter-node.js/cluster").FixedAttribute<number, any>;
|
|
1354
|
+
}, "status" | "description" | "order" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1355
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1356
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1357
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1358
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1359
|
+
}>> & Omit<import("@project-chip/matter-node.js/util").Merge<{
|
|
1360
|
+
readonly status: import("@project-chip/matter-node.js/cluster").Attribute<PowerSource.PowerSourceStatus, any>;
|
|
1361
|
+
readonly order: import("@project-chip/matter-node.js/cluster").Attribute<number, any>;
|
|
1362
|
+
readonly description: import("@project-chip/matter-node.js/cluster").FixedAttribute<string, any>;
|
|
1363
|
+
}, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1364
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1365
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1366
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1367
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1368
|
+
}>>, "status" | "description" | "batVoltage" | "batPercentRemaining" | "batTimeRemaining" | "batChargeLevel" | "batReplacementNeeded" | "batReplaceability" | "batPresent" | "activeBatFaults" | "batReplacementDescription" | "batCommonDesignation" | "batAnsiDesignation" | "batIecDesignation" | "batApprovedChemistry" | "batCapacity" | "batQuantity" | "order" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1369
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1370
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1371
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1372
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1373
|
+
}>>, Pick<{}, never> & Omit<{
|
|
1374
|
+
readonly batFaultChange: import("@project-chip/matter-node.js/cluster").OptionalEvent<import("@project-chip/matter.js/tlv").TypeFromFields<{
|
|
1375
|
+
current: import("@project-chip/matter.js/tlv").FieldType<PowerSource.BatFault[]>;
|
|
1376
|
+
previous: import("@project-chip/matter.js/tlv").FieldType<PowerSource.BatFault[]>;
|
|
1377
|
+
}>, any>;
|
|
1378
|
+
}, never> & Omit<{}, "batFaultChange">>;
|
|
1316
1379
|
/**
|
|
1317
1380
|
* Creates a default power source replaceable battery cluster server.
|
|
1318
1381
|
*
|
|
@@ -1323,6 +1386,67 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
1323
1386
|
* @param batQuantity - The battery quantity (default: 1).
|
|
1324
1387
|
*/
|
|
1325
1388
|
createDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number, batReplacementDescription?: string, batQuantity?: number): void;
|
|
1389
|
+
/**
|
|
1390
|
+
* Get a default power source rechargeable battery cluster server.
|
|
1391
|
+
*
|
|
1392
|
+
* @param batPercentRemaining - The remaining battery percentage (default: 100).
|
|
1393
|
+
* @param batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
|
|
1394
|
+
* @param batVoltage - The battery voltage (default: 1500).
|
|
1395
|
+
*/
|
|
1396
|
+
getDefaultPowerSourceRechargeableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number): import("@project-chip/matter-node.js/cluster").ClusterServerObj<Pick<import("@project-chip/matter-node.js/util").Merge<{
|
|
1397
|
+
readonly status: import("@project-chip/matter-node.js/cluster").Attribute<PowerSource.PowerSourceStatus, any>;
|
|
1398
|
+
readonly order: import("@project-chip/matter-node.js/cluster").Attribute<number, any>;
|
|
1399
|
+
readonly description: import("@project-chip/matter-node.js/cluster").FixedAttribute<string, any>;
|
|
1400
|
+
}, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1401
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1402
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1403
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1404
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1405
|
+
}>>, "clusterRevision" | "featureMap" | "attributeList" | "eventList" | "acceptedCommandList" | "generatedCommandList" | "status" | "description" | "order"> & Omit<{
|
|
1406
|
+
readonly batVoltage: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1407
|
+
readonly batPercentRemaining: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1408
|
+
readonly batTimeRemaining: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1409
|
+
readonly batChargeLevel: import("@project-chip/matter-node.js/cluster").Attribute<PowerSource.BatChargeLevel, any>;
|
|
1410
|
+
readonly batReplacementNeeded: import("@project-chip/matter-node.js/cluster").Attribute<boolean, any>;
|
|
1411
|
+
readonly batReplaceability: import("@project-chip/matter-node.js/cluster").FixedAttribute<PowerSource.BatReplaceability, any>;
|
|
1412
|
+
readonly batPresent: import("@project-chip/matter-node.js/cluster").OptionalAttribute<boolean, any>;
|
|
1413
|
+
readonly activeBatFaults: import("@project-chip/matter-node.js/cluster").OptionalAttribute<PowerSource.BatFault[], any>;
|
|
1414
|
+
} & {
|
|
1415
|
+
readonly batChargeState: import("@project-chip/matter-node.js/cluster").Attribute<PowerSource.BatChargeState, any>;
|
|
1416
|
+
readonly batTimeToFullCharge: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1417
|
+
readonly batFunctionalWhileCharging: import("@project-chip/matter-node.js/cluster").Attribute<boolean, any>;
|
|
1418
|
+
readonly batChargingCurrent: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1419
|
+
readonly activeBatChargeFaults: import("@project-chip/matter-node.js/cluster").OptionalAttribute<PowerSource.BatChargeFault[], any>;
|
|
1420
|
+
}, "status" | "description" | "order" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1421
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1422
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1423
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1424
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1425
|
+
}>> & Omit<import("@project-chip/matter-node.js/util").Merge<{
|
|
1426
|
+
readonly status: import("@project-chip/matter-node.js/cluster").Attribute<PowerSource.PowerSourceStatus, any>;
|
|
1427
|
+
readonly order: import("@project-chip/matter-node.js/cluster").Attribute<number, any>;
|
|
1428
|
+
readonly description: import("@project-chip/matter-node.js/cluster").FixedAttribute<string, any>;
|
|
1429
|
+
}, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1430
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1431
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1432
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1433
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1434
|
+
}>>, "status" | "description" | "batVoltage" | "batPercentRemaining" | "batTimeRemaining" | "batChargeLevel" | "batReplacementNeeded" | "batReplaceability" | "batPresent" | "activeBatFaults" | "batChargeState" | "batTimeToFullCharge" | "batFunctionalWhileCharging" | "batChargingCurrent" | "activeBatChargeFaults" | "order" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1435
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1436
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1437
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1438
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1439
|
+
}>>, Pick<{}, never> & Omit<{
|
|
1440
|
+
readonly batFaultChange: import("@project-chip/matter-node.js/cluster").OptionalEvent<import("@project-chip/matter.js/tlv").TypeFromFields<{
|
|
1441
|
+
current: import("@project-chip/matter.js/tlv").FieldType<PowerSource.BatFault[]>;
|
|
1442
|
+
previous: import("@project-chip/matter.js/tlv").FieldType<PowerSource.BatFault[]>;
|
|
1443
|
+
}>, any>;
|
|
1444
|
+
} & {
|
|
1445
|
+
readonly batChargeFaultChange: import("@project-chip/matter-node.js/cluster").OptionalEvent<import("@project-chip/matter.js/tlv").TypeFromFields<{
|
|
1446
|
+
current: import("@project-chip/matter.js/tlv").FieldType<PowerSource.BatChargeFault[]>;
|
|
1447
|
+
previous: import("@project-chip/matter.js/tlv").FieldType<PowerSource.BatChargeFault[]>;
|
|
1448
|
+
}>, any>;
|
|
1449
|
+
}, never> & Omit<{}, "batFaultChange" | "batChargeFaultChange">>;
|
|
1326
1450
|
/**
|
|
1327
1451
|
* Creates a default power source rechargeable battery cluster server.
|
|
1328
1452
|
*
|
|
@@ -1331,6 +1455,54 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
|
|
|
1331
1455
|
* @param batVoltage - The battery voltage (default: 1500).
|
|
1332
1456
|
*/
|
|
1333
1457
|
createDefaultPowerSourceRechargeableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number): void;
|
|
1458
|
+
/**
|
|
1459
|
+
* Get a default power source wired cluster server.
|
|
1460
|
+
*
|
|
1461
|
+
* @param wiredCurrentType - The type of wired current (default: PowerSource.WiredCurrentType.Ac)
|
|
1462
|
+
*/
|
|
1463
|
+
getDefaultPowerSourceWiredClusterServer(wiredCurrentType?: PowerSource.WiredCurrentType): import("@project-chip/matter-node.js/cluster").ClusterServerObj<Pick<import("@project-chip/matter-node.js/util").Merge<{
|
|
1464
|
+
readonly status: import("@project-chip/matter-node.js/cluster").Attribute<PowerSource.PowerSourceStatus, any>;
|
|
1465
|
+
readonly order: import("@project-chip/matter-node.js/cluster").Attribute<number, any>;
|
|
1466
|
+
readonly description: import("@project-chip/matter-node.js/cluster").FixedAttribute<string, any>;
|
|
1467
|
+
}, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1468
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1469
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1470
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1471
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1472
|
+
}>>, "clusterRevision" | "featureMap" | "attributeList" | "eventList" | "acceptedCommandList" | "generatedCommandList" | "status" | "description" | "order"> & Omit<{
|
|
1473
|
+
readonly wiredAssessedInputVoltage: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1474
|
+
readonly wiredAssessedInputFrequency: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1475
|
+
readonly wiredCurrentType: import("@project-chip/matter-node.js/cluster").FixedAttribute<PowerSource.WiredCurrentType, any>;
|
|
1476
|
+
readonly wiredAssessedCurrent: import("@project-chip/matter-node.js/cluster").OptionalAttribute<number | null, any>;
|
|
1477
|
+
readonly wiredNominalVoltage: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<number, any>;
|
|
1478
|
+
readonly wiredMaximumCurrent: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<number, any>;
|
|
1479
|
+
readonly wiredPresent: import("@project-chip/matter-node.js/cluster").OptionalAttribute<boolean, any>;
|
|
1480
|
+
readonly activeWiredFaults: import("@project-chip/matter-node.js/cluster").OptionalAttribute<PowerSource.WiredFault[], any>;
|
|
1481
|
+
}, "status" | "description" | "order" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1482
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1483
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1484
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1485
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1486
|
+
}>> & Omit<import("@project-chip/matter-node.js/util").Merge<{
|
|
1487
|
+
readonly status: import("@project-chip/matter-node.js/cluster").Attribute<PowerSource.PowerSourceStatus, any>;
|
|
1488
|
+
readonly order: import("@project-chip/matter-node.js/cluster").Attribute<number, any>;
|
|
1489
|
+
readonly description: import("@project-chip/matter-node.js/cluster").FixedAttribute<string, any>;
|
|
1490
|
+
}, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1491
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1492
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1493
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1494
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1495
|
+
}>>, "status" | "description" | "wiredAssessedInputVoltage" | "wiredAssessedInputFrequency" | "wiredCurrentType" | "wiredAssessedCurrent" | "wiredNominalVoltage" | "wiredMaximumCurrent" | "wiredPresent" | "activeWiredFaults" | "order" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
|
|
1496
|
+
readonly wired: import("@project-chip/matter.js/schema").BitFlag;
|
|
1497
|
+
readonly battery: import("@project-chip/matter.js/schema").BitFlag;
|
|
1498
|
+
readonly rechargeable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1499
|
+
readonly replaceable: import("@project-chip/matter.js/schema").BitFlag;
|
|
1500
|
+
}>>, Pick<{}, never> & Omit<{
|
|
1501
|
+
readonly wiredFaultChange: import("@project-chip/matter-node.js/cluster").OptionalEvent<import("@project-chip/matter.js/tlv").TypeFromFields<{
|
|
1502
|
+
current: import("@project-chip/matter.js/tlv").FieldType<PowerSource.WiredFault[]>;
|
|
1503
|
+
previous: import("@project-chip/matter.js/tlv").FieldType<PowerSource.WiredFault[]>;
|
|
1504
|
+
}>, any>;
|
|
1505
|
+
}, never> & Omit<{}, "wiredFaultChange">>;
|
|
1334
1506
|
/**
|
|
1335
1507
|
* Creates a default power source wired cluster server.
|
|
1336
1508
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matterbridgeDevice.d.ts","sourceRoot":"","sources":["../src/matterbridgeDevice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0B/B;;OAEG;IACH,kCAAkC;CAGnC"}
|
|
@@ -29,8 +29,24 @@ import { AirQuality, AirQualityCluster } from './AirQualityCluster.js';
|
|
|
29
29
|
import { AnsiLogger, db, hk, zb } from 'node-ansi-logger';
|
|
30
30
|
import { createHash } from 'crypto';
|
|
31
31
|
import { TvocMeasurement, TvocMeasurementCluster } from './TvocCluster.js';
|
|
32
|
-
import { BridgedDeviceBasicInformationCluster } from './BridgedDeviceBasicInformationCluster.js';
|
|
32
|
+
import { BridgedDeviceBasicInformation, BridgedDeviceBasicInformationCluster } from './BridgedDeviceBasicInformationCluster.js';
|
|
33
33
|
// Custom device types
|
|
34
|
+
export const powerSource = DeviceTypeDefinition({
|
|
35
|
+
name: 'MA-powersource',
|
|
36
|
+
code: 0x0011,
|
|
37
|
+
deviceClass: DeviceClasses.Simple,
|
|
38
|
+
revision: 1,
|
|
39
|
+
requiredServerClusters: [PowerSource.Cluster.id],
|
|
40
|
+
optionalServerClusters: [],
|
|
41
|
+
});
|
|
42
|
+
export const bridgedNode = DeviceTypeDefinition({
|
|
43
|
+
name: 'MA-bridgedNode',
|
|
44
|
+
code: 0x0013,
|
|
45
|
+
deviceClass: DeviceClasses.Simple,
|
|
46
|
+
revision: 2,
|
|
47
|
+
requiredServerClusters: [BridgedDeviceBasicInformation.Cluster.id],
|
|
48
|
+
optionalServerClusters: [],
|
|
49
|
+
});
|
|
34
50
|
export const onOffSwitch = DeviceTypeDefinition({
|
|
35
51
|
name: 'MA-onoffswitch',
|
|
36
52
|
code: 0x0103,
|
|
@@ -915,11 +931,11 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
915
931
|
coupleColorTempToLevel: false,
|
|
916
932
|
},
|
|
917
933
|
}, {
|
|
918
|
-
moveToLevel: async ({ request, attributes }) => {
|
|
934
|
+
moveToLevel: async ({ request, attributes, endpoint }) => {
|
|
919
935
|
// eslint-disable-next-line no-console
|
|
920
936
|
console.log('moveToLevel request:', request, 'attributes.currentLevel:', attributes.currentLevel.getLocal());
|
|
921
937
|
// attributes.currentLevel.setLocal(request.level);
|
|
922
|
-
await this.commandHandler.executeHandler('moveToLevel', { request: request, attributes: attributes });
|
|
938
|
+
await this.commandHandler.executeHandler('moveToLevel', { request: request, attributes: attributes, endpoint: endpoint });
|
|
923
939
|
},
|
|
924
940
|
move: async () => {
|
|
925
941
|
// eslint-disable-next-line no-console
|
|
@@ -933,11 +949,11 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
933
949
|
// eslint-disable-next-line no-console
|
|
934
950
|
console.error('Not implemented');
|
|
935
951
|
},
|
|
936
|
-
moveToLevelWithOnOff: async ({ request, attributes }) => {
|
|
952
|
+
moveToLevelWithOnOff: async ({ request, attributes, endpoint }) => {
|
|
937
953
|
// eslint-disable-next-line no-console
|
|
938
954
|
console.log('moveToLevelWithOnOff request:', request, 'attributes.currentLevel:', attributes.currentLevel.getLocal());
|
|
939
955
|
// attributes.currentLevel.setLocal(request.level);
|
|
940
|
-
await this.commandHandler.executeHandler('moveToLevelWithOnOff', { request: request, attributes: attributes });
|
|
956
|
+
await this.commandHandler.executeHandler('moveToLevelWithOnOff', { request: request, attributes: attributes, endpoint: endpoint });
|
|
941
957
|
},
|
|
942
958
|
moveWithOnOff: async () => {
|
|
943
959
|
// eslint-disable-next-line no-console
|
|
@@ -1126,7 +1142,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1126
1142
|
});
|
|
1127
1143
|
}
|
|
1128
1144
|
// eslint-disable-next-line no-console
|
|
1129
|
-
console.log(`Set WindowCovering initial currentPositionLiftPercent100ths and targetPositionLiftPercent100ths to ${position} and operationalStatus to Stopped.`);
|
|
1145
|
+
// console.log(`Set WindowCovering initial currentPositionLiftPercent100ths and targetPositionLiftPercent100ths to ${position} and operationalStatus to Stopped.`);
|
|
1130
1146
|
}
|
|
1131
1147
|
}
|
|
1132
1148
|
/**
|
|
@@ -1149,7 +1165,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1149
1165
|
});
|
|
1150
1166
|
}
|
|
1151
1167
|
// eslint-disable-next-line no-console
|
|
1152
|
-
console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${current}, targetPositionLiftPercent100ths: ${target} and operationalStatus: ${status}.`);
|
|
1168
|
+
// console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${current}, targetPositionLiftPercent100ths: ${target} and operationalStatus: ${status}.`);
|
|
1153
1169
|
}
|
|
1154
1170
|
/**
|
|
1155
1171
|
* Sets the status of the window covering.
|
|
@@ -1163,7 +1179,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1163
1179
|
return;
|
|
1164
1180
|
windowCovering.setOperationalStatusAttribute({ global: status, lift: status, tilt: 0 });
|
|
1165
1181
|
// eslint-disable-next-line no-console
|
|
1166
|
-
console.log(`Set WindowCovering operationalStatus: ${status}`);
|
|
1182
|
+
// console.log(`Set WindowCovering operationalStatus: ${status}`);
|
|
1167
1183
|
}
|
|
1168
1184
|
/**
|
|
1169
1185
|
* Retrieves the status of the window covering.
|
|
@@ -1177,7 +1193,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1177
1193
|
return undefined;
|
|
1178
1194
|
const status = windowCovering.getOperationalStatusAttribute();
|
|
1179
1195
|
// eslint-disable-next-line no-console
|
|
1180
|
-
console.log(`Get WindowCovering operationalStatus: ${status.global}`);
|
|
1196
|
+
// console.log(`Get WindowCovering operationalStatus: ${status.global}`);
|
|
1181
1197
|
return status.global;
|
|
1182
1198
|
}
|
|
1183
1199
|
/**
|
|
@@ -1194,7 +1210,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1194
1210
|
windowCovering.setCurrentPositionLiftPercent100thsAttribute(position);
|
|
1195
1211
|
windowCovering.setTargetPositionLiftPercent100thsAttribute(position);
|
|
1196
1212
|
// eslint-disable-next-line no-console
|
|
1197
|
-
console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${position} and targetPositionLiftPercent100ths: ${position}.`);
|
|
1213
|
+
// console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${position} and targetPositionLiftPercent100ths: ${position}.`);
|
|
1198
1214
|
}
|
|
1199
1215
|
/**
|
|
1200
1216
|
* Get a default door lock cluster server.
|
|
@@ -1438,7 +1454,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1438
1454
|
this.addClusterServer(this.getDefaultBooleanStateClusterServer(contact));
|
|
1439
1455
|
}
|
|
1440
1456
|
/**
|
|
1441
|
-
*
|
|
1457
|
+
* Get a default power source replaceable battery cluster server.
|
|
1442
1458
|
*
|
|
1443
1459
|
* @param batPercentRemaining - The remaining battery percentage (default: 100).
|
|
1444
1460
|
* @param batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
|
|
@@ -1446,8 +1462,8 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1446
1462
|
* @param batReplacementDescription - The battery replacement description (default: 'Battery type').
|
|
1447
1463
|
* @param batQuantity - The battery quantity (default: 1).
|
|
1448
1464
|
*/
|
|
1449
|
-
|
|
1450
|
-
|
|
1465
|
+
getDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining = 100, batChargeLevel = PowerSource.BatChargeLevel.Ok, batVoltage = 1500, batReplacementDescription = 'Battery type', batQuantity = 1) {
|
|
1466
|
+
return ClusterServer(PowerSourceCluster.with(PowerSource.Feature.Battery, PowerSource.Feature.Replaceable), {
|
|
1451
1467
|
status: PowerSource.PowerSourceStatus.Active,
|
|
1452
1468
|
order: 0,
|
|
1453
1469
|
description: 'Primary battery',
|
|
@@ -1459,17 +1475,29 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1459
1475
|
activeBatFaults: undefined,
|
|
1460
1476
|
batReplacementDescription,
|
|
1461
1477
|
batQuantity,
|
|
1462
|
-
}, {}, {})
|
|
1478
|
+
}, {}, {});
|
|
1463
1479
|
}
|
|
1464
1480
|
/**
|
|
1465
|
-
* Creates a default power source
|
|
1481
|
+
* Creates a default power source replaceable battery cluster server.
|
|
1466
1482
|
*
|
|
1467
1483
|
* @param batPercentRemaining - The remaining battery percentage (default: 100).
|
|
1468
1484
|
* @param batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
|
|
1469
1485
|
* @param batVoltage - The battery voltage (default: 1500).
|
|
1486
|
+
* @param batReplacementDescription - The battery replacement description (default: 'Battery type').
|
|
1487
|
+
* @param batQuantity - The battery quantity (default: 1).
|
|
1470
1488
|
*/
|
|
1471
|
-
|
|
1472
|
-
this.addClusterServer(
|
|
1489
|
+
createDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining = 100, batChargeLevel = PowerSource.BatChargeLevel.Ok, batVoltage = 1500, batReplacementDescription = 'Battery type', batQuantity = 1) {
|
|
1490
|
+
this.addClusterServer(this.getDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining, batChargeLevel, batVoltage, batReplacementDescription, batQuantity));
|
|
1491
|
+
}
|
|
1492
|
+
/**
|
|
1493
|
+
* Get a default power source rechargeable battery cluster server.
|
|
1494
|
+
*
|
|
1495
|
+
* @param batPercentRemaining - The remaining battery percentage (default: 100).
|
|
1496
|
+
* @param batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
|
|
1497
|
+
* @param batVoltage - The battery voltage (default: 1500).
|
|
1498
|
+
*/
|
|
1499
|
+
getDefaultPowerSourceRechargeableBatteryClusterServer(batPercentRemaining = 100, batChargeLevel = PowerSource.BatChargeLevel.Ok, batVoltage = 1500) {
|
|
1500
|
+
return ClusterServer(PowerSourceCluster.with(PowerSource.Feature.Battery, PowerSource.Feature.Rechargeable), {
|
|
1473
1501
|
status: PowerSource.PowerSourceStatus.Active,
|
|
1474
1502
|
order: 0,
|
|
1475
1503
|
description: 'Primary battery',
|
|
@@ -1482,20 +1510,38 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
|
|
|
1482
1510
|
activeBatFaults: undefined,
|
|
1483
1511
|
batChargeState: PowerSource.BatChargeState.IsNotCharging,
|
|
1484
1512
|
batFunctionalWhileCharging: true,
|
|
1485
|
-
}, {}, {})
|
|
1513
|
+
}, {}, {});
|
|
1486
1514
|
}
|
|
1487
1515
|
/**
|
|
1488
|
-
* Creates a default power source
|
|
1516
|
+
* Creates a default power source rechargeable battery cluster server.
|
|
1517
|
+
*
|
|
1518
|
+
* @param batPercentRemaining - The remaining battery percentage (default: 100).
|
|
1519
|
+
* @param batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
|
|
1520
|
+
* @param batVoltage - The battery voltage (default: 1500).
|
|
1521
|
+
*/
|
|
1522
|
+
createDefaultPowerSourceRechargeableBatteryClusterServer(batPercentRemaining = 100, batChargeLevel = PowerSource.BatChargeLevel.Ok, batVoltage = 1500) {
|
|
1523
|
+
this.addClusterServer(this.getDefaultPowerSourceRechargeableBatteryClusterServer(batPercentRemaining, batChargeLevel, batVoltage));
|
|
1524
|
+
}
|
|
1525
|
+
/**
|
|
1526
|
+
* Get a default power source wired cluster server.
|
|
1489
1527
|
*
|
|
1490
1528
|
* @param wiredCurrentType - The type of wired current (default: PowerSource.WiredCurrentType.Ac)
|
|
1491
1529
|
*/
|
|
1492
|
-
|
|
1493
|
-
|
|
1530
|
+
getDefaultPowerSourceWiredClusterServer(wiredCurrentType = PowerSource.WiredCurrentType.Ac) {
|
|
1531
|
+
return ClusterServer(PowerSourceCluster.with(PowerSource.Feature.Wired), {
|
|
1494
1532
|
wiredCurrentType,
|
|
1495
1533
|
description: wiredCurrentType === PowerSource.WiredCurrentType.Ac ? 'AC Power' : 'DC Power',
|
|
1496
1534
|
status: PowerSource.PowerSourceStatus.Active,
|
|
1497
1535
|
order: 0,
|
|
1498
|
-
}, {}, {})
|
|
1536
|
+
}, {}, {});
|
|
1537
|
+
}
|
|
1538
|
+
/**
|
|
1539
|
+
* Creates a default power source wired cluster server.
|
|
1540
|
+
*
|
|
1541
|
+
* @param wiredCurrentType - The type of wired current (default: PowerSource.WiredCurrentType.Ac)
|
|
1542
|
+
*/
|
|
1543
|
+
createDefaultPowerSourceWiredClusterServer(wiredCurrentType = PowerSource.WiredCurrentType.Ac) {
|
|
1544
|
+
this.addClusterServer(this.getDefaultPowerSourceWiredClusterServer(wiredCurrentType));
|
|
1499
1545
|
}
|
|
1500
1546
|
/**
|
|
1501
1547
|
* Creates a default power source configuration cluster server.
|