matterbridge 1.2.16 → 1.2.18

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/AirQualityCluster.d.ts.map +1 -1
  3. package/dist/AirQualityCluster.js +1 -1
  4. package/dist/AirQualityCluster.js.map +1 -1
  5. package/dist/BridgedDeviceBasicInformationCluster.d.ts +1 -1
  6. package/dist/BridgedDeviceBasicInformationCluster.d.ts.map +1 -1
  7. package/dist/BridgedDeviceBasicInformationCluster.js +1 -1
  8. package/dist/BridgedDeviceBasicInformationCluster.js.map +1 -1
  9. package/dist/TvocCluster.d.ts.map +1 -1
  10. package/dist/TvocCluster.js.map +1 -1
  11. package/dist/cli.js +8 -5
  12. package/dist/cli.js.map +1 -1
  13. package/dist/defaultConfigSchema.d.ts +2 -0
  14. package/dist/defaultConfigSchema.d.ts.map +1 -1
  15. package/dist/defaultConfigSchema.js +74 -0
  16. package/dist/defaultConfigSchema.js.map +1 -1
  17. package/dist/matterbridge.d.ts +3 -6
  18. package/dist/matterbridge.d.ts.map +1 -1
  19. package/dist/matterbridge.js +114 -153
  20. package/dist/matterbridge.js.map +1 -1
  21. package/dist/matterbridgeController.js +1 -1
  22. package/dist/matterbridgeController.js.map +1 -1
  23. package/dist/matterbridgeDevice.d.ts +40 -47
  24. package/dist/matterbridgeDevice.d.ts.map +1 -1
  25. package/dist/matterbridgeDevice.js +119 -67
  26. package/dist/matterbridgeDevice.js.map +1 -1
  27. package/dist/utils.d.ts +19 -1
  28. package/dist/utils.d.ts.map +1 -1
  29. package/dist/utils.js +104 -35
  30. package/dist/utils.js.map +1 -1
  31. package/frontend/build/asset-manifest.json +3 -3
  32. package/frontend/build/index.html +1 -1
  33. package/frontend/build/static/js/{main.b08bfdf4.js → main.5e82a930.js} +3 -3
  34. package/frontend/build/static/js/main.5e82a930.js.map +1 -0
  35. package/package.json +3 -4
  36. package/frontend/build/static/js/main.b08bfdf4.js.map +0 -1
  37. /package/frontend/build/static/js/{main.b08bfdf4.js.LICENSE.txt → main.5e82a930.js.LICENSE.txt} +0 -0
@@ -20,7 +20,7 @@
20
20
  * See the License for the specific language governing permissions and
21
21
  * limitations under the License. *
22
22
  */
23
- import { ClusterServerHandlers, ColorControl, DoorLock, Identify, LevelControl, OccupancySensing, OnOff, PowerSource, Thermostat, TimeSync, WindowCovering } from '@project-chip/matter-node.js/cluster';
23
+ import { ClusterServerHandlers, ColorControl, DoorLock, Identify, LevelControl, ModeSelect, OccupancySensing, OnOff, PowerSource, Thermostat, TimeSync, WindowCovering } from '@project-chip/matter-node.js/cluster';
24
24
  import { ClusterId, EndpointNumber, VendorId } from '@project-chip/matter-node.js/datatype';
25
25
  import { Device, DeviceTypeDefinition, Endpoint, EndpointOptions } from '@project-chip/matter-node.js/device';
26
26
  import { AtLeastOne } from '@project-chip/matter-node.js/util';
