matterbridge 3.0.0-edge.2 → 3.0.0-edge.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -59,21 +59,25 @@ Modified clusters:
59
59
  - [doorLock]: Fixed supportedOperatingModes inverted bitmap (Thanks Apollon).
60
60
  - [DevicesIcon]: Fixed rendering of leak freeze and rain sensors.
61
61
 
62
- ## [2.2.8] - 2025-04-08
62
+ ## [2.2.8] - 2025-04-10
63
63
 
64
64
  ### Added
65
65
 
66
- - [platform]: Added stack to errors messages.
66
+ - [platform]: Added stack to error messages.
67
+ - [endpoint]: Added createLevelControlClusterServer()
67
68
  - [endpoint]: Added createLevelTvocMeasurementClusterServer()
69
+ - [frontend]: Added a restart button on the QRCode panel when the advertising for a not paired node is expired.
68
70
 
69
71
  ### Changed
70
72
 
71
73
  - [package]: Update dependencies.
72
74
  - [package]: Use node:https.
75
+ - [endpoint]: Modified createOnOffClusterServer().
73
76
 
74
77
  ### Fixed
75
78
 
76
79
  - [homepage]: Fixed warning log for homepage property in package.json.
80
+ - [DevicesIcon]: Fixed rendering of rain, freeze and leak sensors.
77
81
 
78
82
  <a href="https://www.buymeacoffee.com/luligugithub">
79
83
  <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
