@matterbridge/core 3.8.1-dev-20260609-77be5ba → 3.8.1-dev-20260610-f258cc7

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.
@@ -151,9 +151,6 @@ export declare const ClosureControl: ClusterType.Concrete & {
151
151
  readonly EngageStateChangedEvent: new (value?: Partial<ClosureControl.EngageStateChangedEvent>) => ClosureControl.EngageStateChangedEvent;
152
152
  readonly SecureStateChangedEvent: new (value?: Partial<ClosureControl.SecureStateChangedEvent>) => ClosureControl.SecureStateChangedEvent;
153
153
  readonly Typing: ClosureControl;
154
- readonly Cluster: ClusterType.WithCompat<typeof ClosureControl, ClosureControl>;
155
- readonly Complete: typeof ClosureControl;
156
- with(...features: ClosureControl.Feature[]): typeof ClosureControl;
157
154
  };
158
155
  export interface ClosureControl extends ClusterTyping {
159
156
  Attributes: ClosureControl.Attributes;
@@ -170,9 +170,6 @@ export declare const ClosureDimension: ClusterType.Concrete & {
170
170
  readonly SetTargetRequest: new (value?: Partial<ClosureDimension.SetTargetRequest>) => ClosureDimension.SetTargetRequest;
171
171
  readonly StepRequest: new (value?: Partial<ClosureDimension.StepRequest>) => ClosureDimension.StepRequest;
172
172
  readonly Typing: ClosureDimension;
173
- readonly Cluster: ClusterType.WithCompat<typeof ClosureDimension, ClosureDimension>;
174
- readonly Complete: typeof ClosureDimension;
175
- with(...features: ClosureDimension.Feature[]): typeof ClosureDimension;
176
173
  };
177
174
  export interface ClosureDimension extends ClusterTyping {
178
175
  Attributes: ClosureDimension.Attributes;
@@ -30,8 +30,6 @@ export declare const SoilMeasurement: ClusterType.Concrete & {
30
30
  readonly attributes: ClusterType.AttributeObjects<SoilMeasurement.Attributes>;
31
31
  readonly features: Record<string, never>;
32
32
  readonly Typing: SoilMeasurement;
33
- readonly Cluster: ClusterType.WithCompat<typeof SoilMeasurement, SoilMeasurement>;
34
- readonly Complete: typeof SoilMeasurement;
35
33
  };
36
34
  export interface SoilMeasurement extends ClusterTyping {
37
35
  Attributes: SoilMeasurement.Attributes;
@@ -1,11 +1,11 @@
1
1
  import { FanControl } from '@matter/types/clusters/fan-control';
2
2
  import { ThermostatUserInterfaceConfiguration } from '@matter/types/clusters/thermostat-user-interface-configuration';
3
- import { airConditioner, powerSource } from '../matterbridgeDeviceTypes.js';
3
+ import { powerSource, roomAirConditioner } from '../matterbridgeDeviceTypes.js';
4
4
  import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
5
5
  export class AirConditioner extends MatterbridgeEndpoint {
6
6
  constructor(name, serial, options = {}) {
7
7
  const { localTemperature = 23, occupiedHeatingSetpoint = 21, occupiedCoolingSetpoint = 25, minSetpointDeadBand = 1, minHeatSetpointLimit = 0, maxHeatSetpointLimit = 50, minCoolSetpointLimit = 0, maxCoolSetpointLimit = 50, temperatureDisplayMode = ThermostatUserInterfaceConfiguration.TemperatureDisplayMode.Celsius, keypadLockout = ThermostatUserInterfaceConfiguration.KeypadLockout.NoLockout, scheduleProgrammingVisibility = ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility.ScheduleProgrammingPermitted, fanMode = FanControl.FanMode.Off, fanModeSequence = FanControl.FanModeSequence.OffLowMedHighAuto, percentSetting = 0, percentCurrent = 0, } = options;
8
- super([airConditioner, powerSource], { id: `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}` });
8
+ super([roomAirConditioner, powerSource], { id: `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}` });
9
9
  this.createDefaultIdentifyClusterServer();
10
10
  this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Matterbridge Air Conditioner');
11
11
  this.createDefaultPowerSourceWiredClusterServer();
@@ -11,23 +11,23 @@ export class ExtractorHood extends MatterbridgeEndpoint {
11
11
  this.createDefaultHepaFilterMonitoringClusterServer(hepaCondition, hepaChangeIndication, hepaInPlaceIndicator, hepaLastChangedTime, hepaReplacementProductList);
12
12
  this.createDefaultActivatedCarbonFilterMonitoringClusterServer(activatedCarbonCondition, activatedCarbonChangeIndication, activatedCarbonInPlaceIndicator, activatedCarbonLastChangedTime, activatedCarbonReplacementProductList);
13
13
  this.subscribeAttribute('fanControl', 'fanMode', (newValue, oldValue, context) => {
14
- if (context.offline === true)
14
+ if (context.fabric === undefined)
15
15
  return;
16
16
  this.log.info(`Fan control fanMode attribute changed: ${newValue}`);
17
17
  });
18
18
  this.subscribeAttribute('fanControl', 'percentSetting', (newValue, oldValue, context) => {
19
- if (context.offline === true)
19
+ if (context.fabric === undefined)
20
20
  return;
21
21
  this.log.info(`Fan control percentSetting attribute changed: ${newValue}`);
22
22
  void this.setAttribute('fanControl', 'percentCurrent', newValue, this.log).catch(() => { });
23
23
  });
24
24
  this.subscribeAttribute('hepaFilterMonitoring', 'lastChangedTime', (newValue, oldValue, context) => {
25
- if (context.offline === true)
25
+ if (context.fabric === undefined)
26
26
  return;
27
27
  this.log.info(`Hepa filter monitoring lastChangedTime attribute changed: ${newValue}`);
28
28
  });
29
29
  this.subscribeAttribute('activatedCarbonFilterMonitoring', 'lastChangedTime', (newValue, oldValue, context) => {
30
- if (context.offline === true)
30
+ if (context.fabric === undefined)
31
31
  return;
32
32
  this.log.info(`Activated carbon filter monitoring lastChangedTime attribute changed: ${newValue}`);
33
33
  });
@@ -1,6 +1,6 @@
1
1
  import { CommonAreaNamespaceTag, CommonNumberTag, PowerSourceTag } from '@matter/node';
2
2
  import { DeviceEnergyManagement } from '@matter/types/clusters/device-energy-management';
3
- import { deviceEnergyManagement, electricalSensor, heatPump, powerSource, temperatureSensor, thermostatDevice } from '../matterbridgeDeviceTypes.js';
3
+ import { deviceEnergyManagement, electricalSensor, heatPump, powerSource, temperatureSensor, thermostat } from '../matterbridgeDeviceTypes.js';
4
4
  import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
5
5
  import { getSemtag } from '../matterbridgeEndpointHelpers.js';
6
6
  export class HeatPump extends MatterbridgeEndpoint {
@@ -28,14 +28,14 @@ export class HeatPump extends MatterbridgeEndpoint {
28
28
  })
29
29
  .createDefaultTemperatureMeasurementClusterServer(3500)
30
30
  .addRequiredClusterServers();
31
- this.addChildDeviceType('LivingThermostat', thermostatDevice, {
31
+ this.addChildDeviceType('LivingThermostat', thermostat, {
32
32
  tagList: [getSemtag(CommonNumberTag.One, 'LivingThermostat'), getSemtag(CommonAreaNamespaceTag.LivingRoom)],
33
33
  })
34
34
  .createDefaultThermostatClusterServer()
35
35
  .addRequiredClusterServers()
36
36
  .addUserLabel('room', 'Living Room')
37
37
  .catch(() => { });
38
- this.addChildDeviceType('BedroomThermostat', thermostatDevice, {
38
+ this.addChildDeviceType('BedroomThermostat', thermostat, {
39
39
  tagList: [getSemtag(CommonNumberTag.Two, 'BedroomThermostat'), getSemtag(CommonAreaNamespaceTag.Bedroom)],
40
40
  })
41
41
  .createDefaultThermostatClusterServer()
@@ -1,6 +1,6 @@
1
1
  import { LevelControl } from '@matter/types/clusters/level-control';
2
2
  import { OnOff } from '@matter/types/clusters/on-off';
3
- import { speakerDevice } from '../matterbridgeDeviceTypes.js';
3
+ import { speaker } from '../matterbridgeDeviceTypes.js';
4
4
  import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
5
5
  export class Speaker extends MatterbridgeEndpoint {
6
6
  constructor(name, serial, muted = false, volume = 128) {
@@ -10,16 +10,16 @@ export class Speaker extends MatterbridgeEndpoint {
10
10
  volume = 1;
11
11
  if (volume > 254)
12
12
  volume = 254;
13
- super([speakerDevice], { id: `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}` });
13
+ super([speaker], { id: `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}` });
14
14
  this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Matterbridge Speaker');
15
15
  this.createOnOffClusterServer(!muted);
16
16
  this.createLevelControlClusterServer(volume);
17
17
  }
18
18
  async setMuted(muted) {
19
- await this.setAttribute(OnOff.Cluster.id, 'onOff', !muted);
19
+ await this.setAttribute(OnOff.id, 'onOff', !muted);
20
20
  }
21
21
  isMuted() {
22
- return !this.getAttribute(OnOff.Cluster.id, 'onOff');
22
+ return !this.getAttribute(OnOff.id, 'onOff');
23
23
  }
24
24
  async setVolume(level) {
25
25
  if (!Number.isFinite(level))
@@ -28,9 +28,9 @@ export class Speaker extends MatterbridgeEndpoint {
28
28
  level = 1;
29
29
  if (level > 254)
30
30
  level = 254;
31
- await this.setAttribute(LevelControl.Cluster, 'currentLevel', level);
31
+ await this.setAttribute(LevelControl, 'currentLevel', level);
32
32
  }
33
33
  getVolume() {
34
- return this.getAttribute(LevelControl.Cluster, 'currentLevel');
34
+ return this.getAttribute(LevelControl, 'currentLevel');
35
35
  }
36
36
  }
package/dist/frontend.js CHANGED
@@ -959,8 +959,8 @@ export class Frontend extends EventEmitter {
959
959
  return false;
960
960
  if (!device.lifecycle.isReady || device.construction.status !== Lifecycle.Status.Active)
961
961
  return false;
962
- if (device.hasClusterServer(BridgedDeviceBasicInformation.Cluster.id))
963
- return device.getAttribute(BridgedDeviceBasicInformation.Cluster.id, 'reachable');
962
+ if (device.hasClusterServer(BridgedDeviceBasicInformation.id))
963
+ return device.getAttribute(BridgedDeviceBasicInformation.id, 'reachable');
964
964
  if (device.mode === 'server' && device.serverNode && device.serverNode.state.basicInformation.reachable !== undefined)
965
965
  return device.serverNode.state.basicInformation.reachable;
966
966
  if (this.matterbridge.bridgeMode === 'childbridge')
@@ -973,21 +973,21 @@ export class Frontend extends EventEmitter {
973
973
  if (!endpoint.lifecycle.isReady || endpoint.construction.status !== Lifecycle.Status.Active)
974
974
  return undefined;
975
975
  const powerSource = (device) => {
976
- const featureMap = device.getAttribute(PowerSource.Cluster.id, 'featureMap');
976
+ const featureMap = device.getAttribute(PowerSource.id, 'featureMap');
977
977
  if (featureMap.wired) {
978
- const wiredCurrentType = device.getAttribute(PowerSource.Cluster.id, 'wiredCurrentType');
978
+ const wiredCurrentType = device.getAttribute(PowerSource.id, 'wiredCurrentType');
979
979
  return ['ac', 'dc'][wiredCurrentType];
980
980
  }
981
981
  if (featureMap.battery) {
982
- const batChargeLevel = device.getAttribute(PowerSource.Cluster.id, 'batChargeLevel');
982
+ const batChargeLevel = device.getAttribute(PowerSource.id, 'batChargeLevel');
983
983
  return ['ok', 'warning', 'critical'][batChargeLevel];
984
984
  }
985
985
  return;
986
986
  };
987
- if (endpoint.hasClusterServer(PowerSource.Cluster.id))
987
+ if (endpoint.hasClusterServer(PowerSource.id))
988
988
  return powerSource(endpoint);
989
989
  for (const child of endpoint.getChildEndpoints()) {
990
- if (child.hasClusterServer(PowerSource.Cluster.id))
990
+ if (child.hasClusterServer(PowerSource.id))
991
991
  return powerSource(child);
992
992
  }
993
993
  }
@@ -997,17 +997,17 @@ export class Frontend extends EventEmitter {
997
997
  if (!endpoint.lifecycle.isReady || endpoint.construction.status !== Lifecycle.Status.Active)
998
998
  return undefined;
999
999
  const batteryLevel = (device) => {
1000
- const featureMap = device.getAttribute(PowerSource.Cluster.id, 'featureMap');
1000
+ const featureMap = device.getAttribute(PowerSource.id, 'featureMap');
1001
1001
  if (featureMap.battery) {
1002
- const batChargeLevel = device.getAttribute(PowerSource.Cluster.id, 'batPercentRemaining');
1002
+ const batChargeLevel = device.getAttribute(PowerSource.id, 'batPercentRemaining');
1003
1003
  return isValidNumber(batChargeLevel) ? batChargeLevel / 2 : undefined;
1004
1004
  }
1005
1005
  return undefined;
1006
1006
  };
1007
- if (endpoint.hasClusterServer(PowerSource.Cluster.id))
1007
+ if (endpoint.hasClusterServer(PowerSource.id))
1008
1008
  return batteryLevel(endpoint);
1009
1009
  for (const child of endpoint.getChildEndpoints()) {
1010
- if (child.hasClusterServer(PowerSource.Cluster.id))
1010
+ if (child.hasClusterServer(PowerSource.id))
1011
1011
  return batteryLevel(child);
1012
1012
  }
1013
1013
  }
package/dist/helpers.js CHANGED
@@ -11,7 +11,7 @@ import { OnOffLightSwitchDevice } from '@matter/node/devices/on-off-light-switch
11
11
  import { OnOffPlugInUnitDevice } from '@matter/node/devices/on-off-plug-in-unit';
12
12
  import { VendorId } from '@matter/types/datatype';
13
13
  import { hasParameter } from '@matterbridge/utils/cli';
14
- import { doorLockDevice } from './matterbridgeDeviceTypes.js';
14
+ import { doorLock } from './matterbridgeDeviceTypes.js';
15
15
  import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
16
16
  export async function addVirtualDevice(aggregatorEndpoint, name, type, callback) {
17
17
  let deviceType;
@@ -60,7 +60,7 @@ export async function addVirtualDevice(aggregatorEndpoint, name, type, callback)
60
60
  }
61
61
  export async function addVirtualDevices(matterbridge, aggregatorEndpoint) {
62
62
  if (hasParameter('experimental') && matterbridge.bridgeMode === 'bridge' && aggregatorEndpoint) {
63
- const lockUserPin = new MatterbridgeEndpoint(doorLockDevice, { id: 'door_lock_user_pin' });
63
+ const lockUserPin = new MatterbridgeEndpoint(doorLock, { id: 'door_lock_user_pin' });
64
64
  lockUserPin.createDefaultBridgedDeviceBasicInformationClusterServer('Matterbridge User Pin Lock', 'sn_system_lock', 0xfff1, 'Matterbridge', 'Matterbridge Virtual Device', 20000, '2.0.0');
65
65
  lockUserPin.createUserPinDoorLockClusterServer();
66
66
  lockUserPin.addRequiredClusterServers();
@@ -1,3 +1,4 @@
1
+ import type { ClusterType } from '@matter/types';
1
2
  import { ClusterId, DeviceTypeId } from '@matter/types/datatype';
2
3
  export declare enum DeviceClasses {
3
4
  Node = "Node",
@@ -149,3 +150,7 @@ export declare const snapshotCamera: DeviceTypeDefinition;
149
150
  export declare const chime: DeviceTypeDefinition;
150
151
  export declare const cameraController: DeviceTypeDefinition;
151
152
  export declare const doorbell: DeviceTypeDefinition;
153
+ export declare const supportedDeviceTypes: DeviceTypeDefinition[];
154
+ export declare const getSupportedDeviceType: (key: string | number) => DeviceTypeDefinition | undefined;
155
+ export declare const supportedClusters: ClusterType[];
156
+ export declare const getSupportedCluster: (key: string | number) => ClusterType | undefined;