@@ -28,8 +28,9 @@ 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
- type MatterbridgeDeviceCommands = {
33
+ interface MatterbridgeDeviceCommands {
33
34
  identify: MakeMandatory<ClusterServerHandlers<typeof Identify.Complete>['identify']>;
34
35
  on: MakeMandatory<ClusterServerHandlers<typeof OnOff.Complete>['on']>;
35
36
  off: MakeMandatory<ClusterServerHandlers<typeof OnOff.Complete>['off']>;
@@ -52,7 +53,9 @@ type MatterbridgeDeviceCommands = {
52
53
  lockDoor: MakeMandatory<ClusterServerHandlers<typeof DoorLock.Complete>['lockDoor']>;
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;
@@ -114,6 +117,14 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
114
117
  * @returns {Endpoint} - The child endpoint that was added.
115
118
  */
116
119
  addChildDeviceTypeWithClusterServer(endpointName: string, deviceTypes: AtLeastOne<DeviceTypeDefinition>, includeServerList: ClusterId[]): Endpoint;
120
+ /**
121
+ * Adds cluster servers to the specified endpoint based on the provided server list.
122
+ *
123
+ * @param {Endpoint} endpoint - The endpoint to add cluster servers to.
124
+ * @param {ClusterId[]} includeServerList - The list of cluster IDs to include.
125
+ * @returns void
126
+ */
127
+ addClusterServerFromList(endpoint: Endpoint, includeServerList: ClusterId[]): void;
117
128
  /**
118
129
  * Retrieves a child endpoint by its name.
119
130
  *
@@ -141,7 +152,7 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
141
152
  * @param pluginName - The name of the plugin.
142
153
  * @returns The serialized Matterbridge device object.
143
154
  */
144
- serialize(pluginName: string): SerializedMatterbridgeDevice;
155
+ serialize(pluginName: string): SerializedMatterbridgeDevice | undefined;
145
156
  /**
146
157
  * Returns a default static EveHistoryClusterServer object with the specified voltage, current, power, and consumption values.
147
158
  * This shows up in HA as a static sensor!
@@ -432,8 +443,8 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
432
443
  readonly reachable: import("@project-chip/matter-node.js/cluster").Attribute<boolean, any>;
433
444
  readonly uniqueId: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<string, any>;
434
445
  readonly productAppearance: import("@project-chip/matter-node.js/cluster").OptionalFixedAttribute<import("@project-chip/matter.js/tlv").TypeFromFields<{
435
- finish: import("@project-chip/matter.js/tlv").FieldType<import("./BridgedDeviceBasicInformationCluster.js").BridgedDeviceBasicInformation.ProductFinish>;
436
- primaryColor: import("@project-chip/matter.js/tlv").FieldType<import("./BridgedDeviceBasicInformationCluster.js").BridgedDeviceBasicInformation.Color | null>;
446
+ finish: import("@project-chip/matter.js/tlv").FieldType<BridgedDeviceBasicInformation.ProductFinish>;
447
+ primaryColor: import("@project-chip/matter.js/tlv").FieldType<BridgedDeviceBasicInformation.Color | null>;
437
448
  }>, any>;
438
449
  }, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{}>>, {
439
450
  readonly startUp: import("@project-chip/matter-node.js/cluster").OptionalEvent<import("@project-chip/matter.js/tlv").TypeFromFields<{
@@ -536,12 +547,7 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
536
547
  readonly acVoltageDivisor: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<number, any>;
537
548
  readonly acCurrentMultiplier: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<number, any>;
538
549
  readonly acCurrentDivisor: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<number, any>;
539
- readonly acPowerMultiplier: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<number, any>; /**
540
- * Represents a Matterbridge device.
541
- * @constructor
542
- * @param {DeviceTypeDefinition} definition - The definition of the device.
543
- * @param {EndpointOptions} [options={}] - The options for the device.
544
- */
550
+ readonly acPowerMultiplier: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<number, any>;
545
551
  readonly acPowerDivisor: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<number, any>;
546
552
  readonly dcOverloadAlarmsMask: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<number, any>;
547
553
  readonly dcVoltageOverload: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<number, any>;
@@ -963,30 +969,30 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
963
969
  /**
964
970
  * Sets the window covering target position as the current position and stops the movement.
965
971
  */
966
- setWindowCoveringTargetAsCurrentAndStopped(): void;
972
+ setWindowCoveringTargetAsCurrentAndStopped(endpoint?: Endpoint): void;
967
973
  /**
968
974
  * Sets the current and target status of a window covering.
969
975
  * @param current - The current position of the window covering.
970
976
  * @param target - The target position of the window covering.
971
977
  * @param status - The movement status of the window covering.
972
978
  */
973
- setWindowCoveringCurrentTargetStatus(current: number, target: number, status: WindowCovering.MovementStatus): void;
979
+ setWindowCoveringCurrentTargetStatus(current: number, target: number, status: WindowCovering.MovementStatus, endpoint?: Endpoint): void;
974
980
  /**
975
981
  * Sets the status of the window covering.
976
982
  * @param {WindowCovering.MovementStatus} status - The movement status to set.
977
983
  */
978
- setWindowCoveringStatus(status: WindowCovering.MovementStatus): void;
984
+ setWindowCoveringStatus(status: WindowCovering.MovementStatus, endpoint?: Endpoint): void;
979
985
  /**
980
986
  * Retrieves the status of the window covering.
981
987
  * @returns The global operational status of the window covering.
982
988
  */
983
- getWindowCoveringStatus(): WindowCovering.MovementStatus | undefined;
989
+ getWindowCoveringStatus(endpoint?: Endpoint): WindowCovering.MovementStatus | undefined;
984
990
  /**
985
991
  * Sets the target and current position of the window covering.
986
992
  *
987
993
  * @param position - The position to set, specified as a number.
988
994
  */
989
- setWindowCoveringTargetAndCurrentPosition(position: number): void;
995
+ setWindowCoveringTargetAndCurrentPosition(position: number, endpoint?: Endpoint): void;
990
996
  /**
991
997
  * Get a default door lock cluster server.
992
998
  *
@@ -1156,6 +1162,23 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
1156
1162
  * This method adds a cluster server with default switch features and configurations.
1157
1163
  */
1158
1164
  createDefaultSwitchClusterServer(): void;
1165
+ getDefaultModeSelectClusterServer(description: string, supportedModes: ModeSelect.ModeOptionStruct[], currentMode?: number, startUpMode?: number): import("@project-chip/matter-node.js/cluster").ClusterServerObj<import("@project-chip/matter-node.js/util").Merge<{
1166
+ readonly description: import("@project-chip/matter-node.js/cluster").FixedAttribute<string, any>;
1167
+ readonly standardNamespace: import("@project-chip/matter-node.js/cluster").FixedAttribute<number | null, any>;
1168
+ readonly supportedModes: import("@project-chip/matter-node.js/cluster").FixedAttribute<import("@project-chip/matter.js/tlv").TypeFromFields<{
1169
+ label: import("@project-chip/matter.js/tlv").FieldType<string>;
1170
+ mode: import("@project-chip/matter.js/tlv").FieldType<number>;
1171
+ semanticTags: import("@project-chip/matter.js/tlv").FieldType<import("@project-chip/matter.js/tlv").TypeFromFields<{
1172
+ mfgCode: import("@project-chip/matter.js/tlv").FieldType<VendorId | null>;
1173
+ value: import("@project-chip/matter.js/tlv").FieldType<number>;
1174
+ }>[]>;
1175
+ }>[], any>;
1176
+ readonly currentMode: import("@project-chip/matter-node.js/cluster").Attribute<number, any>;
1177
+ readonly startUpMode: import("@project-chip/matter-node.js/cluster").OptionalWritableAttribute<number | null, any>;
1178
+ }, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
1179
+ readonly onOff: import("@project-chip/matter.js/schema").BitFlag;
1180
+ }>>, {}>;
1181
+ createDefaultModeSelectClusterServer(endpoint?: Endpoint): void;
1159
1182
  /**
1160
1183
  * Get a default occupancy sensing cluster server.
1161
1184
  *
@@ -1389,12 +1412,6 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
1389
1412
  readonly measurementMedium: import("@project-chip/matter-node.js/cluster").OptionalAttribute<TvocMeasurement.MeasurementMediumType, any>;
1390
1413
  readonly levelValue: import("@project-chip/matter-node.js/cluster").OptionalAttribute<TvocMeasurement.LevelValueType, any>;
1391
1414
  }, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
1392
- /**
1393
- * Adds a device type to the list of device types.
1394
- * If the device type is not already present in the list, it will be added.
1395
- *
1396
- * @param {DeviceTypeDefinition} deviceType - The device type to add.
1397
- */
1398
1415
  readonly numericMeasurement: import("@project-chip/matter.js/schema").BitFlag;
1399
1416
  readonly levelIndication: import("@project-chip/matter.js/schema").BitFlag;
1400
1417
  readonly mediumLevel: import("@project-chip/matter.js/schema").BitFlag;
@@ -1402,12 +1419,6 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
1402
1419
  readonly peakMeasurement: import("@project-chip/matter.js/schema").BitFlag;
1403
1420
  readonly averageMeasurement: import("@project-chip/matter.js/schema").BitFlag;
1404
1421
  }>>, "measuredValue" | "minMeasuredValue" | "maxMeasuredValue" | "peakMeasuredValue" | "peakMeasuredValueWindow" | "averageMeasuredValue" | "averageMeasuredValueWindow" | "uncertainty" | "measurementUnit" | "measurementMedium" | "levelValue" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
1405
- /**
1406
- * Adds a device type to the list of device types.
1407
- * If the device type is not already present in the list, it will be added.
1408
- *
1409
- * @param {DeviceTypeDefinition} deviceType - The device type to add.
1410
- */
1411
1422
  readonly numericMeasurement: import("@project-chip/matter.js/schema").BitFlag;
1412
1423
  readonly levelIndication: import("@project-chip/matter.js/schema").BitFlag;
1413
1424
  readonly mediumLevel: import("@project-chip/matter.js/schema").BitFlag;
@@ -1427,12 +1438,6 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
1427
1438
  readonly measurementMedium: import("@project-chip/matter-node.js/cluster").OptionalAttribute<TvocMeasurement.MeasurementMediumType, any>;
1428
1439
  readonly levelValue: import("@project-chip/matter-node.js/cluster").OptionalAttribute<TvocMeasurement.LevelValueType, any>;
1429
1440
  }, "measuredValue" | "minMeasuredValue" | "maxMeasuredValue" | "peakMeasuredValue" | "peakMeasuredValueWindow" | "averageMeasuredValue" | "averageMeasuredValueWindow" | "uncertainty" | "measurementUnit" | "measurementMedium" | "levelValue" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