@@ -1,205 +1 @@
1
- import { ModeBase } from '@matter/main/clusters/mode-base';
2
- import { Attribute, BitFlag, ClusterRegistry, Command, Event, EventPriority, FixedAttribute, MutableCluster, OptionalAttribute, OptionalCommand, OptionalEvent, TlvArray, TlvEnum, TlvField, TlvNoArguments, TlvNullable, TlvObject, TlvOptionalField, TlvString, TlvUInt32, TlvUInt8, TlvVendorId, WritableAttribute, } from '@matter/main/types';
3
- import { OperationalState as OperationalStateNamespace } from '@matter/main/clusters/operational-state';
4
- export var RvcRunMode;
5
- (function (RvcRunMode) {
6
- let Feature;
7
- (function (Feature) {
8
- Feature["OnOff"] = "OnOff";
9
- })(Feature = RvcRunMode.Feature || (RvcRunMode.Feature = {}));
10
- let ModeTag;
11
- (function (ModeTag) {
12
- ModeTag[ModeTag["Auto"] = 0] = "Auto";
13
- ModeTag[ModeTag["Quick"] = 1] = "Quick";
14
- ModeTag[ModeTag["Quiet"] = 2] = "Quiet";
15
- ModeTag[ModeTag["LowNoise"] = 3] = "LowNoise";
16
- ModeTag[ModeTag["LowEnergy"] = 4] = "LowEnergy";
17
- ModeTag[ModeTag["Vacation"] = 5] = "Vacation";
18
- ModeTag[ModeTag["Min"] = 6] = "Min";
19
- ModeTag[ModeTag["Max"] = 7] = "Max";
20
- ModeTag[ModeTag["Night"] = 8] = "Night";
21
- ModeTag[ModeTag["Day"] = 9] = "Day";
22
- ModeTag[ModeTag["Idle"] = 16384] = "Idle";
23
- ModeTag[ModeTag["Cleaning"] = 16385] = "Cleaning";
24
- ModeTag[ModeTag["Mapping"] = 16386] = "Mapping";
25
- })(ModeTag = RvcRunMode.ModeTag || (RvcRunMode.ModeTag = {}));
26
- RvcRunMode.TlvModeTagStruct = TlvObject({
27
- mfgCode: TlvOptionalField(0, TlvVendorId),
28
- value: TlvField(1, TlvEnum()),
29
- });
30
- RvcRunMode.TlvModeOption = TlvObject({
31
- label: TlvField(0, TlvString.bound({ maxLength: 64 })),
32
- mode: TlvField(1, TlvUInt8),
33
- modeTags: TlvField(2, TlvArray(RvcRunMode.TlvModeTagStruct, { maxLength: 8 })),
34
- });
35
- let ModeChangeStatus;
36
- (function (ModeChangeStatus) {
37
- ModeChangeStatus[ModeChangeStatus["Stuck"] = 65] = "Stuck";
38
- ModeChangeStatus[ModeChangeStatus["DustBinMissing"] = 66] = "DustBinMissing";
39
- ModeChangeStatus[ModeChangeStatus["DustBinFull"] = 67] = "DustBinFull";
40
- ModeChangeStatus[ModeChangeStatus["WaterTankEmpty"] = 68] = "WaterTankEmpty";
41
- ModeChangeStatus[ModeChangeStatus["WaterTankMissing"] = 69] = "WaterTankMissing";
42
- ModeChangeStatus[ModeChangeStatus["WaterTankLidOpen"] = 70] = "WaterTankLidOpen";
43
- ModeChangeStatus[ModeChangeStatus["MopCleaningPadMissing"] = 71] = "MopCleaningPadMissing";
44
- ModeChangeStatus[ModeChangeStatus["BatteryLow"] = 72] = "BatteryLow";
45
- })(ModeChangeStatus = RvcRunMode.ModeChangeStatus || (RvcRunMode.ModeChangeStatus = {}));
46
- RvcRunMode.OnOffComponent = MutableCluster.Component({
47
- attributes: {
48
- startUpMode: WritableAttribute(0x2, TlvNullable(TlvUInt8), { persistent: true }),
49
- onMode: WritableAttribute(0x3, TlvNullable(TlvUInt8), { persistent: true, default: null }),
50
- },
51
- });
52
- RvcRunMode.Base = MutableCluster.Component({
53
- id: 0x54,
54
- name: 'RvcRunMode',
55
- revision: 3,
56
- features: {
57
- onOff: BitFlag(0),
58
- },
59
- attributes: {
60
- supportedModes: FixedAttribute(0x0, TlvArray(RvcRunMode.TlvModeOption, { minLength: 2, maxLength: 255 }), { default: [] }),
61
- currentMode: Attribute(0x1, TlvUInt8, { persistent: true }),
62
- },
63
- commands: {
64
- changeToMode: Command(0x0, ModeBase.TlvChangeToModeRequest, 0x1, ModeBase.TlvChangeToModeResponse),
65
- },
66
- extensions: MutableCluster.Extensions({ flags: { onOff: true }, component: RvcRunMode.OnOffComponent }),
67
- });
68
- RvcRunMode.ClusterInstance = MutableCluster(RvcRunMode.Base);
69
- RvcRunMode.Cluster = RvcRunMode.ClusterInstance;
70
- RvcRunMode.Complete = RvcRunMode.Cluster;
71
- })(RvcRunMode || (RvcRunMode = {}));
72
- export const RvcRunModeCluster = RvcRunMode.Cluster;
73
- ClusterRegistry.register(RvcRunMode.Complete);
74
- export var RvcCleanMode;
75
- (function (RvcCleanMode) {
76
- let Feature;
77
- (function (Feature) {
78
- Feature["OnOff"] = "OnOff";
79
- })(Feature = RvcCleanMode.Feature || (RvcCleanMode.Feature = {}));
80
- let ModeTag;
81
- (function (ModeTag) {
82
- ModeTag[ModeTag["Auto"] = 0] = "Auto";
83
- ModeTag[ModeTag["Quick"] = 1] = "Quick";
84
- ModeTag[ModeTag["Quiet"] = 2] = "Quiet";
85
- ModeTag[ModeTag["LowNoise"] = 3] = "LowNoise";
86
- ModeTag[ModeTag["LowEnergy"] = 4] = "LowEnergy";
87
- ModeTag[ModeTag["Vacation"] = 5] = "Vacation";
88
- ModeTag[ModeTag["Min"] = 6] = "Min";
89
- ModeTag[ModeTag["Max"] = 7] = "Max";
90
- ModeTag[ModeTag["Night"] = 8] = "Night";
91
- ModeTag[ModeTag["Day"] = 9] = "Day";
92
- ModeTag[ModeTag["DeepClean"] = 16384] = "DeepClean";
93
- ModeTag[ModeTag["Vacuum"] = 16385] = "Vacuum";
94
- ModeTag[ModeTag["Mop"] = 16386] = "Mop";
95
- })(ModeTag = RvcCleanMode.ModeTag || (RvcCleanMode.ModeTag = {}));
96
- RvcCleanMode.TlvModeTagStruct = TlvObject({
97
- mfgCode: TlvOptionalField(0, TlvVendorId),
98
- value: TlvField(1, TlvEnum()),
99
- });
100
- RvcCleanMode.TlvModeOption = TlvObject({
101
- label: TlvField(0, TlvString.bound({ maxLength: 64 })),
102
- mode: TlvField(1, TlvUInt8),
103
- modeTags: TlvField(2, TlvArray(RvcCleanMode.TlvModeTagStruct, { maxLength: 8 })),
104
- });
105
- let ModeChangeStatus;
106
- (function (ModeChangeStatus) {
107
- ModeChangeStatus[ModeChangeStatus["CleaningInProgress"] = 64] = "CleaningInProgress";
108
- })(ModeChangeStatus = RvcCleanMode.ModeChangeStatus || (RvcCleanMode.ModeChangeStatus = {}));
109
- RvcCleanMode.OnOffComponent = MutableCluster.Component({
110
- attributes: {
111
- startUpMode: WritableAttribute(0x2, TlvNullable(TlvUInt8), { persistent: true }),
112
- onMode: WritableAttribute(0x3, TlvNullable(TlvUInt8), { persistent: true, default: null }),
113
- },
114
- });
115
- RvcCleanMode.Base = MutableCluster.Component({
116
- id: 0x55,
117
- name: 'RvcCleanMode',
118
- revision: 3,
119
- features: {
120
- onOff: BitFlag(0),
121
- },
122
- attributes: {
123
- supportedModes: FixedAttribute(0x0, TlvArray(RvcCleanMode.TlvModeOption, { minLength: 2, maxLength: 255 }), { default: [] }),
124
- currentMode: Attribute(0x1, TlvUInt8, { persistent: true }),
125
- },
126
- commands: {
127
- changeToMode: Command(0x0, ModeBase.TlvChangeToModeRequest, 0x1, ModeBase.TlvChangeToModeResponse),
128
- },
129
- extensions: MutableCluster.Extensions({ flags: { onOff: true }, component: RvcCleanMode.OnOffComponent }),
130
- });
131
- RvcCleanMode.ClusterInstance = MutableCluster(RvcCleanMode.Base);
132
- RvcCleanMode.Cluster = RvcCleanMode.ClusterInstance;
133
- RvcCleanMode.Complete = RvcCleanMode.Cluster;
134
- })(RvcCleanMode || (RvcCleanMode = {}));
135
- export const RvcCleanModeCluster = RvcCleanMode.Cluster;
136
- ClusterRegistry.register(RvcCleanMode.Complete);
137
- export var RvcOperationalState;
138
- (function (RvcOperationalState) {
139
- let OperationalState;
140
- (function (OperationalState) {
141
- OperationalState[OperationalState["Stopped"] = 0] = "Stopped";
142
- OperationalState[OperationalState["Running"] = 1] = "Running";
143
- OperationalState[OperationalState["Paused"] = 2] = "Paused";
144
- OperationalState[OperationalState["Error"] = 3] = "Error";
145
- OperationalState[OperationalState["SeekingCharger"] = 64] = "SeekingCharger";
146
- OperationalState[OperationalState["Charging"] = 65] = "Charging";
147
- OperationalState[OperationalState["Docked"] = 66] = "Docked";
148
- })(OperationalState = RvcOperationalState.OperationalState || (RvcOperationalState.OperationalState = {}));
149
- RvcOperationalState.TlvOperationalStateStruct = TlvObject({
150
- operationalStateId: TlvField(0, TlvEnum()),
151
- operationalStateLabel: TlvOptionalField(1, TlvString.bound({ maxLength: 64 })),
152
- });
153
- let ErrorState;
154
- (function (ErrorState) {
155
- ErrorState[ErrorState["NoError"] = 0] = "NoError";
156
- ErrorState[ErrorState["UnableToStartOrResume"] = 1] = "UnableToStartOrResume";
157
- ErrorState[ErrorState["UnableToCompleteOperation"] = 2] = "UnableToCompleteOperation";
158
- ErrorState[ErrorState["CommandInvalidInState"] = 3] = "CommandInvalidInState";
159
- ErrorState[ErrorState["FailedToFindChargingDock"] = 64] = "FailedToFindChargingDock";
160
- ErrorState[ErrorState["Stuck"] = 65] = "Stuck";
161
- ErrorState[ErrorState["DustBinMissing"] = 66] = "DustBinMissing";
162
- ErrorState[ErrorState["DustBinFull"] = 67] = "DustBinFull";
163
- ErrorState[ErrorState["WaterTankEmpty"] = 68] = "WaterTankEmpty";
164
- ErrorState[ErrorState["WaterTankMissing"] = 69] = "WaterTankMissing";
165
- ErrorState[ErrorState["WaterTankLidOpen"] = 70] = "WaterTankLidOpen";
166
- ErrorState[ErrorState["MopCleaningPadMissing"] = 71] = "MopCleaningPadMissing";
167
- })(ErrorState = RvcOperationalState.ErrorState || (RvcOperationalState.ErrorState = {}));
168
- RvcOperationalState.TlvErrorStateStruct = TlvObject({
169
- errorStateId: TlvField(0, TlvEnum()),
170
- errorStateLabel: TlvOptionalField(1, TlvString.bound({ maxLength: 64 })),
171
- errorStateDetails: TlvOptionalField(2, TlvString.bound({ maxLength: 64 })),
172
- });
173
- RvcOperationalState.TlvOperationalCommandResponse = TlvObject({
174
- commandResponseState: TlvField(0, RvcOperationalState.TlvErrorStateStruct),
175
- });
176
- RvcOperationalState.TlvOperationalErrorEvent = TlvObject({ errorState: TlvField(0, RvcOperationalState.TlvErrorStateStruct) });
177
- RvcOperationalState.ClusterInstance = MutableCluster({
178
- id: 0x61,
179
- name: 'RvcOperationalState',
180
- revision: 2,
181
- attributes: {
182
- phaseList: Attribute(0x0, TlvNullable(TlvArray(TlvString, { maxLength: 32 }))),
183
- currentPhase: Attribute(0x1, TlvNullable(TlvUInt8)),
184
- countdownTime: OptionalAttribute(0x2, TlvNullable(TlvUInt32.bound({ max: 259200 })), { default: null }),
185
- operationalStateList: Attribute(0x3, TlvArray(RvcOperationalState.TlvOperationalStateStruct), { default: [] }),
186
- operationalState: Attribute(0x4, TlvEnum()),
187
- operationalError: Attribute(0x5, RvcOperationalState.TlvErrorStateStruct),
188
- },
189
- commands: {
190
- pause: OptionalCommand(0x0, TlvNoArguments, 0x4, RvcOperationalState.TlvOperationalCommandResponse),
191
- stop: OptionalCommand(0x1, TlvNoArguments, 0x4, RvcOperationalState.TlvOperationalCommandResponse),
192
- start: OptionalCommand(0x2, TlvNoArguments, 0x4, RvcOperationalState.TlvOperationalCommandResponse),
193
- resume: OptionalCommand(0x3, TlvNoArguments, 0x4, RvcOperationalState.TlvOperationalCommandResponse),
194
- goHome: OptionalCommand(0x80, TlvNoArguments, 0x4, RvcOperationalState.TlvOperationalCommandResponse),
195
- },
196
- events: {
197
- operationalError: Event(0x0, EventPriority.Critical, RvcOperationalState.TlvOperationalErrorEvent),
198
- operationCompletion: OptionalEvent(0x1, EventPriority.Info, OperationalStateNamespace.TlvOperationCompletionEvent),
199
- },
200
- });
201
- RvcOperationalState.Cluster = RvcOperationalState.ClusterInstance;
202
- RvcOperationalState.Complete = RvcOperationalState.Cluster;
203
- })(RvcOperationalState || (RvcOperationalState = {}));
204
- export const RvcOperationalStateCluster = RvcOperationalState.Cluster;
205
- ClusterRegistry.register(RvcOperationalState.Complete);
1
+ export {};
@@ -1,5 +1,4 @@
1
- import { Behavior, ClusterBehavior } from '@matter/main';
2
- import { Status } from '@matter/main/types';
1
+ import { Behavior } from '@matter/main';
3
2
  import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
