@matterbridge/core 3.9.5-dev-20260715-33298cd → 3.10.0-dev-20260716-7f8762c
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/dist/behaviors/colorControlServer.d.ts +0 -15
- package/dist/behaviors/colorControlServer.js +0 -2
- package/dist/behaviors/thermostatServer.d.ts +0 -14
- package/dist/behaviors/thermostatServer.js +0 -2
- package/dist/behaviors/windowCoveringServer.d.ts +0 -26
- package/dist/behaviors/windowCoveringServer.js +0 -4
- package/dist/deviceManager.js +3 -1
- package/dist/matter/export.d.ts +0 -11
- package/dist/matter/export.js +0 -11
- package/dist/matterNode.d.ts +1 -1
- package/dist/matterNode.js +36 -13
- package/dist/matterbridge.js +19 -11
- package/dist/matterbridgeDeviceTypes.d.ts +0 -14
- package/dist/matterbridgeDeviceTypes.js +0 -14
- package/dist/matterbridgeEndpoint.d.ts +5 -4
- package/dist/matterbridgeEndpoint.js +39 -14
- package/dist/matterbridgeEndpointCommandHandler.d.ts +0 -75
- package/dist/matterbridgeEndpointTypes.d.ts +7 -0
- package/dist/matterbridgePlatform.js +1 -1
- package/package.json +5 -9
- package/dist/jestutils/export.d.ts +0 -13
- package/dist/jestutils/export.js +0 -13
- package/dist/jestutils/flushAsync.d.ts +0 -1
- package/dist/jestutils/flushAsync.js +0 -8
- package/dist/jestutils/jestBroadcastServerSpy.d.ts +0 -13
- package/dist/jestutils/jestBroadcastServerSpy.js +0 -14
- package/dist/jestutils/jestDeviceManagerSpy.d.ts +0 -14
- package/dist/jestutils/jestDeviceManagerSpy.js +0 -15
- package/dist/jestutils/jestFrontendSpy.d.ts +0 -7
- package/dist/jestutils/jestFrontendSpy.js +0 -8
- package/dist/jestutils/jestMatterTest.d.ts +0 -21
- package/dist/jestutils/jestMatterTest.js +0 -281
- package/dist/jestutils/jestMatterbridgeEndpointSpy.d.ts +0 -7
- package/dist/jestutils/jestMatterbridgeEndpointSpy.js +0 -8
- package/dist/jestutils/jestMatterbridgePlatformSpy.d.ts +0 -43
- package/dist/jestutils/jestMatterbridgePlatformSpy.js +0 -44
- package/dist/jestutils/jestMatterbridgeSpy.d.ts +0 -5
- package/dist/jestutils/jestMatterbridgeSpy.js +0 -6
- package/dist/jestutils/jestMatterbridgeTest.d.ts +0 -21
- package/dist/jestutils/jestMatterbridgeTest.js +0 -252
- package/dist/jestutils/jestPluginManagerSpy.d.ts +0 -40
- package/dist/jestutils/jestPluginManagerSpy.js +0 -41
- package/dist/jestutils/jestSetupTest.d.ts +0 -20
- package/dist/jestutils/jestSetupTest.js +0 -79
- package/dist/jestutils/logKeepAlives.d.ts +0 -2
- package/dist/jestutils/logKeepAlives.js +0 -31
- package/dist/jestutils/matterRequest.d.ts +0 -10
- package/dist/jestutils/matterRequest.js +0 -78
|
@@ -16,19 +16,4 @@ export declare class MatterbridgeColorControlServer extends MatterbridgeColorCon
|
|
|
16
16
|
moveToColor(request: ColorControl.MoveToColorRequest): Promise<void>;
|
|
17
17
|
moveToColorTemperature(request: ColorControl.MoveToColorTemperatureRequest): Promise<void>;
|
|
18
18
|
}
|
|
19
|
-
declare const MatterbridgeEnhancedColorControlServer_base: import("@matter/node").ClusterBehavior.Type<typeof MatterbridgeColorControlServer, import("@matter/types").ClusterType.WithSupportedFeatures<import("@matter/types").ClusterType.WithSupportedFeatures<ColorControl, {
|
|
20
|
-
colorLoop: false;
|
|
21
|
-
colorTemperature: true;
|
|
22
|
-
enhancedHue: true;
|
|
23
|
-
hueSaturation: true;
|
|
24
|
-
xy: true;
|
|
25
|
-
}>, {
|
|
26
|
-
colorLoop: false;
|
|
27
|
-
colorTemperature: true;
|
|
28
|
-
enhancedHue: true;
|
|
29
|
-
hueSaturation: true;
|
|
30
|
-
xy: true;
|
|
31
|
-
}>, import("@matter/types").ClusterType.Concrete, typeof import("@matter/node/behaviors/color-control").ColorControlBaseServer.Internal, "colorControl">;
|
|
32
|
-
export declare class MatterbridgeEnhancedColorControlServer extends MatterbridgeEnhancedColorControlServer_base {
|
|
33
|
-
}
|
|
34
19
|
export {};
|
|
@@ -101,5 +101,3 @@ export class MatterbridgeColorControlServer extends ColorControlServer.with(Colo
|
|
|
101
101
|
await super.moveToColorTemperature(request);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
export class MatterbridgeEnhancedColorControlServer extends MatterbridgeColorControlServer.with(ColorControl.Feature.HueSaturation, ColorControl.Feature.EnhancedHue, ColorControl.Feature.Xy, ColorControl.Feature.ColorTemperature) {
|
|
105
|
-
}
|
|
@@ -17,18 +17,4 @@ export declare class MatterbridgeThermostatServer extends MatterbridgeThermostat
|
|
|
17
17
|
setpointRaiseLower(request: Thermostat.SetpointRaiseLowerRequest): Promise<void>;
|
|
18
18
|
setActivePresetRequest(request: Thermostat.SetActivePresetRequest): Promise<void>;
|
|
19
19
|
}
|
|
20
|
-
declare const MatterbridgePresetThermostatServer_base: import("@matter/node").ClusterBehavior.Type<typeof ThermostatServer, import("@matter/types").ClusterType.WithSupportedFeatures<Thermostat, {
|
|
21
|
-
autoMode: true;
|
|
22
|
-
cooling: true;
|
|
23
|
-
events: false;
|
|
24
|
-
heating: true;
|
|
25
|
-
localTemperatureNotExposed: false;
|
|
26
|
-
matterScheduleConfiguration: false;
|
|
27
|
-
occupancy: false;
|
|
28
|
-
presets: true;
|
|
29
|
-
setback: false;
|
|
30
|
-
thermostatSuggestions: false;
|
|
31
|
-
}>, import("@matter/types").ClusterType.Concrete, typeof import("@matter/node/behaviors/thermostat").ThermostatBaseServer.Internal, "thermostat">;
|
|
32
|
-
export declare class MatterbridgePresetThermostatServer extends MatterbridgePresetThermostatServer_base {
|
|
33
|
-
}
|
|
34
20
|
export {};
|
|
@@ -46,5 +46,3 @@ export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermost
|
|
|
46
46
|
device.log.debug(`MatterbridgeThermostatServer: setActivePresetRequest completed with activePresetHandle: ${activePresetHandle} occupiedHeatingSetpoint: ${this.state.occupiedHeatingSetpoint} occupiedCoolingSetpoint: ${this.state.occupiedCoolingSetpoint}`);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
export class MatterbridgePresetThermostatServer extends ThermostatServer.with(Thermostat.Feature.Presets, Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode) {
|
|
50
|
-
}
|
|
@@ -18,30 +18,4 @@ export declare class MatterbridgeWindowCoveringServer extends MatterbridgeWindow
|
|
|
18
18
|
goToTiltPercentage(request: WindowCovering.GoToTiltPercentageRequest): Promise<void>;
|
|
19
19
|
handleMovement(): void;
|
|
20
20
|
}
|
|
21
|
-
declare const MatterbridgeLiftWindowCoveringServer_base: import("@matter/node").ClusterBehavior.Type<typeof MatterbridgeWindowCoveringServer, import("@matter/types").ClusterType.WithSupportedFeatures<import("@matter/types").ClusterType.WithSupportedFeatures<WindowCovering, {
|
|
22
|
-
lift: true;
|
|
23
|
-
positionAwareLift: true;
|
|
24
|
-
positionAwareTilt: true;
|
|
25
|
-
tilt: true;
|
|
26
|
-
}>, {
|
|
27
|
-
lift: true;
|
|
28
|
-
positionAwareLift: true;
|
|
29
|
-
positionAwareTilt: false;
|
|
30
|
-
tilt: false;
|
|
31
|
-
}>, import("@matter/types").ClusterType.Concrete, typeof WindowCoveringBaseServer.Internal, "windowCovering">;
|
|
32
|
-
export declare class MatterbridgeLiftWindowCoveringServer extends MatterbridgeLiftWindowCoveringServer_base {
|
|
33
|
-
}
|
|
34
|
-
declare const MatterbridgeLiftTiltWindowCoveringServer_base: import("@matter/node").ClusterBehavior.Type<typeof MatterbridgeWindowCoveringServer, import("@matter/types").ClusterType.WithSupportedFeatures<import("@matter/types").ClusterType.WithSupportedFeatures<WindowCovering, {
|
|
35
|
-
lift: true;
|
|
36
|
-
positionAwareLift: true;
|
|
37
|
-
positionAwareTilt: true;
|
|
38
|
-
tilt: true;
|
|
39
|
-
}>, {
|
|
40
|
-
lift: true;
|
|
41
|
-
positionAwareLift: true;
|
|
42
|
-
positionAwareTilt: true;
|
|
43
|
-
tilt: true;
|
|
44
|
-
}>, import("@matter/types").ClusterType.Concrete, typeof WindowCoveringBaseServer.Internal, "windowCovering">;
|
|
45
|
-
export declare class MatterbridgeLiftTiltWindowCoveringServer extends MatterbridgeLiftTiltWindowCoveringServer_base {
|
|
46
|
-
}
|
|
47
21
|
export {};
|
|
@@ -90,7 +90,3 @@ export class MatterbridgeWindowCoveringServer extends WindowCoveringServer.with(
|
|
|
90
90
|
handleMovement() {
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
export class MatterbridgeLiftWindowCoveringServer extends MatterbridgeWindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift) {
|
|
94
|
-
}
|
|
95
|
-
export class MatterbridgeLiftTiltWindowCoveringServer extends MatterbridgeWindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt) {
|
|
96
|
-
}
|
package/dist/deviceManager.js
CHANGED
|
@@ -16,11 +16,13 @@ export function toBaseDevice(device) {
|
|
|
16
16
|
vendorName: device.vendorName,
|
|
17
17
|
productId: device.productId,
|
|
18
18
|
productName: device.productName,
|
|
19
|
+
productLabel: device.productLabel,
|
|
20
|
+
productUrl: device.productUrl,
|
|
21
|
+
configurationVersion: device.configurationVersion,
|
|
19
22
|
softwareVersion: device.softwareVersion,
|
|
20
23
|
softwareVersionString: device.softwareVersionString,
|
|
21
24
|
hardwareVersion: device.hardwareVersion,
|
|
22
25
|
hardwareVersionString: device.hardwareVersionString,
|
|
23
|
-
productUrl: device.productUrl,
|
|
24
26
|
tagList: device.tagList,
|
|
25
27
|
originalId: device.originalId,
|
|
26
28
|
name: device.name,
|
package/dist/matter/export.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
export * from '@matter/main';
|
|
2
2
|
export { AttributeElement, ClusterElement, ClusterModel, CommandElement, EventElement, FieldElement, MatterDefinition } from '@matter/main/model';
|
|
3
3
|
export { MdnsService, Val } from '@matter/main/protocol';
|
|
4
|
-
export { CommonAreaNamespaceTag as AreaNamespaceTag } from '@matter/main/node';
|
|
5
|
-
export { CommonClosureTag as ClosureTag } from '@matter/main/node';
|
|
6
|
-
export { CommonCompassDirectionTag as CompassDirectionTag } from '@matter/main/node';
|
|
7
|
-
export { CommonCompassLocationTag as CompassLocationTag } from '@matter/main/node';
|
|
8
|
-
export { CommonDirectionTag as DirectionTag } from '@matter/main/node';
|
|
9
|
-
export { CommonLandmarkNamespaceTag as LandmarkNamespaceTag } from '@matter/main/node';
|
|
10
|
-
export { CommonLevelTag as LevelTag } from '@matter/main/node';
|
|
11
|
-
export { CommonLocationTag as LocationTag } from '@matter/main/node';
|
|
12
|
-
export { CommonNumberTag as NumberTag } from '@matter/main/node';
|
|
13
|
-
export { CommonPositionTag as PositionTag } from '@matter/main/node';
|
|
14
|
-
export { CommonRelativePositionTag as RelativePositionTag } from '@matter/main/node';
|
package/dist/matter/export.js
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
export * from '@matter/main';
|
|
2
2
|
export { AttributeElement, ClusterElement, ClusterModel, CommandElement, EventElement, FieldElement, MatterDefinition } from '@matter/main/model';
|
|
3
3
|
export { MdnsService, Val } from '@matter/main/protocol';
|
|
4
|
-
export { CommonAreaNamespaceTag as AreaNamespaceTag } from '@matter/main/node';
|
|
5
|
-
export { CommonClosureTag as ClosureTag } from '@matter/main/node';
|
|
6
|
-
export { CommonCompassDirectionTag as CompassDirectionTag } from '@matter/main/node';
|
|
7
|
-
export { CommonCompassLocationTag as CompassLocationTag } from '@matter/main/node';
|
|
8
|
-
export { CommonDirectionTag as DirectionTag } from '@matter/main/node';
|
|
9
|
-
export { CommonLandmarkNamespaceTag as LandmarkNamespaceTag } from '@matter/main/node';
|
|
10
|
-
export { CommonLevelTag as LevelTag } from '@matter/main/node';
|
|
11
|
-
export { CommonLocationTag as LocationTag } from '@matter/main/node';
|
|
12
|
-
export { CommonNumberTag as NumberTag } from '@matter/main/node';
|
|
13
|
-
export { CommonPositionTag as PositionTag } from '@matter/main/node';
|
|
14
|
-
export { CommonRelativePositionTag as RelativePositionTag } from '@matter/main/node';
|
package/dist/matterNode.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export declare class MatterNode extends EventEmitter<MatterEvents> {
|
|
|
58
58
|
startMatterStorage(): Promise<void>;
|
|
59
59
|
backupMatterStorage(storageName: string, backupName: string): Promise<void>;
|
|
60
60
|
stopMatterStorage(): Promise<void>;
|
|
61
|
-
createServerNodeContext(storeId: string, deviceName: string, deviceType: DeviceTypeId, vendorId: VendorId, vendorName: string, productId: number, productName: string, serialNumber?: string, uniqueId?: string): Promise<StorageContext>;
|
|
61
|
+
createServerNodeContext(storeId: string, deviceName: string, deviceType: DeviceTypeId, vendorId: VendorId, vendorName: string, productId: number, productName: string, serialNumber?: string, uniqueId?: string, softwareVersion?: number, softwareVersionString?: string, hardwareVersion?: number, hardwareVersionString?: string, productLabel?: string, productUrl?: string, configurationVersion?: number): Promise<StorageContext>;
|
|
62
62
|
createServerNode(port?: number, passcode?: number, discriminator?: number): Promise<ServerNode>;
|
|
63
63
|
getServerNodeData(serverNode: ServerNode): ApiMatter;
|
|
64
64
|
startServerNode(timeout?: number): Promise<void>;
|
package/dist/matterNode.js
CHANGED
|
@@ -15,7 +15,7 @@ import { getIntParameter, getParameter, hasParameter } from '@matterbridge/utils
|
|
|
15
15
|
import { copyDirectory } from '@matterbridge/utils/copy-dir';
|
|
16
16
|
import { getErrorMessage, inspectError } from '@matterbridge/utils/error';
|
|
17
17
|
import { logModuleLoaded } from '@matterbridge/utils/loader';
|
|
18
|
-
import {
|
|
18
|
+
import { isValidInteger, isValidString, parseVersionString } from '@matterbridge/utils/validate';
|
|
19
19
|
import { wait, withTimeout } from '@matterbridge/utils/wait';
|
|
20
20
|
import { AnsiLogger, BLUE, CYAN, db, debugStringify, er, nf, or, zb } from 'node-ansi-logger';
|
|
21
21
|
import { NodeStorageManager } from 'node-persist-manager';
|
|
@@ -328,7 +328,7 @@ export class MatterNode extends EventEmitter {
|
|
|
328
328
|
this.log.info('Closed matter node storage');
|
|
329
329
|
this.emit('closed');
|
|
330
330
|
}
|
|
331
|
-
async createServerNodeContext(storeId, deviceName, deviceType, vendorId, vendorName, productId, productName, serialNumber, uniqueId) {
|
|
331
|
+
async createServerNodeContext(storeId, deviceName, deviceType, vendorId, vendorName, productId, productName, serialNumber, uniqueId, softwareVersion = 1, softwareVersionString = '1.0.0', hardwareVersion = 1, hardwareVersionString = '1.0.0', productLabel = 'Matter Endpoint', productUrl = 'https://matterbridge.io', configurationVersion = 1) {
|
|
332
332
|
if (!this.matterStorageService) {
|
|
333
333
|
throw new Error('No storage service initialized');
|
|
334
334
|
}
|
|
@@ -344,14 +344,16 @@ export class MatterNode extends EventEmitter {
|
|
|
344
344
|
await storageContext.set('vendorName', vendorName.slice(0, 32));
|
|
345
345
|
await storageContext.set('productId', productId);
|
|
346
346
|
await storageContext.set('productName', productName.slice(0, 32));
|
|
347
|
-
await storageContext.set('
|
|
348
|
-
await storageContext.set('
|
|
347
|
+
await storageContext.set('productLabel', productLabel.replace(vendorName, '').trim().slice(0, 64));
|
|
348
|
+
await storageContext.set('productUrl', isValidString(productUrl, 8, 256) && productUrl.startsWith('https://') ? productUrl : 'https://matterbridge.io');
|
|
349
|
+
await storageContext.set('nodeLabel', deviceName.slice(0, 32));
|
|
349
350
|
await storageContext.set('serialNumber', await storageContext.get('serialNumber', serialNumber ? serialNumber.slice(0, 32) : 'SN' + random));
|
|
350
351
|
await storageContext.set('uniqueId', await storageContext.get('uniqueId', uniqueId ? uniqueId.slice(0, 32) : 'UI' + random));
|
|
351
|
-
await storageContext.set('softwareVersion',
|
|
352
|
-
await storageContext.set('softwareVersionString', isValidString(
|
|
353
|
-
await storageContext.set('hardwareVersion',
|
|
354
|
-
await storageContext.set('hardwareVersionString', isValidString(
|
|
352
|
+
await storageContext.set('softwareVersion', isValidInteger(softwareVersion, 0, UINT32_MAX) ? softwareVersion : 1);
|
|
353
|
+
await storageContext.set('softwareVersionString', isValidString(softwareVersionString, 1, 64) ? softwareVersionString : '1.0.0');
|
|
354
|
+
await storageContext.set('hardwareVersion', isValidInteger(hardwareVersion, 0, UINT16_MAX) ? hardwareVersion : 1);
|
|
355
|
+
await storageContext.set('hardwareVersionString', isValidString(hardwareVersionString, 1, 64) ? hardwareVersionString : '1.0.0');
|
|
356
|
+
await storageContext.set('configurationVersion', isValidInteger(configurationVersion, 1, UINT32_MAX) ? configurationVersion : 1);
|
|
355
357
|
this.log.debug(`Created server node storage context "${storeId}.persist" for ${storeId}:`);
|
|
356
358
|
this.log.debug(`- storeId: ${await storageContext.get('storeId')}`);
|
|
357
359
|
this.log.debug(`- deviceName: ${await storageContext.get('deviceName')}`);
|
|
@@ -360,14 +362,16 @@ export class MatterNode extends EventEmitter {
|
|
|
360
362
|
this.log.debug(`- vendorName: ${await storageContext.get('vendorName')}`);
|
|
361
363
|
this.log.debug(`- productId: ${await storageContext.get('productId')}`);
|
|
362
364
|
this.log.debug(`- productName: ${await storageContext.get('productName')}`);
|
|
363
|
-
this.log.debug(`- nodeLabel: ${await storageContext.get('nodeLabel')}`);
|
|
364
365
|
this.log.debug(`- productLabel: ${await storageContext.get('productLabel')}`);
|
|
366
|
+
this.log.debug(`- productUrl: ${await storageContext.get('productUrl')}`);
|
|
367
|
+
this.log.debug(`- nodeLabel: ${await storageContext.get('nodeLabel')}`);
|
|
365
368
|
this.log.debug(`- serialNumber: ${await storageContext.get('serialNumber')}`);
|
|
366
369
|
this.log.debug(`- uniqueId: ${await storageContext.get('uniqueId')}`);
|
|
367
370
|
this.log.debug(`- softwareVersion: ${await storageContext.get('softwareVersion')}`);
|
|
368
371
|
this.log.debug(`- softwareVersionString: ${await storageContext.get('softwareVersionString')}`);
|
|
369
372
|
this.log.debug(`- hardwareVersion: ${await storageContext.get('hardwareVersion')}`);
|
|
370
373
|
this.log.debug(`- hardwareVersionString: ${await storageContext.get('hardwareVersionString')}`);
|
|
374
|
+
this.log.debug(`- configurationVersion: ${await storageContext.get('configurationVersion')}`);
|
|
371
375
|
return storageContext;
|
|
372
376
|
}
|
|
373
377
|
async createServerNode(port = 5540, passcode = 20252026, discriminator = 3850) {
|
|
@@ -376,6 +380,23 @@ export class MatterNode extends EventEmitter {
|
|
|
376
380
|
}
|
|
377
381
|
const storeId = await this.matterStorageContext.get('storeId');
|
|
378
382
|
this.log.notice(`Creating server node for ${storeId} on port ${port} with passcode ${passcode} and discriminator ${discriminator}...`);
|
|
383
|
+
this.log.debug(`- storeId: ${await this.matterStorageContext.get('storeId')}`);
|
|
384
|
+
this.log.debug(`- deviceName: ${await this.matterStorageContext.get('deviceName')}`);
|
|
385
|
+
this.log.debug(`- deviceType: ${await this.matterStorageContext.get('deviceType')}(0x${(await this.matterStorageContext.get('deviceType'))?.toString(16).padStart(4, '0')})`);
|
|
386
|
+
this.log.debug(`- vendorId: ${await this.matterStorageContext.get('vendorId')}`);
|
|
387
|
+
this.log.debug(`- vendorName: ${await this.matterStorageContext.get('vendorName')}`);
|
|
388
|
+
this.log.debug(`- productId: ${await this.matterStorageContext.get('productId')}`);
|
|
389
|
+
this.log.debug(`- productName: ${await this.matterStorageContext.get('productName')}`);
|
|
390
|
+
this.log.debug(`- productLabel: ${await this.matterStorageContext.get('productLabel')}`);
|
|
391
|
+
this.log.debug(`- productUrl: ${await this.matterStorageContext.get('productUrl')}`);
|
|
392
|
+
this.log.debug(`- nodeLabel: ${await this.matterStorageContext.get('nodeLabel')}`);
|
|
393
|
+
this.log.debug(`- serialNumber: ${await this.matterStorageContext.get('serialNumber')}`);
|
|
394
|
+
this.log.debug(`- uniqueId: ${await this.matterStorageContext.get('uniqueId')}`);
|
|
395
|
+
this.log.debug(`- softwareVersion: ${await this.matterStorageContext.get('softwareVersion')}`);
|
|
396
|
+
this.log.debug(`- softwareVersionString: ${await this.matterStorageContext.get('softwareVersionString')}`);
|
|
397
|
+
this.log.debug(`- hardwareVersion: ${await this.matterStorageContext.get('hardwareVersion')}`);
|
|
398
|
+
this.log.debug(`- hardwareVersionString: ${await this.matterStorageContext.get('hardwareVersionString')}`);
|
|
399
|
+
this.log.debug(`- configurationVersion: ${await this.matterStorageContext.get('configurationVersion')}`);
|
|
379
400
|
if (passcode < 0 || passcode > 99999999) {
|
|
380
401
|
this.log.warn(`Invalid passcode ${passcode} for server node ${storeId}. Passcode must be between 0 and 99999999. Generating a random passcode...`);
|
|
381
402
|
passcode = PaseClient.generateRandomPasscode(this.environment.get(Crypto));
|
|
@@ -413,6 +434,7 @@ export class MatterNode extends EventEmitter {
|
|
|
413
434
|
productId: await this.matterStorageContext.get('productId'),
|
|
414
435
|
productName: await this.matterStorageContext.get('productName'),
|
|
415
436
|
productLabel: await this.matterStorageContext.get('productLabel'),
|
|
437
|
+
productUrl: await this.matterStorageContext.get('productUrl'),
|
|
416
438
|
nodeLabel: await this.matterStorageContext.get('nodeLabel'),
|
|
417
439
|
serialNumber: await this.matterStorageContext.get('serialNumber'),
|
|
418
440
|
uniqueId: await this.matterStorageContext.get('uniqueId'),
|
|
@@ -420,6 +442,7 @@ export class MatterNode extends EventEmitter {
|
|
|
420
442
|
softwareVersionString: await this.matterStorageContext.get('softwareVersionString'),
|
|
421
443
|
hardwareVersion: await this.matterStorageContext.get('hardwareVersion'),
|
|
422
444
|
hardwareVersionString: await this.matterStorageContext.get('hardwareVersionString'),
|
|
445
|
+
configurationVersion: await this.matterStorageContext.get('configurationVersion'),
|
|
423
446
|
reachable: true,
|
|
424
447
|
},
|
|
425
448
|
});
|
|
@@ -544,7 +567,7 @@ export class MatterNode extends EventEmitter {
|
|
|
544
567
|
}
|
|
545
568
|
async createMatterbridgeServerNode() {
|
|
546
569
|
this.log.debug(`Creating ${plg}Matterbridge${db} server node...`);
|
|
547
|
-
this.matterStorageContext = await this.createServerNodeContext('Matterbridge', 'Matterbridge', this.aggregatorDeviceType, this.aggregatorVendorId, this.aggregatorVendorName, this.aggregatorProductId, this.aggregatorProductName, this.aggregatorSerialNumber, this.aggregatorUniqueId);
|
|
570
|
+
this.matterStorageContext = await this.createServerNodeContext('Matterbridge', 'Matterbridge', this.aggregatorDeviceType, this.aggregatorVendorId, this.aggregatorVendorName, this.aggregatorProductId, this.aggregatorProductName, this.aggregatorSerialNumber, this.aggregatorUniqueId, parseVersionString(this.matterbridge.matterbridgeVersion), this.matterbridge.matterbridgeVersion, parseVersionString(this.matterbridge.systemInformation.osRelease), this.matterbridge.systemInformation.osRelease, 'Matter Bridge', 'https://matterbridge.io', 1);
|
|
548
571
|
this.serverNode = await this.createServerNode(this.port ? this.port++ : undefined, this.passcode ? this.passcode++ : undefined, this.discriminator ? this.discriminator++ : undefined);
|
|
549
572
|
this.aggregatorNode = await this.createAggregatorNode();
|
|
550
573
|
this.log.debug(`Adding ${plg}Matterbridge${db} aggregator node...`);
|
|
@@ -565,7 +588,7 @@ export class MatterNode extends EventEmitter {
|
|
|
565
588
|
if (!plugin.locked && device.deviceType && device.deviceName && device.vendorId && device.vendorName && device.productId && device.productName) {
|
|
566
589
|
plugin.locked = true;
|
|
567
590
|
this.log.debug(`Creating accessory plugin ${plg}${plugin.name}${db} server node...`);
|
|
568
|
-
this.matterStorageContext = await this.createServerNodeContext(plugin.name, device.deviceName, DeviceTypeId(device.deviceType), VendorId(device.vendorId), device.vendorName, device.productId, device.productName);
|
|
591
|
+
this.matterStorageContext = await this.createServerNodeContext(plugin.name, device.deviceName, DeviceTypeId(device.deviceType), VendorId(device.vendorId), device.vendorName, device.productId, device.productName, device.serialNumber, device.uniqueId, device.softwareVersion, device.softwareVersionString, device.hardwareVersion, device.hardwareVersionString, device.productLabel, device.productUrl, device.configurationVersion);
|
|
569
592
|
this.serverNode = await this.createServerNode(this.port ? this.port++ : undefined, this.passcode ? this.passcode++ : undefined, this.discriminator ? this.discriminator++ : undefined);
|
|
570
593
|
this.log.debug(`Adding ${plg}${plugin.name}${db}:${dev}${device.deviceName}${db} to ${plg}${plugin.name}${db} server node...`);
|
|
571
594
|
await this.serverNode.add(device);
|
|
@@ -586,7 +609,7 @@ export class MatterNode extends EventEmitter {
|
|
|
586
609
|
if (!plugin.locked) {
|
|
587
610
|
plugin.locked = true;
|
|
588
611
|
this.log.debug(`Creating dynamic plugin ${plg}${plugin.name}${db} server node...`);
|
|
589
|
-
this.matterStorageContext = await this.createServerNodeContext(plugin.name,
|
|
612
|
+
this.matterStorageContext = await this.createServerNodeContext(plugin.name, plugin.description, this.aggregatorDeviceType, this.aggregatorVendorId, this.aggregatorVendorName, this.aggregatorProductId, this.aggregatorProductName, undefined, undefined, parseVersionString(this.matterbridge.matterbridgeVersion), this.matterbridge.matterbridgeVersion, parseVersionString(this.matterbridge.systemInformation.osRelease), this.matterbridge.systemInformation.osRelease, plugin.description, plugin.homepage ?? 'https://matterbridge.io', 1);
|
|
590
613
|
this.serverNode = await this.createServerNode(this.port ? this.port++ : undefined, this.passcode ? this.passcode++ : undefined, this.discriminator ? this.discriminator++ : undefined);
|
|
591
614
|
this.log.debug(`Creating dynamic plugin ${plg}${plugin.name}${db} aggregator node...`);
|
|
592
615
|
this.aggregatorNode = await this.createAggregatorNode();
|
|
@@ -608,7 +631,7 @@ export class MatterNode extends EventEmitter {
|
|
|
608
631
|
}
|
|
609
632
|
if (device.mode === 'server' && device.deviceType && device.deviceName && device.vendorId && device.vendorName && device.productId && device.productName) {
|
|
610
633
|
this.log.debug(`Creating device ${plg}${plugin.name}${db}:${dev}${device.deviceName}${db} server node...`);
|
|
611
|
-
this.matterStorageContext = await this.createServerNodeContext(device.deviceName.replace(/[ .]/g, ''), device.deviceName, DeviceTypeId(device.deviceType), VendorId(device.vendorId), device.vendorName, device.productId, device.productName);
|
|
634
|
+
this.matterStorageContext = await this.createServerNodeContext(device.deviceName.replace(/[ .]/g, ''), device.deviceName, DeviceTypeId(device.deviceType), VendorId(device.vendorId), device.vendorName, device.productId, device.productName, device.serialNumber, device.uniqueId, device.softwareVersion, device.softwareVersionString, device.hardwareVersion, device.hardwareVersionString, device.productLabel, device.productUrl, device.configurationVersion);
|
|
612
635
|
this.serverNode = await this.createServerNode(this.port ? this.port++ : undefined, this.passcode ? this.passcode++ : undefined, this.discriminator ? this.discriminator++ : undefined);
|
|
613
636
|
this.log.debug(`Adding ${plg}${plugin.name}${db}:${dev}${device.deviceName}${db} to server node...`);
|
|
614
637
|
await this.serverNode.add(device);
|
package/dist/matterbridge.js
CHANGED
|
@@ -22,7 +22,7 @@ import { getErrorMessage, inspectError, logError } from '@matterbridge/utils/err
|
|
|
22
22
|
import { formatBytes, formatPercent, formatUptime } from '@matterbridge/utils/format';
|
|
23
23
|
import { logModuleLoaded } from '@matterbridge/utils/loader';
|
|
24
24
|
import { excludedInterfaceNamePattern } from '@matterbridge/utils/network';
|
|
25
|
-
import { isValidNumber, isValidObject, isValidString, parseVersionString } from '@matterbridge/utils/validate';
|
|
25
|
+
import { isValidInteger, isValidNumber, isValidObject, isValidString, parseVersionString } from '@matterbridge/utils/validate';
|
|
26
26
|
import { fireAndForget, wait } from '@matterbridge/utils/wait';
|
|
27
27
|
import { AnsiLogger, BLUE, BRIGHT, CYAN, db, debugStringify, er, GREEN, nf, nt, or, RED, RESET, rs, UNDERLINE, UNDERLINEOFF, wr, zb, } from 'node-ansi-logger';
|
|
28
28
|
import { NodeStorageManager } from 'node-persist-manager';
|
|
@@ -1751,7 +1751,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1751
1751
|
await createDirectory(path.join(this.matterbridgeDirectory, MATTER_STORAGE_DIR, 'Matterbridge'), `Matter node storage directory for Matterbridge`, this.log);
|
|
1752
1752
|
this.matterStorageManager = await this.matterStorageService.open('Matterbridge');
|
|
1753
1753
|
this.log.info('Matter node storage manager "Matterbridge" created');
|
|
1754
|
-
this.matterbridgeContext = await this.createServerNodeContext('Matterbridge', 'Matterbridge', this.aggregatorDeviceType, this.aggregatorVendorId, this.aggregatorVendorName, this.aggregatorProductId, this.aggregatorProductName, this.aggregatorSerialNumber, this.aggregatorUniqueId);
|
|
1754
|
+
this.matterbridgeContext = await this.createServerNodeContext('Matterbridge', 'Matterbridge', this.aggregatorDeviceType, this.aggregatorVendorId, this.aggregatorVendorName, this.aggregatorProductId, this.aggregatorProductName, this.aggregatorSerialNumber, this.aggregatorUniqueId, parseVersionString(this.matterbridgeVersion), this.matterbridgeVersion, parseVersionString(this.systemInformation.osRelease), this.systemInformation.osRelease, 'Matter Bridge', 'https://matterbridge.io', 1);
|
|
1755
1755
|
this.log.info('Matter node storage started');
|
|
1756
1756
|
await this.backupMatterStorage(path.join(this.matterbridgeDirectory, MATTER_STORAGE_DIR), path.join(this.matterbridgeDirectory, MATTER_STORAGE_DIR + '.backup'));
|
|
1757
1757
|
}
|
|
@@ -1779,7 +1779,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1779
1779
|
this.controllerContext = undefined;
|
|
1780
1780
|
this.log.info('Matter node storage closed');
|
|
1781
1781
|
}
|
|
1782
|
-
async createServerNodeContext(storeId, deviceName, deviceType, vendorId, vendorName, productId, productName, serialNumber, uniqueId) {
|
|
1782
|
+
async createServerNodeContext(storeId, deviceName, deviceType, vendorId, vendorName, productId, productName, serialNumber, uniqueId, softwareVersion = 1, softwareVersionString = '1.0.0', hardwareVersion = 1, hardwareVersionString = '1.0.0', productLabel = 'Matter Endpoint', productUrl = 'https://matterbridge.io', configurationVersion = 1) {
|
|
1783
1783
|
const { randomBytes } = await import('node:crypto');
|
|
1784
1784
|
if (!this.matterStorageService)
|
|
1785
1785
|
throw new Error('No storage service initialized');
|
|
@@ -1797,14 +1797,16 @@ export class Matterbridge extends EventEmitter {
|
|
|
1797
1797
|
await storageContext.set('vendorName', vendorName.slice(0, 32));
|
|
1798
1798
|
await storageContext.set('productId', productId);
|
|
1799
1799
|
await storageContext.set('productName', productName.slice(0, 32));
|
|
1800
|
-
await storageContext.set('productLabel',
|
|
1800
|
+
await storageContext.set('productLabel', productLabel.replace(vendorName, '').trim().slice(0, 64));
|
|
1801
|
+
await storageContext.set('productUrl', isValidString(productUrl, 8, 256) && productUrl.startsWith('https://') ? productUrl : 'https://matterbridge.io');
|
|
1801
1802
|
await storageContext.set('nodeLabel', deviceName.slice(0, 32));
|
|
1802
1803
|
await storageContext.set('serialNumber', await storageContext.get('serialNumber', serialNumber ? serialNumber.slice(0, 32) : 'SN' + random));
|
|
1803
1804
|
await storageContext.set('uniqueId', await storageContext.get('uniqueId', uniqueId ? uniqueId.slice(0, 32) : 'UI' + random));
|
|
1804
|
-
await storageContext.set('softwareVersion',
|
|
1805
|
-
await storageContext.set('softwareVersionString', isValidString(
|
|
1806
|
-
await storageContext.set('hardwareVersion',
|
|
1807
|
-
await storageContext.set('hardwareVersionString', isValidString(
|
|
1805
|
+
await storageContext.set('softwareVersion', isValidInteger(softwareVersion, 0, UINT32_MAX) ? softwareVersion : 1);
|
|
1806
|
+
await storageContext.set('softwareVersionString', isValidString(softwareVersionString, 1, 64) ? softwareVersionString : '1.0.0');
|
|
1807
|
+
await storageContext.set('hardwareVersion', isValidInteger(hardwareVersion, 0, UINT16_MAX) ? hardwareVersion : 1);
|
|
1808
|
+
await storageContext.set('hardwareVersionString', isValidString(hardwareVersionString, 1, 64) ? hardwareVersionString : '1.0.0');
|
|
1809
|
+
await storageContext.set('configurationVersion', isValidInteger(configurationVersion, 1, UINT32_MAX) ? configurationVersion : 1);
|
|
1808
1810
|
this.log.debug(`Created server node storage context "${storeId}.persist" for ${storeId}:`);
|
|
1809
1811
|
this.log.debug(`- storeId: ${await storageContext.get('storeId')}`);
|
|
1810
1812
|
this.log.debug(`- deviceName: ${await storageContext.get('deviceName')}`);
|
|
@@ -1814,6 +1816,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1814
1816
|
this.log.debug(`- productId: ${await storageContext.get('productId')}`);
|
|
1815
1817
|
this.log.debug(`- productName: ${await storageContext.get('productName')}`);
|
|
1816
1818
|
this.log.debug(`- productLabel: ${await storageContext.get('productLabel')}`);
|
|
1819
|
+
this.log.debug(`- productUrl: ${await storageContext.get('productUrl')}`);
|
|
1817
1820
|
this.log.debug(`- nodeLabel: ${await storageContext.get('nodeLabel')}`);
|
|
1818
1821
|
this.log.debug(`- serialNumber: ${await storageContext.get('serialNumber')}`);
|
|
1819
1822
|
this.log.debug(`- uniqueId: ${await storageContext.get('uniqueId')}`);
|
|
@@ -1821,6 +1824,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1821
1824
|
this.log.debug(`- softwareVersionString: ${await storageContext.get('softwareVersionString')}`);
|
|
1822
1825
|
this.log.debug(`- hardwareVersion: ${await storageContext.get('hardwareVersion')}`);
|
|
1823
1826
|
this.log.debug(`- hardwareVersionString: ${await storageContext.get('hardwareVersionString')}`);
|
|
1827
|
+
this.log.debug(`- configurationVersion: ${await storageContext.get('configurationVersion')}`);
|
|
1824
1828
|
return storageContext;
|
|
1825
1829
|
}
|
|
1826
1830
|
async createServerNode(storageContext, port = 5540, passcode = 20242025, discriminator = 3850) {
|
|
@@ -1834,6 +1838,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1834
1838
|
this.log.debug(`- productId: ${await storageContext.get('productId')}`);
|
|
1835
1839
|
this.log.debug(`- productName: ${await storageContext.get('productName')}`);
|
|
1836
1840
|
this.log.debug(`- productLabel: ${await storageContext.get('productLabel')}`);
|
|
1841
|
+
this.log.debug(`- productUrl: ${await storageContext.get('productUrl')}`);
|
|
1837
1842
|
this.log.debug(`- nodeLabel: ${await storageContext.get('nodeLabel')}`);
|
|
1838
1843
|
this.log.debug(`- serialNumber: ${await storageContext.get('serialNumber')}`);
|
|
1839
1844
|
this.log.debug(`- uniqueId: ${await storageContext.get('uniqueId')}`);
|
|
@@ -1841,6 +1846,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1841
1846
|
this.log.debug(`- softwareVersionString: ${await storageContext.get('softwareVersionString')}`);
|
|
1842
1847
|
this.log.debug(`- hardwareVersion: ${await storageContext.get('hardwareVersion')}`);
|
|
1843
1848
|
this.log.debug(`- hardwareVersionString: ${await storageContext.get('hardwareVersionString')}`);
|
|
1849
|
+
this.log.debug(`- configurationVersion: ${await storageContext.get('configurationVersion')}`);
|
|
1844
1850
|
if (passcode < 0 || passcode > 99999999) {
|
|
1845
1851
|
this.log.warn(`Invalid passcode ${passcode} for server node ${storeId}. Passcode must be between 0 and 99999999. Generating a random passcode...`);
|
|
1846
1852
|
passcode = PaseClient.generateRandomPasscode(this.environment.get(Crypto));
|
|
@@ -1877,12 +1883,14 @@ export class Matterbridge extends EventEmitter {
|
|
|
1877
1883
|
productId: await storageContext.get('productId'),
|
|
1878
1884
|
productName: await storageContext.get('productName'),
|
|
1879
1885
|
productLabel: await storageContext.get('productLabel'),
|
|
1886
|
+
productUrl: await storageContext.get('productUrl'),
|
|
1880
1887
|
serialNumber: await storageContext.get('serialNumber'),
|
|
1881
1888
|
uniqueId: await storageContext.get('uniqueId'),
|
|
1882
1889
|
softwareVersion: await storageContext.get('softwareVersion'),
|
|
1883
1890
|
softwareVersionString: await storageContext.get('softwareVersionString'),
|
|
1884
1891
|
hardwareVersion: await storageContext.get('hardwareVersion'),
|
|
1885
1892
|
hardwareVersionString: await storageContext.get('hardwareVersionString'),
|
|
1893
|
+
configurationVersion: await storageContext.get('configurationVersion'),
|
|
1886
1894
|
reachable: true,
|
|
1887
1895
|
},
|
|
1888
1896
|
});
|
|
@@ -2002,7 +2010,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2002
2010
|
plugin.locked = true;
|
|
2003
2011
|
plugin.device = device;
|
|
2004
2012
|
this.log.debug(`Creating accessory plugin ${plg}${plugin.name}${db} server node...`);
|
|
2005
|
-
plugin.storageContext = await this.createServerNodeContext(plugin.name, device.deviceName, DeviceTypeId(device.deviceType), device.vendorId, device.vendorName, device.productId, device.productName, device.serialNumber, device.uniqueId);
|
|
2013
|
+
plugin.storageContext = await this.createServerNodeContext(plugin.name, device.deviceName, DeviceTypeId(device.deviceType), device.vendorId, device.vendorName, device.productId, device.productName, device.serialNumber, device.uniqueId, device.softwareVersion, device.softwareVersionString, device.hardwareVersion, device.hardwareVersionString, device.productLabel, device.productUrl, device.configurationVersion);
|
|
2006
2014
|
plugin.serverNode = await this.createServerNode(plugin.storageContext, this.port ? this.port++ : undefined, this.passcode ? this.passcode++ : undefined, this.discriminator ? this.discriminator++ : undefined);
|
|
2007
2015
|
this.log.debug(`Adding ${plg}${plugin.name}${db}:${dev}${device.deviceName}${db} to ${plg}${plugin.name}${db} server node...`);
|
|
2008
2016
|
await plugin.serverNode.add(device);
|
|
@@ -2012,7 +2020,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2012
2020
|
if (!plugin.locked) {
|
|
2013
2021
|
plugin.locked = true;
|
|
2014
2022
|
this.log.debug(`Creating dynamic plugin ${plg}${plugin.name}${db} server node...`);
|
|
2015
|
-
plugin.storageContext = await this.createServerNodeContext(plugin.name, plugin.description, this.aggregatorDeviceType, this.aggregatorVendorId, this.aggregatorVendorName, this.aggregatorProductId, this.aggregatorProductName);
|
|
2023
|
+
plugin.storageContext = await this.createServerNodeContext(plugin.name, plugin.description, this.aggregatorDeviceType, this.aggregatorVendorId, this.aggregatorVendorName, this.aggregatorProductId, this.aggregatorProductName, undefined, undefined, parseVersionString(this.matterbridgeVersion), this.matterbridgeVersion, parseVersionString(this.systemInformation.osRelease), this.systemInformation.osRelease, plugin.description, plugin.homepage ?? 'https://matterbridge.io', 1);
|
|
2016
2024
|
plugin.serverNode = await this.createServerNode(plugin.storageContext, this.port ? this.port++ : undefined, this.passcode ? this.passcode++ : undefined, this.discriminator ? this.discriminator++ : undefined);
|
|
2017
2025
|
this.log.debug(`Creating dynamic plugin ${plg}${plugin.name}${db} aggregator node...`);
|
|
2018
2026
|
plugin.aggregatorNode = await this.createAggregatorNode(plugin.storageContext);
|
|
@@ -2030,7 +2038,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2030
2038
|
device.productId &&
|
|
2031
2039
|
device.productName) {
|
|
2032
2040
|
this.log.debug(`Creating device ${plg}${plugin.name}${db}:${dev}${device.deviceName}${db} server node...`);
|
|
2033
|
-
const context = await this.createServerNodeContext(device.deviceName.replace(/[ .]/g, ''), device.deviceName, DeviceTypeId(device.deviceType), device.vendorId, device.vendorName, device.productId, device.productName, device.serialNumber, device.uniqueId);
|
|
2041
|
+
const context = await this.createServerNodeContext(device.deviceName.replace(/[ .]/g, ''), device.deviceName, DeviceTypeId(device.deviceType), device.vendorId, device.vendorName, device.productId, device.productName, device.serialNumber, device.uniqueId, device.softwareVersion, device.softwareVersionString, device.hardwareVersion, device.hardwareVersionString, device.productLabel, device.productUrl, device.configurationVersion);
|
|
2034
2042
|
device.serverNode = await this.createServerNode(context, this.port ? this.port++ : undefined, this.passcode ? this.passcode++ : undefined, this.discriminator ? this.discriminator++ : undefined);
|
|
2035
2043
|
this.log.debug(`Adding ${plg}${plugin.name}${db}:${dev}${device.deviceName}${db} to server node...`);
|
|
2036
2044
|
await device.serverNode.add(device);
|
|
@@ -57,23 +57,15 @@ export declare const dimmableLight: DeviceTypeDefinition;
|
|
|
57
57
|
export declare const colorTemperatureLight: DeviceTypeDefinition;
|
|
58
58
|
export declare const extendedColorLight: DeviceTypeDefinition;
|
|
59
59
|
export declare const onOffPlugInUnit: DeviceTypeDefinition;
|
|
60
|
-
export declare const onOffOutlet: DeviceTypeDefinition;
|
|
61
60
|
export declare const dimmablePlugInUnit: DeviceTypeDefinition;
|
|
62
|
-
export declare const dimmableOutlet: DeviceTypeDefinition;
|
|
63
61
|
export declare const mountedOnOffControl: DeviceTypeDefinition;
|
|
64
|
-
export declare const onOffMountedSwitch: DeviceTypeDefinition;
|
|
65
62
|
export declare const mountedDimmableLoadControl: DeviceTypeDefinition;
|
|
66
|
-
export declare const dimmableMountedSwitch: DeviceTypeDefinition;
|
|
67
63
|
export declare const pump: DeviceTypeDefinition;
|
|
68
|
-
export declare const pumpDevice: DeviceTypeDefinition;
|
|
69
64
|
export declare const waterValve: DeviceTypeDefinition;
|
|
70
65
|
export declare const irrigationSystem: DeviceTypeDefinition;
|
|
71
66
|
export declare const onOffLightSwitch: DeviceTypeDefinition;
|
|
72
|
-
export declare const onOffSwitch: DeviceTypeDefinition;
|
|
73
67
|
export declare const dimmerSwitch: DeviceTypeDefinition;
|
|
74
|
-
export declare const dimmableSwitch: DeviceTypeDefinition;
|
|
75
68
|
export declare const colorDimmerSwitch: DeviceTypeDefinition;
|
|
76
|
-
export declare const colorTemperatureSwitch: DeviceTypeDefinition;
|
|
77
69
|
export declare const controlBridge: DeviceTypeDefinition;
|
|
78
70
|
export declare const pumpController: DeviceTypeDefinition;
|
|
79
71
|
export declare const genericSwitch: DeviceTypeDefinition;
|
|
@@ -92,24 +84,19 @@ export declare const waterLeakDetector: DeviceTypeDefinition;
|
|
|
92
84
|
export declare const rainSensor: DeviceTypeDefinition;
|
|
93
85
|
export declare const soilSensor: DeviceTypeDefinition;
|
|
94
86
|
export declare const doorLock: DeviceTypeDefinition;
|
|
95
|
-
export declare const doorLockDevice: DeviceTypeDefinition;
|
|
96
87
|
export declare const doorLockController: DeviceTypeDefinition;
|
|
97
88
|
export declare const windowCovering: DeviceTypeDefinition;
|
|
98
|
-
export declare const coverDevice: DeviceTypeDefinition;
|
|
99
89
|
export declare const windowCoveringController: DeviceTypeDefinition;
|
|
100
90
|
export declare const closure: DeviceTypeDefinition;
|
|
101
91
|
export declare const closurePanel: DeviceTypeDefinition;
|
|
102
92
|
export declare const closureController: DeviceTypeDefinition;
|
|
103
93
|
export declare const thermostat: DeviceTypeDefinition;
|
|
104
|
-
export declare const thermostatDevice: DeviceTypeDefinition;
|
|
105
94
|
export declare const fan: DeviceTypeDefinition;
|
|
106
|
-
export declare const fanDevice: DeviceTypeDefinition;
|
|
107
95
|
export declare const airPurifier: DeviceTypeDefinition;
|
|
108
96
|
export declare const thermostatController: DeviceTypeDefinition;
|
|
109
97
|
export declare const basicVideoPlayer: DeviceTypeDefinition;
|
|
110
98
|
export declare const castingVideoPlayer: DeviceTypeDefinition;
|
|
111
99
|
export declare const speaker: DeviceTypeDefinition;
|
|
112
|
-
export declare const speakerDevice: DeviceTypeDefinition;
|
|
113
100
|
export declare const contentApp: DeviceTypeDefinition;
|
|
114
101
|
export declare const castingVideoClient: DeviceTypeDefinition;
|
|
115
102
|
export declare const videoRemoteControl: DeviceTypeDefinition;
|
|
@@ -120,7 +107,6 @@ export declare const roboticVacuumCleaner: DeviceTypeDefinition;
|
|
|
120
107
|
export declare const laundryWasher: DeviceTypeDefinition;
|
|
121
108
|
export declare const refrigerator: DeviceTypeDefinition;
|
|
122
109
|
export declare const roomAirConditioner: DeviceTypeDefinition;
|
|
123
|
-
export declare const airConditioner: DeviceTypeDefinition;
|
|
124
110
|
export declare const temperatureControlledCabinetCooler: DeviceTypeDefinition;
|
|
125
111
|
export declare const temperatureControlledCabinetHeater: DeviceTypeDefinition;
|
|
126
112
|
export declare const dishwasher: DeviceTypeDefinition;
|
|
@@ -279,7 +279,6 @@ export const onOffPlugInUnit = DeviceTypeDefinition({
|
|
|
279
279
|
requiredClientClusters: [],
|
|
280
280
|
optionalClientClusters: [OccupancySensing.id],
|
|
281
281
|
});
|
|
282
|
-
export const onOffOutlet = onOffPlugInUnit;
|
|
283
282
|
export const dimmablePlugInUnit = DeviceTypeDefinition({
|
|
284
283
|
name: 'DimmablePlugInUnit',
|
|
285
284
|
code: 0x010b,
|
|
@@ -291,7 +290,6 @@ export const dimmablePlugInUnit = DeviceTypeDefinition({
|
|
|
291
290
|
requiredClientClusters: [],
|
|
292
291
|
optionalClientClusters: [OccupancySensing.id],
|
|
293
292
|
});
|
|
294
|
-
export const dimmableOutlet = dimmablePlugInUnit;
|
|
295
293
|
export const mountedOnOffControl = DeviceTypeDefinition({
|
|
296
294
|
name: 'MountedOnOffControl',
|
|
297
295
|
code: 0x010f,
|
|
@@ -303,7 +301,6 @@ export const mountedOnOffControl = DeviceTypeDefinition({
|
|
|
303
301
|
requiredClientClusters: [],
|
|
304
302
|
optionalClientClusters: [OccupancySensing.id],
|
|
305
303
|
});
|
|
306
|
-
export const onOffMountedSwitch = mountedOnOffControl;
|
|
307
304
|
export const mountedDimmableLoadControl = DeviceTypeDefinition({
|
|
308
305
|
name: 'MountedDimmableLoadControl',
|
|
309
306
|
code: 0x0110,
|
|
@@ -315,7 +312,6 @@ export const mountedDimmableLoadControl = DeviceTypeDefinition({
|
|
|
315
312
|
requiredClientClusters: [],
|
|
316
313
|
optionalClientClusters: [OccupancySensing.id],
|
|
317
314
|
});
|
|
318
|
-
export const dimmableMountedSwitch = mountedDimmableLoadControl;
|
|
319
315
|
export const pump = DeviceTypeDefinition({
|
|
320
316
|
name: 'Pump',
|
|
321
317
|
code: 0x303,
|
|
@@ -327,7 +323,6 @@ export const pump = DeviceTypeDefinition({
|
|
|
327
323
|
requiredClientClusters: [],
|
|
328
324
|
optionalClientClusters: [TemperatureMeasurement.id, PressureMeasurement.id, FlowMeasurement.id, OccupancySensing.id],
|
|
329
325
|
});
|
|
330
|
-
export const pumpDevice = pump;
|
|
331
326
|
export const waterValve = DeviceTypeDefinition({
|
|
332
327
|
name: 'WaterValve',
|
|
333
328
|
code: 0x42,
|
|
@@ -362,7 +357,6 @@ export const onOffLightSwitch = DeviceTypeDefinition({
|
|
|
362
357
|
requiredClientClusters: [Identify.id, OnOff.id],
|
|
363
358
|
optionalClientClusters: [Groups.id, ScenesManagement.id],
|
|
364
359
|
});
|
|
365
|
-
export const onOffSwitch = onOffLightSwitch;
|
|
366
360
|
export const dimmerSwitch = DeviceTypeDefinition({
|
|
367
361
|
name: 'DimmerSwitch',
|
|
368
362
|
code: 0x0104,
|
|
@@ -374,7 +368,6 @@ export const dimmerSwitch = DeviceTypeDefinition({
|
|
|
374
368
|
requiredClientClusters: [Identify.id, OnOff.id, LevelControl.id],
|
|
375
369
|
optionalClientClusters: [Groups.id, ScenesManagement.id],
|
|
376
370
|
});
|
|
377
|
-
export const dimmableSwitch = dimmerSwitch;
|
|
378
371
|
export const colorDimmerSwitch = DeviceTypeDefinition({
|
|
379
372
|
name: 'ColorDimmerSwitch',
|
|
380
373
|
code: 0x0105,
|
|
@@ -386,7 +379,6 @@ export const colorDimmerSwitch = DeviceTypeDefinition({
|
|
|
386
379
|
requiredClientClusters: [Identify.id, OnOff.id, LevelControl.id, ColorControl.id],
|
|
387
380
|
optionalClientClusters: [Groups.id, ScenesManagement.id],
|
|
388
381
|
});
|
|
389
|
-
export const colorTemperatureSwitch = colorDimmerSwitch;
|
|
390
382
|
export const controlBridge = DeviceTypeDefinition({
|
|
391
383
|
name: 'ControlBridge',
|
|
392
384
|
code: 0x0840,
|
|
@@ -564,7 +556,6 @@ export const doorLock = DeviceTypeDefinition({
|
|
|
564
556
|
requiredServerClusters: [Identify.id, DoorLock.id],
|
|
565
557
|
optionalServerClusters: [],
|
|
566
558
|
});
|
|
567
|
-
export const doorLockDevice = doorLock;
|
|
568
559
|
export const doorLockController = DeviceTypeDefinition({
|
|
569
560
|
name: 'DoorLockController',
|
|
570
561
|
code: 0x00b,
|
|
@@ -585,7 +576,6 @@ export const windowCovering = DeviceTypeDefinition({
|
|
|
585
576
|
requiredServerClusters: [Identify.id, WindowCovering.id],
|
|
586
577
|
optionalServerClusters: [Groups.id],
|
|
587
578
|
});
|
|
588
|
-
export const coverDevice = windowCovering;
|
|
589
579
|
export const windowCoveringController = DeviceTypeDefinition({
|
|
590
580
|
name: 'WindowCoveringController',
|
|
591
581
|
code: 0x203,
|
|
@@ -637,7 +627,6 @@ export const thermostat = DeviceTypeDefinition({
|
|
|
637
627
|
requiredClientClusters: [],
|
|
638
628
|
optionalClientClusters: [FanControl.id, TemperatureMeasurement.id, RelativeHumidityMeasurement.id, OccupancySensing.id, AmbientContextSensing.id],
|
|
639
629
|
});
|
|
640
|
-
export const thermostatDevice = thermostat;
|
|
641
630
|
export const fan = DeviceTypeDefinition({
|
|
642
631
|
name: 'Fan',
|
|
643
632
|
code: 0x2b,
|
|
@@ -647,7 +636,6 @@ export const fan = DeviceTypeDefinition({
|
|
|
647
636
|
requiredServerClusters: [Identify.id, Groups.id, FanControl.id],
|
|
648
637
|
optionalServerClusters: [OnOff.id],
|
|
649
638
|
});
|
|
650
|
-
export const fanDevice = fan;
|
|
651
639
|
export const airPurifier = DeviceTypeDefinition({
|
|
652
640
|
name: 'AirPurifier',
|
|
653
641
|
code: 0x2d,
|
|
@@ -706,7 +694,6 @@ export const speaker = DeviceTypeDefinition({
|
|
|
706
694
|
requiredServerClusters: [OnOff.id, LevelControl.id],
|
|
707
695
|
optionalServerClusters: [],
|
|
708
696
|
});
|
|
709
|
-
export const speakerDevice = speaker;
|
|
710
697
|
export const contentApp = DeviceTypeDefinition({
|
|
711
698
|
name: 'ContentApp',
|
|
712
699
|
code: 0x0024,
|
|
@@ -828,7 +815,6 @@ export const roomAirConditioner = DeviceTypeDefinition({
|
|
|
828
815
|
ActivatedCarbonFilterMonitoring.id,
|
|
829
816
|
],
|
|
830
817
|
});
|
|
831
|
-
export const airConditioner = roomAirConditioner;
|
|
832
818
|
export const temperatureControlledCabinetCooler = DeviceTypeDefinition({
|
|
833
819
|
name: 'TemperatureControlledCabinet',
|
|
834
820
|
code: 0x71,
|
|
@@ -70,11 +70,13 @@ export declare class MatterbridgeEndpoint extends Endpoint {
|
|
|
70
70
|
vendorName: string | undefined;
|
|
71
71
|
productId: number | undefined;
|
|
72
72
|
productName: string | undefined;
|
|
73
|
+
productLabel: string | undefined;
|
|
74
|
+
productUrl: string;
|
|
73
75
|
softwareVersion: number | undefined;
|
|
74
76
|
softwareVersionString: string | undefined;
|
|
75
77
|
hardwareVersion: number | undefined;
|
|
76
78
|
hardwareVersionString: string | undefined;
|
|
77
|
-
|
|
79
|
+
configurationVersion: number;
|
|
78
80
|
tagList: Semtag[] | undefined;
|
|
79
81
|
originalId: string | undefined;
|
|
80
82
|
name: string | undefined;
|
|
@@ -128,7 +130,6 @@ export declare class MatterbridgeEndpoint extends Endpoint {
|
|
|
128
130
|
forEachAttribute(callback: (clusterName: string, clusterId: number, attributeName: string, attributeId: number, attributeValue: boolean | number | bigint | string | object | null | undefined) => void): void;
|
|
129
131
|
addChildDeviceType(endpointName: string, definition: DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>, options?: MatterbridgeEndpointOptions, debug?: boolean): MatterbridgeEndpoint;
|
|
130
132
|
addChildDeviceTypeWithClusterServer(endpointName: string, definition: DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>, serverList?: ClusterId[], options?: MatterbridgeEndpointOptions, debug?: boolean): MatterbridgeEndpoint;
|
|
131
|
-
getChildEndpointByName(endpointName: string): MatterbridgeEndpoint | undefined;
|
|
132
133
|
getChildEndpointById(id: string): MatterbridgeEndpoint | undefined;
|
|
133
134
|
getChildEndpointByOriginalId(originalId: string): MatterbridgeEndpoint | undefined;
|
|
134
135
|
getChildEndpoint(endpointNumber: EndpointNumber): MatterbridgeEndpoint | undefined;
|
|
@@ -139,8 +140,8 @@ export declare class MatterbridgeEndpoint extends Endpoint {
|
|
|
139
140
|
createDefaultPowerSourceBatteryClusterServer(batPercentRemaining?: null | number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: null | number, batReplaceability?: PowerSource.BatReplaceability): this;
|
|
140
141
|
createDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining?: number | null, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number | null, batReplacementDescription?: string, batQuantity?: number, batReplaceability?: PowerSource.BatReplaceability): this;
|
|
141
142
|
createDefaultPowerSourceRechargeableBatteryClusterServer(batPercentRemaining?: number | null, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number | null, batReplaceability?: PowerSource.BatReplaceability): this;
|
|
142
|
-
createDefaultBasicInformationClusterServer(deviceName: string, serialNumber: string, vendorId?: number, vendorName?: string, productId?: number, productName?: string, softwareVersion?: number, softwareVersionString?: string, hardwareVersion?: number, hardwareVersionString?: string): this;
|
|
143
|
-
createDefaultBridgedDeviceBasicInformationClusterServer(deviceName: string, serialNumber: string, vendorId?: number, vendorName?: string, productName?: string, softwareVersion?: number, softwareVersionString?: string, hardwareVersion?: number, hardwareVersionString?: string): this;
|
|
143
|
+
createDefaultBasicInformationClusterServer(deviceName: string, serialNumber: string, vendorId?: number, vendorName?: string, productId?: number, productName?: string, softwareVersion?: number, softwareVersionString?: string, hardwareVersion?: number, hardwareVersionString?: string, productLabel?: string, productUrl?: string, configurationVersion?: number): this;
|
|
144
|
+
createDefaultBridgedDeviceBasicInformationClusterServer(deviceName: string, serialNumber: string, vendorId?: number, vendorName?: string, productName?: string, softwareVersion?: number, softwareVersionString?: string, hardwareVersion?: number, hardwareVersionString?: string, productLabel?: string, productUrl?: string, configurationVersion?: number): this;
|
|
144
145
|
createDefaultPowerTopologyClusterServer(): this;
|
|
145
146
|
createDefaultElectricalEnergyMeasurementClusterServer(energyImported?: number | bigint | null, energyExported?: number | bigint | null): this;
|
|
146
147
|
createDefaultElectricalPowerMeasurementClusterServer(voltage?: number | bigint | null, current?: number | bigint | null, power?: number | bigint | null, frequency?: number | bigint | null): this;
|