1430
- /**
1431
- * Adds a device type to the list of device types.
1432
- * If the device type is not already present in the list, it will be added.
1433
- *
1434
- * @param {DeviceTypeDefinition} deviceType - The device type to add.
1435
- */
1436
1441
  readonly numericMeasurement: import("@project-chip/matter.js/schema").BitFlag;
1437
1442
  readonly levelIndication: import("@project-chip/matter.js/schema").BitFlag;
1438
1443
  readonly mediumLevel: import("@project-chip/matter.js/schema").BitFlag;
@@ -1452,12 +1457,6 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
1452
1457
  readonly measurementMedium: import("@project-chip/matter-node.js/cluster").OptionalAttribute<TvocMeasurement.MeasurementMediumType, any>;
1453
1458
  readonly levelValue: import("@project-chip/matter-node.js/cluster").OptionalAttribute<TvocMeasurement.LevelValueType, any>;
1454
1459
  }, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
1455
- /**
1456
- * Adds a device type to the list of device types.
1457
- * If the device type is not already present in the list, it will be added.
1458
- *
1459
- * @param {DeviceTypeDefinition} deviceType - The device type to add.
1460
- */
1461
1460
  readonly numericMeasurement: import("@project-chip/matter.js/schema").BitFlag;
1462
1461
  readonly levelIndication: import("@project-chip/matter.js/schema").BitFlag;