4
3
  import { ColorControl } from '@matter/main/clusters/color-control';
5
4
  import { FanControl } from '@matter/main/clusters/fan-control';
@@ -20,10 +19,6 @@ import { ValveConfigurationAndControlBehavior } from '@matter/main/behaviors/val
20
19
  import { ModeSelectServer } from '@matter/main/behaviors/mode-select';
21
20
  import { SmokeCoAlarmServer } from '@matter/main/behaviors/smoke-co-alarm';
22
21
  import { SwitchServer } from '@matter/main/behaviors/switch';
23
- import { RvcCleanMode } from 'matterbridge/cluster';
24
- import { RvcRunMode } from 'matterbridge/cluster';
25
- import { RvcOperationalState } from 'matterbridge/cluster';
26
- import { OperationalState } from '@matter/main/clusters/operational-state';
27
22
  export class MatterbridgeBehaviorDevice {
28
23
  log;
29
24
  commandHandler;
@@ -353,71 +348,3 @@ export class MatterbridgeSwitchServer extends SwitchServer {
353
348
  initialize() {
354
349
  }
355
350
  }
356
- export const RvcRunModeBehavior = ClusterBehavior.withInterface().for(RvcRunMode.Cluster);
357
- export class MatterbridgeRvcRunModeServer extends RvcRunModeBehavior.with(RvcRunMode.Feature.OnOff) {
358
- initialize() {
359
- }
360
- changeToMode({ newMode }) {
361
- const device = this.agent.get(MatterbridgeBehavior).state.deviceCommand;
362
- device.changeToMode({ newMode });
363
- this.state.currentMode = newMode;
364
- console.log('MatterbridgeRvcRunModeServer changeToMode called with newMode:', newMode);
365
- return { status: Status.Success, statusText: 'Success' };
366
- }
367
- }
368
- export const RvcCleanModeBehavior = ClusterBehavior.withInterface().for(RvcCleanMode.Cluster);
369
- export class MatterbridgeRvcCleanModeServer extends RvcCleanModeBehavior.with(RvcRunMode.Feature.OnOff) {
370
- initialize() {
371
- }
372
- changeToMode({ newMode }) {
373
- const device = this.agent.get(MatterbridgeBehavior).state.deviceCommand;
374
- device.changeToMode({ newMode });
375
- this.state.currentMode = newMode;
376
- console.log('MatterbridgeRvcCleanModeServer changeToMode called with newMode:', newMode);
377
- return { status: Status.Success, statusText: 'Success' };
378
- }
379
- }
380
- export const RvcOperationalStateBehavior = ClusterBehavior.withInterface().for(RvcOperationalState.Cluster);
381
- export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateBehavior {
382
- initialize() {
383
- console.log('MatterbridgeRvcOperationalStateServer initialized: setting operational state to Docked');
384
- this.state.operationalState = RvcOperationalState.OperationalState.Docked;
385
- this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error' };
386
- this.reactTo(this.agent.get(OnOffServer).events.onOff$Changed, this.handleOnOffChange);
387
- }
388
- handleOnOffChange(onOff) {
389
- if (onOff) {
390
- console.log('OnOffServer changed to ON: setting operational state to Running');
391
- this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 2;
392
- this.state.operationalState = RvcOperationalState.OperationalState.Running;
393
- this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error' };
394
- }
395
- else {
396
- console.log('OnOffServer changed to OFF: setting operational state to Docked');
397
- this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
398
- this.state.operationalState = RvcOperationalState.OperationalState.Docked;
399
- this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error' };
400
- }
401
- }
402
- pause() {
403
- console.log('MatterbridgeRvcOperationalStateServer: pause called setting operational state to Paused and currentMode to Idle');
404
- this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
405
- this.state.operationalState = RvcOperationalState.OperationalState.Paused;
406
- this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error' };
407
- return { commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error' } };
408
- }
409
- resume() {
410
- console.log('MatterbridgeRvcOperationalStateServer: resume called setting operational state to Running and currentMode to Cleaning');
411
- this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 2;
412
- this.state.operationalState = RvcOperationalState.OperationalState.Running;
413
- this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error' };
414
- return { commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error' } };
415
- }
416
- goHome() {
417
- console.log('MatterbridgeRvcOperationalStateServer: go home called setting operational state to Docked and currentMode to Idle');
418
- this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
419
- this.state.operationalState = RvcOperationalState.OperationalState.Docked;
420
- this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error' };
421
- return { commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error' } };
422
- }
423
- }
@@ -56,29 +56,25 @@ import { ServiceArea } from '@matter/main/clusters';
56
56
  export var DeviceClasses;
57
57
  (function (DeviceClasses) {
58
58
  DeviceClasses["Node"] = "Node";
59
- DeviceClasses["Utility"] = "Utility";
60
59
  DeviceClasses["App"] = "App";
60
+ DeviceClasses["Utility"] = "Utility";
61
61
  DeviceClasses["Simple"] = "Simple";
62
62
  DeviceClasses["Dynamic"] = "Dynamic";
63
63
  DeviceClasses["Client"] = "Client";
64
64
  DeviceClasses["Server"] = "Server";
65
65
  DeviceClasses["Composed"] = "Composed";
66
- DeviceClasses["Multiple"] = "Multiple";
67
- DeviceClasses["EZInitiator"] = "EZ-Initiator";
68
- DeviceClasses["EZTarget"] = "EZ-Target";
66
+ DeviceClasses["Duplicate"] = "Duplicate";
69
67
  DeviceClasses["BridgedPowerSourceInfo"] = "BridgedPowerSourceInfo";
70
68
  })(DeviceClasses || (DeviceClasses = {}));
71
- export const DeviceTypeDefinition = ({ name, code, deviceClass, superSet, revision, requiredServerClusters = [], optionalServerClusters = [], requiredClientClusters = [], optionalClientClusters = [], unknown = false, }) => ({
69
+ export const DeviceTypeDefinition = ({ name, code, deviceClass, revision, requiredServerClusters = [], optionalServerClusters = [], requiredClientClusters = [], optionalClientClusters = [], }) => ({
72
70
  name,
73
71
  code: DeviceTypeId(code),
74
72
  deviceClass,
75
- superSet,
76
73
  revision,
77
74
  requiredServerClusters,
78
75
  optionalServerClusters,
79
76
  requiredClientClusters,
80
77
  optionalClientClusters,
81
- unknown,
82
78
  });
83
79
  export const powerSource = DeviceTypeDefinition({
84
80
  name: 'MA-powerSource',
@@ -1,10 +1,10 @@
1
1
  import { AnsiLogger, BLUE, CYAN, YELLOW, db, debugStringify, er, hk, or, zb } from './logger/export.js';
2
2
  import { bridgedNode } from './matterbridgeDeviceTypes.js';
3
3
  import { isValidNumber, isValidObject } from './utils/export.js';
4
- import { MatterbridgeBehavior, MatterbridgeBehaviorDevice, MatterbridgeIdentifyServer, MatterbridgeOnOffServer, MatterbridgeLevelControlServer, MatterbridgeColorControlServer, MatterbridgeWindowCoveringServer, MatterbridgeThermostatServer, MatterbridgeFanControlServer, MatterbridgeDoorLockServer, MatterbridgeModeSelectServer, MatterbridgeValveConfigurationAndControlServer, MatterbridgeSmokeCoAlarmServer, MatterbridgeBooleanStateConfigurationServer, MatterbridgeSwitchServer, MatterbridgeRvcRunModeServer, MatterbridgeRvcCleanModeServer, MatterbridgeRvcOperationalStateServer, } from './matterbridgeBehaviors.js';
4
+ import { MatterbridgeBehavior, MatterbridgeBehaviorDevice, MatterbridgeIdentifyServer, MatterbridgeOnOffServer, MatterbridgeLevelControlServer, MatterbridgeColorControlServer, MatterbridgeWindowCoveringServer, MatterbridgeThermostatServer, MatterbridgeFanControlServer, MatterbridgeDoorLockServer, MatterbridgeModeSelectServer, MatterbridgeValveConfigurationAndControlServer, MatterbridgeSmokeCoAlarmServer, MatterbridgeBooleanStateConfigurationServer, MatterbridgeSwitchServer, } from './matterbridgeBehaviors.js';
5
5
  import { addClusterServers, addFixedLabel, addOptionalClusterServers, addRequiredClusterServers, addUserLabel, capitalizeFirstLetter, createUniqueId, getBehavior, getBehaviourTypesFromClusterClientIds, getBehaviourTypesFromClusterServerIds, getDefaultFlowMeasurementClusterServer, getDefaultIlluminanceMeasurementClusterServer, getDefaultPressureMeasurementClusterServer, getDefaultRelativeHumidityMeasurementClusterServer, getDefaultTemperatureMeasurementClusterServer, getDefaultOccupancySensingClusterServer, lowercaseFirstLetter, updateAttribute, getClusterId, getAttributeId, setAttribute, getAttribute, checkNotLatinCharacters, generateUniqueId, subscribeAttribute, } from './matterbridgeEndpointHelpers.js';
6
6
  import { Endpoint, Lifecycle, MutableEndpoint, NamedHandler, SupportedBehaviors, VendorId } from '@matter/main';
7
- import { ClusterType, getClusterNameById, MeasurementType } from '@matter/main/types';
7
+ import { getClusterNameById, MeasurementType } from '@matter/main/types';
8
8
  import { Descriptor } from '@matter/main/clusters/descriptor';
9
9
  import { PowerSource } from '@matter/main/clusters/power-source';
10
10
  import { BridgedDeviceBasicInformation } from '@matter/main/clusters/bridged-device-basic-information';
@@ -26,8 +26,6 @@ import { ElectricalPowerMeasurement } from '@matter/main/clusters/electrical-pow
26
26
  import { ElectricalEnergyMeasurement } from '@matter/main/clusters/electrical-energy-measurement';
27
27
  import { AirQuality } from '@matter/main/clusters/air-quality';
28
28
  import { ConcentrationMeasurement } from '@matter/main/clusters/concentration-measurement';
29
- import { RvcRunMode } from '@matter/main/clusters/rvc-run-mode';
30
- import { RvcOperationalState } from '@matter/main/clusters/rvc-operational-state';
31
29
  import { OccupancySensing } from '@matter/main/clusters/occupancy-sensing';
32
30
  import { DescriptorServer } from '@matter/main/behaviors/descriptor';
33
31
  import { PowerSourceServer } from '@matter/main/behaviors/power-source';
@@ -57,7 +55,6 @@ import { Pm25ConcentrationMeasurementServer } from '@matter/main/behaviors/pm25-
57
55
  import { Pm10ConcentrationMeasurementServer } from '@matter/main/behaviors/pm10-concentration-measurement';
58
56
  import { RadonConcentrationMeasurementServer } from '@matter/main/behaviors/radon-concentration-measurement';
59
57
  import { TotalVolatileOrganicCompoundsConcentrationMeasurementServer } from '@matter/main/behaviors/total-volatile-organic-compounds-concentration-measurement';
60
- import { RvcCleanMode } from '@matter/main/clusters/rvc-clean-mode';
61
58
  export class MatterbridgeEndpoint extends Endpoint {
62
59
  static bridgeMode = '';
63
60
  static logLevel = "info";
@@ -522,7 +519,7 @@ export class MatterbridgeEndpoint extends Endpoint {
522
519
  return this;
523
520
  }
524
521
  createOnOffClusterServer(onOff = false) {
525
- this.behaviors.require(MatterbridgeOnOffServer.for(ClusterType(OnOff.Base)), {
522
+ this.behaviors.require(MatterbridgeOnOffServer, {
526
523
  onOff,
527
524
  });
528
525
  return this;
@@ -548,6 +545,17 @@ export class MatterbridgeEndpoint extends Endpoint {
548
545
  });
549
546
  return this;
550
547
  }
548
+ createLevelControlClusterServer(currentLevel = 254, onLevel = null) {
549
+ this.behaviors.require(MatterbridgeLevelControlServer, {
550
+ currentLevel,
551
+ onLevel,
552
+ options: {
553
+ executeIfOff: false,
554
+ coupleColorTempToLevel: false,
555
+ },
556
+ });
557
+ return this;
558
+ }
551
559
  createDefaultColorControlClusterServer(currentX = 0, currentY = 0, currentHue = 0, currentSaturation = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
552
560
  this.behaviors.require(MatterbridgeColorControlServer.with(ColorControl.Feature.Xy, ColorControl.Feature.HueSaturation, ColorControl.Feature.ColorTemperature), {
553
561
  colorMode: ColorControl.ColorMode.CurrentHueAndCurrentSaturation,
@@ -1154,48 +1162,4 @@ export class MatterbridgeEndpoint extends Endpoint {
1154
1162
  });
1155
1163
  return this;
1156
1164
  }
1157
- createDefaultRvcRunModeClusterServer() {
1158
- this.behaviors.require(MatterbridgeRvcRunModeServer.with(RvcRunMode.Feature.OnOff), {
1159
- supportedModes: [
1160
- { label: 'Idle', mode: 1, modeTags: [{ value: RvcRunMode.ModeTag.Idle }] },
1161
- { label: 'Cleaning', mode: 2, modeTags: [{ value: RvcRunMode.ModeTag.Cleaning }] },
1162
- { label: 'SpotCleaning', mode: 3, modeTags: [{ value: RvcRunMode.ModeTag.Cleaning }] },
1163
- ],
1164
- currentMode: 1,
1165
- startUpMode: null,
1166
- onMode: null,
1167
- });
1168
- return this;
1169
- }
1170
- createDefaultRvcCleanModeClusterServer() {
1171
- this.behaviors.require(MatterbridgeRvcCleanModeServer.with(RvcCleanMode.Feature.OnOff), {
1172
- supportedModes: [
1173
- { label: 'Vacuum', mode: 1, modeTags: [{ value: RvcCleanMode.ModeTag.Vacuum }] },
1174
- { label: 'Mop', mode: 2, modeTags: [{ value: RvcCleanMode.ModeTag.Mop }] },
1175
- { label: 'Clean', mode: 3, modeTags: [{ value: RvcCleanMode.ModeTag.DeepClean }] },
1176
- ],
1177
- currentMode: 1,
1178
- startUpMode: null,
1179
- onMode: null,
1180
- });
1181
- return this;
1182
- }
1183
- createDefaultRvcOperationalStateClusterServer() {
1184
- this.behaviors.require(MatterbridgeRvcOperationalStateServer, {
1185
- phaseList: [],
1186
- currentPhase: null,
1187
- operationalStateList: [
1188
- { operationalStateId: RvcOperationalState.OperationalState.Stopped, operationalStateLabel: 'Stopped' },
1189
- { operationalStateId: RvcOperationalState.OperationalState.Running, operationalStateLabel: 'Running' },
1190
- { operationalStateId: RvcOperationalState.OperationalState.Paused, operationalStateLabel: 'Paused' },
1191
- { operationalStateId: RvcOperationalState.OperationalState.Error, operationalStateLabel: 'Error' },
1192
- { operationalStateId: RvcOperationalState.OperationalState.SeekingCharger, operationalStateLabel: 'SeekingCharger' },
1193
- { operationalStateId: RvcOperationalState.OperationalState.Charging, operationalStateLabel: 'Charging' },
1194
- { operationalStateId: RvcOperationalState.OperationalState.Docked, operationalStateLabel: 'Docked' },
1195
- ],
1196
- operationalState: RvcOperationalState.OperationalState.Docked,
1197
- operationalError: { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error', errorStateDetails: 'Fully operative' },
1198
- });
1199
- return this;
1200
- }
1201
1165
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.ea7910e9.css",
4
- "main.js": "./static/js/main.fe57dcc8.js",
4
+ "main.js": "./static/js/main.e11d6bb4.js",
5
5
  "static/js/453.d855a71b.chunk.js": "./static/js/453.d855a71b.chunk.js",
6
6
  "static/media/roboto-latin-700-normal.woff2": "./static/media/roboto-latin-700-normal.c4d6cab43bec89049809.woff2",
7
7
  "static/media/roboto-latin-500-normal.woff2": "./static/media/roboto-latin-500-normal.599f66a60bdf974e578e.woff2",
@@ -77,11 +77,11 @@
77
77
  "static/media/roboto-greek-ext-300-normal.woff": "./static/media/roboto-greek-ext-300-normal.60729cafbded24073dfb.woff",
78
78
  "index.html": "./index.html",
79
79
  "main.ea7910e9.css.map": "./static/css/main.ea7910e9.css.map",
80
- "main.fe57dcc8.js.map": "./static/js/main.fe57dcc8.js.map",
80
+ "main.e11d6bb4.js.map": "./static/js/main.e11d6bb4.js.map",
81
81
  "453.d855a71b.chunk.js.map": "./static/js/453.d855a71b.chunk.js.map"
82
82
  },
83
83
  "entrypoints": [
84
84
  "static/css/main.ea7910e9.css",
85
- "static/js/main.fe57dcc8.js"
85
+ "static/js/main.e11d6bb4.js"
86
86
  ]
87
87
  }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.fe57dcc8.js"></script><link href="./static/css/main.ea7910e9.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.e11d6bb4.js"></script><link href="./static/css/main.ea7910e9.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>