1463
1462
  readonly mediumLevel: import("@project-chip/matter.js/schema").BitFlag;
@@ -1465,12 +1464,6 @@ export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
1465
1464
  readonly peakMeasurement: import("@project-chip/matter.js/schema").BitFlag;
1466
1465
  readonly averageMeasurement: import("@project-chip/matter.js/schema").BitFlag;
1467
1466
  }>>, "measuredValue" | "minMeasuredValue" | "maxMeasuredValue" | "peakMeasuredValue" | "peakMeasuredValueWindow" | "averageMeasuredValue" | "averageMeasuredValueWindow" | "uncertainty" | "measurementUnit" | "measurementMedium" | "levelValue" | keyof import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
1468
- /**
1469
- * Adds a device type to the list of device types.
1470
- * If the device type is not already present in the list, it will be added.
1471
- *
1472
- * @param {DeviceTypeDefinition} deviceType - The device type to add.
1473
- */
1474
1467
  readonly numericMeasurement: import("@project-chip/matter.js/schema").BitFlag;
1475
1468
  readonly levelIndication: import("@project-chip/matter.js/schema").BitFlag;
1476
1469
  readonly mediumLevel: import("@project-chip/matter.js/schema").BitFlag;
@@ -1 +1 @@
1
- {"version":3,"file":"matterbridgeDevice.d.ts","sourceRoot":"","sources":["../src/matterbridgeDev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issions and
21
21
  * limitations under the License. *
22
22
  */
23
- import { BasicInformationCluster, BooleanState, BooleanStateCluster,
24
- // BridgedDeviceBasicInformationCluster,
25
- ClusterServer, ColorControl, ColorControlCluster, DoorLock, DoorLockCluster, ElectricalMeasurement, ElectricalMeasurementCluster, FixedLabelCluster, FlowMeasurement, FlowMeasurementCluster, Groups, Identify, IdentifyCluster, IlluminanceMeasurement, IlluminanceMeasurementCluster, LevelControl, LevelControlCluster, OccupancySensing, OccupancySensingCluster, OnOff, OnOffCluster, PowerSource, PowerSourceCluster, PowerSourceConfigurationCluster, PressureMeasurement, PressureMeasurementCluster, RelativeHumidityMeasurement, RelativeHumidityMeasurementCluster, Scenes, Switch, SwitchCluster, TemperatureMeasurement, TemperatureMeasurementCluster, Thermostat, ThermostatCluster, ThreadNetworkDiagnostics, ThreadNetworkDiagnosticsCluster, TimeSync, TimeSyncCluster, WindowCovering, WindowCoveringCluster, createDefaultGroupsClusterServer, createDefaultScenesClusterServer, getClusterNameById, } from '@project-chip/matter-node.js/cluster';
23
+ import { BasicInformationCluster, BooleanState, BooleanStateCluster, ClusterServer, ColorControl, ColorControlCluster, DoorLock, DoorLockCluster, ElectricalMeasurement, ElectricalMeasurementCluster, FixedLabelCluster, FlowMeasurement, FlowMeasurementCluster, Groups, Identify, IdentifyCluster, IlluminanceMeasurement, IlluminanceMeasurementCluster, LevelControl, LevelControlCluster, ModeSelectCluster, OccupancySensing, OccupancySensingCluster, OnOff, OnOffCluster, PowerSource, PowerSourceCluster, PowerSourceConfigurationCluster, PressureMeasurement, PressureMeasurementCluster, RelativeHumidityMeasurement, RelativeHumidityMeasurementCluster, Scenes, Switch, SwitchCluster, TemperatureMeasurement, TemperatureMeasurementCluster, Thermostat, ThermostatCluster, ThreadNetworkDiagnostics, ThreadNetworkDiagnosticsCluster, TimeSync, TimeSyncCluster, WindowCovering, WindowCoveringCluster, createDefaultGroupsClusterServer, createDefaultScenesClusterServer, getClusterNameById, } from '@project-chip/matter-node.js/cluster';
26
24
  import { EndpointNumber, VendorId } from '@project-chip/matter-node.js/datatype';
27
25
  import { Device, DeviceClasses, DeviceTypeDefinition, Endpoint } from '@project-chip/matter-node.js/device';
28
26
  import { extendPublicHandlerMethods } from '@project-chip/matter-node.js/util';
@@ -31,8 +29,24 @@ import { AirQuality, AirQualityCluster } from './AirQualityCluster.js';
31
29
  import { AnsiLogger, db, hk, zb } from 'node-ansi-logger';
32
30
  import { createHash } from 'crypto';
33
31
  import { TvocMeasurement, TvocMeasurementCluster } from './TvocCluster.js';
34
- import { BridgedDeviceBasicInformationCluster } from './BridgedDeviceBasicInformationCluster.js';
32
+ import { BridgedDeviceBasicInformation, BridgedDeviceBasicInformationCluster } from './BridgedDeviceBasicInformationCluster.js';
35
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
+ });
36
50
  export const onOffSwitch = DeviceTypeDefinition({
37
51
  name: 'MA-onoffswitch',
38
52
  code: 0x0103,
@@ -122,32 +136,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
122
136
  includeServerList.forEach((clusterId) => {
123
137
  this.log.debug(`- with cluster: ${hk}${clusterId}${db}-${hk}${getClusterNameById(clusterId)}${db}`);
124
138
  });
125
- if (includeServerList.includes(Identify.Cluster.id))
126
- this.addClusterServer(this.getDefaultIdentifyClusterServer());
127
- if (includeServerList.includes(Groups.Cluster.id))
128
- this.addClusterServer(this.getDefaultGroupsClusterServer());
129
- if (includeServerList.includes(Scenes.Cluster.id))
130
- this.addClusterServer(this.getDefaultScenesClusterServer());
131
- if (includeServerList.includes(OnOff.Cluster.id))
132
- this.addClusterServer(this.getDefaultOnOffClusterServer());
133
- if (includeServerList.includes(TemperatureMeasurement.Cluster.id))
134
- this.addClusterServer(this.getDefaultTemperatureMeasurementClusterServer());
135
- if (includeServerList.includes(RelativeHumidityMeasurement.Cluster.id))
136
- this.addClusterServer(this.getDefaultRelativeHumidityMeasurementClusterServer());
137
- if (includeServerList.includes(PressureMeasurement.Cluster.id))
138
- this.addClusterServer(this.getDefaultPressureMeasurementClusterServer());
139
- if (includeServerList.includes(FlowMeasurement.Cluster.id))
140
- this.addClusterServer(this.getDefaultFlowMeasurementClusterServer());
141
- if (includeServerList.includes(BooleanState.Cluster.id))
142
- this.addClusterServer(this.getDefaultBooleanStateClusterServer());
143
- if (includeServerList.includes(OccupancySensing.Cluster.id))
144
- this.addClusterServer(this.getDefaultOccupancySensingClusterServer());
145
- if (includeServerList.includes(IlluminanceMeasurement.Cluster.id))
146
- this.addClusterServer(this.getDefaultIlluminanceMeasurementClusterServer());
147
- if (includeServerList.includes(EveHistory.Cluster.id))
148
- this.addClusterServer(this.getDefaultStaticEveHistoryClusterServer());
149
- if (includeServerList.includes(ElectricalMeasurement.Cluster.id))
150
- this.addClusterServer(this.getDefaultElectricalMeasurementClusterServer());
139
+ this.addClusterServerFromList(this, includeServerList);
151
140
  }
152
141
  /**
153
142
  * Adds a child device type with cluster server.
@@ -170,34 +159,62 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
170
159
  includeServerList.forEach((clusterId) => {
171
160
  this.log.debug(`- with cluster: ${hk}${clusterId}${db}-${hk}${getClusterNameById(clusterId)}${db}`);
172
161
  });
162
+ this.addClusterServerFromList(child, includeServerList);
163
+ this.addChildEndpoint(child);
164
+ return child;
165
+ }
166
+ /**
167
+ * Adds cluster servers to the specified endpoint based on the provided server list.
168
+ *
169
+ * @param {Endpoint} endpoint - The endpoint to add cluster servers to.
170
+ * @param {ClusterId[]} includeServerList - The list of cluster IDs to include.
171
+ * @returns void
172
+ */
173
+ addClusterServerFromList(endpoint, includeServerList) {
173
174
  if (includeServerList.includes(Identify.Cluster.id))
174
- child.addClusterServer(this.getDefaultIdentifyClusterServer());
175
+ endpoint.addClusterServer(this.getDefaultIdentifyClusterServer());
175
176
  if (includeServerList.includes(Groups.Cluster.id))
176
- child.addClusterServer(this.getDefaultGroupsClusterServer());
177
+ endpoint.addClusterServer(this.getDefaultGroupsClusterServer());
177
178
  if (includeServerList.includes(Scenes.Cluster.id))
178
- child.addClusterServer(this.getDefaultScenesClusterServer());
179
+ endpoint.addClusterServer(this.getDefaultScenesClusterServer());
179
180
  if (includeServerList.includes(OnOff.Cluster.id))
180
- child.addClusterServer(this.getDefaultOnOffClusterServer());
181
+ endpoint.addClusterServer(this.getDefaultOnOffClusterServer());
182
+ if (includeServerList.includes(LevelControl.Cluster.id))
183
+ endpoint.addClusterServer(this.getDefaultLevelControlClusterServer());
184
+ if (includeServerList.includes(ColorControl.Cluster.id))
185
+ endpoint.addClusterServer(this.getDefaultColorControlClusterServer());
186
+ if (includeServerList.includes(Switch.Cluster.id))
187
+ endpoint.addClusterServer(this.getDefaultSwitchClusterServer());
188
+ if (includeServerList.includes(DoorLock.Cluster.id))
189
+ endpoint.addClusterServer(this.getDefaultDoorLockClusterServer());
190
+ if (includeServerList.includes(Thermostat.Cluster.id))
191
+ endpoint.addClusterServer(this.getDefaultThermostatClusterServer());
192
+ if (includeServerList.includes(TimeSync.Cluster.id))
193
+ endpoint.addClusterServer(this.getDefaultTimeSyncClusterServer());
194
+ if (includeServerList.includes(WindowCovering.Cluster.id))
195
+ endpoint.addClusterServer(this.getDefaultWindowCoveringClusterServer());
181
196
  if (includeServerList.includes(TemperatureMeasurement.Cluster.id))
182
- child.addClusterServer(this.getDefaultTemperatureMeasurementClusterServer());
197
+ endpoint.addClusterServer(this.getDefaultTemperatureMeasurementClusterServer());
183
198
  if (includeServerList.includes(RelativeHumidityMeasurement.Cluster.id))
184
- child.addClusterServer(this.getDefaultRelativeHumidityMeasurementClusterServer());
199
+ endpoint.addClusterServer(this.getDefaultRelativeHumidityMeasurementClusterServer());
185
200
  if (includeServerList.includes(PressureMeasurement.Cluster.id))
186
- child.addClusterServer(this.getDefaultPressureMeasurementClusterServer());
201
+ endpoint.addClusterServer(this.getDefaultPressureMeasurementClusterServer());
187
202
  if (includeServerList.includes(FlowMeasurement.Cluster.id))
188
- child.addClusterServer(this.getDefaultFlowMeasurementClusterServer());
203
+ endpoint.addClusterServer(this.getDefaultFlowMeasurementClusterServer());
189
204
  if (includeServerList.includes(BooleanState.Cluster.id))
190
- child.addClusterServer(this.getDefaultBooleanStateClusterServer());
205
+ endpoint.addClusterServer(this.getDefaultBooleanStateClusterServer());
191
206
  if (includeServerList.includes(OccupancySensing.Cluster.id))
192
- child.addClusterServer(this.getDefaultOccupancySensingClusterServer());
207
+ endpoint.addClusterServer(this.getDefaultOccupancySensingClusterServer());
193
208
  if (includeServerList.includes(IlluminanceMeasurement.Cluster.id))
194
- child.addClusterServer(this.getDefaultIlluminanceMeasurementClusterServer());
209
+ endpoint.addClusterServer(this.getDefaultIlluminanceMeasurementClusterServer());
195
210
  if (includeServerList.includes(EveHistory.Cluster.id))
196
- child.addClusterServer(this.getDefaultStaticEveHistoryClusterServer());
211
+ endpoint.addClusterServer(this.getDefaultStaticEveHistoryClusterServer());
197
212
  if (includeServerList.includes(ElectricalMeasurement.Cluster.id))
198
- child.addClusterServer(this.getDefaultElectricalMeasurementClusterServer());
199
- this.addChildEndpoint(child);
200
- return child;
213
+ endpoint.addClusterServer(this.getDefaultElectricalMeasurementClusterServer());
214
+ if (includeServerList.includes(AirQuality.Cluster.id))
215
+ endpoint.addClusterServer(this.getDefaultAirQualityClusterServer());
216
+ if (includeServerList.includes(TvocMeasurement.Cluster.id))
217
+ endpoint.addClusterServer(this.getDefaultTvocMeasurementClusterServer());
201
218
  }
202
219
  /**
203
220
  * Retrieves a child endpoint by its name.
@@ -249,6 +266,8 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
249
266
  * @returns The serialized Matterbridge device object.
250
267
  */
251
268
  serialize(pluginName) {
269
+ if (!this.serialNumber || !this.deviceName || !this.uniqueId)
270
+ return;
252
271
  const serialized = {
253
272
  pluginName,
254
273
  serialNumber: this.serialNumber,
@@ -915,7 +934,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
915
934
  moveToLevel: async ({ request, attributes }) => {
916
935
  // eslint-disable-next-line no-console
917
936
  console.log('moveToLevel request:', request, 'attributes.currentLevel:', attributes.currentLevel.getLocal());
918
- //attributes.currentLevel.setLocal(request.level);
937
+ // attributes.currentLevel.setLocal(request.level);
919
938
  await this.commandHandler.executeHandler('moveToLevel', { request: request, attributes: attributes });
920
939
  },
921
940
  move: async () => {
@@ -933,7 +952,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
933
952
  moveToLevelWithOnOff: async ({ request, attributes }) => {
934
953
  // eslint-disable-next-line no-console
935
954
  console.log('moveToLevelWithOnOff request:', request, 'attributes.currentLevel:', attributes.currentLevel.getLocal());
936
- //attributes.currentLevel.setLocal(request.level);
955
+ // attributes.currentLevel.setLocal(request.level);
937
956
  await this.commandHandler.executeHandler('moveToLevelWithOnOff', { request: request, attributes: attributes });
938
957
  },
939
958
  moveWithOnOff: async () => {
@@ -985,7 +1004,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
985
1004
  moveToHue: async ({ request: request, attributes: attributes }) => {
986
1005
  // eslint-disable-next-line no-console
987
1006
  console.log('Command moveToHue request:', request, 'attributes.currentHue:', attributes.currentHue.getLocal());
988
- //attributes.currentHue.setLocal(request.hue);
1007
+ // attributes.currentHue.setLocal(request.hue);
989
1008
  this.commandHandler.executeHandler('moveToHue', { request: request, attributes: attributes });
990
1009
  },
991
1010
  moveHue: async () => {
@@ -999,7 +1018,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
999
1018
  moveToSaturation: async ({ request: request, attributes: attributes }) => {
1000
1019
  // eslint-disable-next-line no-console
1001
1020
  console.log('Command moveToSaturation request:', request, 'attributes.currentSaturation:', attributes.currentSaturation.getLocal());
1002
- //attributes.currentSaturation.setLocal(request.saturation);
1021
+ // attributes.currentSaturation.setLocal(request.saturation);
1003
1022
  this.commandHandler.executeHandler('moveToSaturation', { request: request, attributes: attributes });
1004
1023
  },
1005
1024
  moveSaturation: async () => {
@@ -1013,8 +1032,8 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
1013
1032
  moveToHueAndSaturation: async ({ request: request, attributes: attributes }) => {
1014
1033
  // eslint-disable-next-line no-console
1015
1034
  console.log('Command moveToHueAndSaturation request:', request, 'attributes.currentHue:', attributes.currentHue.getLocal(), 'attributes.currentSaturation:', attributes.currentSaturation.getLocal());
1016
- //attributes.currentHue.setLocal(request.hue);
1017
- //attributes.currentSaturation.setLocal(request.saturation);
1035
+ // attributes.currentHue.setLocal(request.hue);
1036
+ // attributes.currentSaturation.setLocal(request.saturation);
1018
1037
  this.commandHandler.executeHandler('moveToHueAndSaturation', { request: request, attributes: attributes });
1019
1038
  },
1020
1039
  stopMoveStep: async () => {
@@ -1024,7 +1043,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
1024
1043
  moveToColorTemperature: async ({ request: request, attributes: attributes }) => {
1025
1044
  // eslint-disable-next-line no-console
1026
1045
  console.log('Command moveToColorTemperature request:', request, 'attributes.colorTemperatureMireds:', attributes.colorTemperatureMireds.getLocal());
1027
- //attributes.colorTemperatureMireds.setLocal(request.colorTemperatureMireds);
1046
+ // attributes.colorTemperatureMireds.setLocal(request.colorTemperatureMireds);
1028
1047
  this.commandHandler.executeHandler('moveToColorTemperature', { request: request, attributes: attributes });
1029
1048
  },
1030
1049
  moveColorTemperature: async () => {
@@ -1108,8 +1127,10 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
1108
1127
  /**
1109
1128
  * Sets the window covering target position as the current position and stops the movement.
1110
1129
  */
1111
- setWindowCoveringTargetAsCurrentAndStopped() {
1112
- const windowCoveringCluster = this.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.AbsolutePosition));
1130
+ setWindowCoveringTargetAsCurrentAndStopped(endpoint) {
1131
+ if (!endpoint)
1132
+ endpoint = this;
1133
+ const windowCoveringCluster = endpoint.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.AbsolutePosition));
1113
1134
  if (windowCoveringCluster) {
1114
1135
  const position = windowCoveringCluster.getCurrentPositionLiftPercent100thsAttribute();
1115
1136
  if (position !== null) {
@@ -1121,7 +1142,7 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
1121
1142
  });
1122
1143
  }
1123
1144
  // eslint-disable-next-line no-console
1124
- // 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.`);
1125
1146
  }
1126
1147
  }
1127
1148
  /**
@@ -1130,8 +1151,10 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
1130
1151
  * @param target - The target position of the window covering.
1131
1152
  * @param status - The movement status of the window covering.
1132
1153
  */
1133
- setWindowCoveringCurrentTargetStatus(current, target, status) {
1134
- const windowCoveringCluster = this.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.AbsolutePosition));
1154
+ setWindowCoveringCurrentTargetStatus(current, target, status, endpoint) {
1155
+ if (!endpoint)
1156
+ endpoint = this;
1157
+ const windowCoveringCluster = endpoint.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.AbsolutePosition));
1135
1158
  if (windowCoveringCluster) {
1136
1159
  windowCoveringCluster.setCurrentPositionLiftPercent100thsAttribute(current);
1137
1160
  windowCoveringCluster.setTargetPositionLiftPercent100thsAttribute(target);
@@ -1142,31 +1165,35 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
1142
1165
  });
1143
1166
  }
1144
1167
  // eslint-disable-next-line no-console
1145
- // console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${current}, targetPositionLiftPercent100ths: ${target} and operationalStatus: ${status}.`);
1168
+ console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${current}, targetPositionLiftPercent100ths: ${target} and operationalStatus: ${status}.`);
1146
1169
  }
1147
1170
  /**
1148
1171
  * Sets the status of the window covering.
1149
1172
  * @param {WindowCovering.MovementStatus} status - The movement status to set.
1150
1173
  */
1151
- setWindowCoveringStatus(status) {
1152
- const windowCovering = this.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.AbsolutePosition));
1174
+ setWindowCoveringStatus(status, endpoint) {
1175
+ if (!endpoint)
1176
+ endpoint = this;
1177
+ const windowCovering = endpoint.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.AbsolutePosition));
1153
1178
  if (!windowCovering)
1154
1179
  return;
1155
1180
  windowCovering.setOperationalStatusAttribute({ global: status, lift: status, tilt: 0 });
1156
1181
  // eslint-disable-next-line no-console
1157
- // console.log(`Set WindowCovering operationalStatus: ${status}`);
1182
+ console.log(`Set WindowCovering operationalStatus: ${status}`);
1158
1183
  }
1159
1184
  /**
1160
1185
  * Retrieves the status of the window covering.
1161
1186
  * @returns The global operational status of the window covering.
1162
1187
  */
1163
- getWindowCoveringStatus() {
1164
- const windowCovering = this.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.AbsolutePosition));
1188
+ getWindowCoveringStatus(endpoint) {
1189
+ if (!endpoint)
1190
+ endpoint = this;
1191
+ const windowCovering = endpoint.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.AbsolutePosition));
1165
1192
  if (!windowCovering)
1166
1193
  return undefined;
1167
1194
  const status = windowCovering.getOperationalStatusAttribute();
1168
1195
  // eslint-disable-next-line no-console
1169
- // console.log(`Get WindowCovering operationalStatus: ${status.global}`);
1196
+ console.log(`Get WindowCovering operationalStatus: ${status.global}`);
1170
1197
  return status.global;
1171
1198
  }
1172
1199
  /**
@@ -1174,14 +1201,16 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
1174
1201
  *
1175
1202
  * @param position - The position to set, specified as a number.
1176
1203
  */
1177
- setWindowCoveringTargetAndCurrentPosition(position) {
1178
- const windowCovering = this.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift));
1204
+ setWindowCoveringTargetAndCurrentPosition(position, endpoint) {
1205
+ if (!endpoint)
1206
+ endpoint = this;
1207
+ const windowCovering = endpoint.getClusterServer(WindowCoveringCluster.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift));
1179
1208
  if (!windowCovering)
1180
1209
  return;
1181
1210
  windowCovering.setCurrentPositionLiftPercent100thsAttribute(position);
1182
1211
  windowCovering.setTargetPositionLiftPercent100thsAttribute(position);
1183
1212
  // eslint-disable-next-line no-console
1184
- // console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${position} and targetPositionLiftPercent100ths: ${position}.`);
1213
+ console.log(`Set WindowCovering currentPositionLiftPercent100ths: ${position} and targetPositionLiftPercent100ths: ${position}.`);
1185
1214
  }
1186
1215
  /**
1187
1216
  * Get a default door lock cluster server.
@@ -1255,6 +1284,29 @@ export class MatterbridgeDevice extends extendPublicHandlerMethods(Device) {
1255
1284
  this.addFixedLabel('orientation', 'Switch');
1256
1285
  this.addFixedLabel('label', 'Switch');
1257
1286
  }
1287
+ getDefaultModeSelectClusterServer(description, supportedModes, currentMode = 0, startUpMode = 0) {
1288
+ return ClusterServer(ModeSelectCluster, {
1289
+ description: description,
1290
+ standardNamespace: null,
1291
+ supportedModes: supportedModes,
1292
+ currentMode: currentMode,
1293
+ startUpMode: startUpMode,
1294
+ }, {
1295
+ changeToMode: async (data) => {
1296
+ // eslint-disable-next-line no-console
1297
+ console.log('changeToMode', data.request);
1298
+ await this.commandHandler.executeHandler('changeToMode', data);
1299
+ },
1300
+ });
1301
+ }
1302
+ createDefaultModeSelectClusterServer(endpoint) {
1303
+ if (!endpoint)
1304
+ endpoint = this;
1305
+ endpoint.addClusterServer(this.getDefaultModeSelectClusterServer('Mode select', [
1306
+ { label: 'Mode 0', mode: 0, semanticTags: [{ mfgCode: VendorId(0xfff1), value: 0 }] },
1307
+ { label: 'Mode 1', mode: 1, semanticTags: [{ mfgCode: VendorId(0xfff1), value: 1 }] },
1308
+ ]));
1309
+ }
1258
1310
  /**
1259
1311
  * Get a default occupancy sensing cluster server.
1260
1312
  *