matterbridge 3.0.0-edge.1 → 3.0.0-edge.2

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
@@ -52,10 +52,12 @@ Modified clusters:
52
52
 
53
53
  - [deviceTypes]: Updated device types to Matter 1.4
54
54
  - [matter.js]: Update to 0.13.0-alpha.0-20250405-7fc7db48.
55
+ - [matter.js]: Update to 0.13.0-alpha.0-20250408-c916c7e8.
55
56
 
56
57
  ### Fixed
57
58
 
58
59
  - [doorLock]: Fixed supportedOperatingModes inverted bitmap (Thanks Apollon).
60
+ - [DevicesIcon]: Fixed rendering of leak freeze and rain sensors.
59
61
 
60
62
  ## [2.2.8] - 2025-04-08
61
63
 
@@ -67,6 +69,11 @@ Modified clusters:
67
69
  ### Changed
68
70
 
69
71
  - [package]: Update dependencies.
72
+ - [package]: Use node:https.
73
+
74
+ ### Fixed
75
+
76
+ - [homepage]: Fixed warning log for homepage property in package.json.
70
77
 
71
78
  <a href="https://www.buymeacoffee.com/luligugithub">
72
79
  <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
@@ -1 +1,205 @@
1
- export {};
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);
package/dist/frontend.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { EndpointServer, Logger, LogLevel as MatterLogLevel, LogFormat as MatterLogFormat, Lifecycle } from '@matter/main';
2
2
  import { createServer } from 'node:http';
3
+ import https from 'node:https';
3
4
  import os from 'node:os';
4
5
  import path from 'node:path';
5
6
  import { promises as fs } from 'node:fs';
6
- import https from 'https';
7
7
  import express from 'express';
8
8
  import WebSocket, { WebSocketServer } from 'ws';
9
9
  import multer from 'multer';
@@ -1,4 +1,5 @@
1
- import { Behavior } from '@matter/main';
1
+ import { Behavior, ClusterBehavior } from '@matter/main';
2
+ import { Status } from '@matter/main/types';
2
3
  import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
3
4
  import { ColorControl } from '@matter/main/clusters/color-control';
4
5
  import { FanControl } from '@matter/main/clusters/fan-control';
@@ -19,6 +20,10 @@ import { ValveConfigurationAndControlBehavior } from '@matter/main/behaviors/val
19
20
  import { ModeSelectServer } from '@matter/main/behaviors/mode-select';
20
21
  import { SmokeCoAlarmServer } from '@matter/main/behaviors/smoke-co-alarm';
21
22
  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';
22
27
  export class MatterbridgeBehaviorDevice {
23
28
  log;
24
29
  commandHandler;
@@ -348,3 +353,71 @@ export class MatterbridgeSwitchServer extends SwitchServer {
348
353
  initialize() {
349
354
  }
350
355
  }
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
+ }
@@ -1,7 +1,7 @@
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, } from './matterbridgeBehaviors.js';
4
+ import { MatterbridgeBehavior, MatterbridgeBehaviorDevice, MatterbridgeIdentifyServer, MatterbridgeOnOffServer, MatterbridgeLevelControlServer, MatterbridgeColorControlServer, MatterbridgeWindowCoveringServer, MatterbridgeThermostatServer, MatterbridgeFanControlServer, MatterbridgeDoorLockServer, MatterbridgeModeSelectServer, MatterbridgeValveConfigurationAndControlServer, MatterbridgeSmokeCoAlarmServer, MatterbridgeBooleanStateConfigurationServer, MatterbridgeSwitchServer, MatterbridgeRvcRunModeServer, MatterbridgeRvcCleanModeServer, MatterbridgeRvcOperationalStateServer, } 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
7
  import { ClusterType, getClusterNameById, MeasurementType } from '@matter/main/types';
@@ -57,9 +57,7 @@ import { Pm25ConcentrationMeasurementServer } from '@matter/main/behaviors/pm25-
57
57
  import { Pm10ConcentrationMeasurementServer } from '@matter/main/behaviors/pm10-concentration-measurement';
58
58
  import { RadonConcentrationMeasurementServer } from '@matter/main/behaviors/radon-concentration-measurement';
59
59
  import { TotalVolatileOrganicCompoundsConcentrationMeasurementServer } from '@matter/main/behaviors/total-volatile-organic-compounds-concentration-measurement';
60
- import { RvcRunModeServer } from '@matter/main/behaviors/rvc-run-mode';
61
- import { RvcOperationalStateServer } from '@matter/main/behaviors/rvc-operational-state';
62
- import { RvcCleanModeServer } from '@matter/main/behaviors/rvc-clean-mode';
60
+ import { RvcCleanMode } from '@matter/main/clusters/rvc-clean-mode';
63
61
  export class MatterbridgeEndpoint extends Endpoint {
64
62
  static bridgeMode = '';
65
63
  static logLevel = "info";
@@ -1157,17 +1155,33 @@ export class MatterbridgeEndpoint extends Endpoint {
1157
1155
  return this;
1158
1156
  }
1159
1157
  createDefaultRvcRunModeClusterServer() {
1160
- this.behaviors.require(RvcRunModeServer, {
1158
+ this.behaviors.require(MatterbridgeRvcRunModeServer.with(RvcRunMode.Feature.OnOff), {
1161
1159
  supportedModes: [
1162
1160
  { label: 'Idle', mode: 1, modeTags: [{ value: RvcRunMode.ModeTag.Idle }] },
1163
1161
  { label: 'Cleaning', mode: 2, modeTags: [{ value: RvcRunMode.ModeTag.Cleaning }] },
1162
+ { label: 'SpotCleaning', mode: 3, modeTags: [{ value: RvcRunMode.ModeTag.Cleaning }] },
1164
1163
  ],
1165
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,
1166
1180
  });
1167
1181
  return this;
1168
1182
  }
1169
1183
  createDefaultRvcOperationalStateClusterServer() {
1170
- this.behaviors.require(RvcOperationalStateServer, {
1184
+ this.behaviors.require(MatterbridgeRvcOperationalStateServer, {
1171
1185
  phaseList: [],
1172
1186
  currentPhase: null,
1173
1187
  operationalStateList: [
@@ -1179,19 +1193,8 @@ export class MatterbridgeEndpoint extends Endpoint {
1179
1193
  { operationalStateId: RvcOperationalState.OperationalState.Charging, operationalStateLabel: 'Charging' },
1180
1194
  { operationalStateId: RvcOperationalState.OperationalState.Docked, operationalStateLabel: 'Docked' },
1181
1195
  ],
1182
- operationalState: RvcOperationalState.OperationalState.Stopped,
1183
- operationalError: { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error' },
1184
- });
1185
- return this;
1186
- }
1187
- createDefaultRvcCleanModeClusterServer() {
1188
- this.behaviors.require(RvcCleanModeServer, {
1189
- supportedModes: [
1190
- { label: 'Idle', mode: 1, modeTags: [] },
1191
- { label: 'Cleaning', mode: 2, modeTags: [] },
1192
- { label: 'SpotCleaning', mode: 3, modeTags: [] },
1193
- ],
1194
- currentMode: 1,
1196
+ operationalState: RvcOperationalState.OperationalState.Docked,
1197
+ operationalError: { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error', errorStateDetails: 'Fully operative' },
1195
1198
  });
1196
1199
  return this;
1197
1200
  }
@@ -226,7 +226,7 @@ export class PluginManager {
226
226
  if (!packageJson.author)
227
227
  this.log.warn(`Plugin ${plg}${plugin.name}${wr} has no author in package.json`);
228
228
  if (!packageJson.homepage)
229
- this.log.warn(`Plugin ${plg}${plugin.name}${wr} has no homepage in package.json`);
229
+ this.log.info(`Plugin ${plg}${plugin.name}${nf} has no homepage in package.json`);
230
230
  if (!packageJson.type || packageJson.type !== 'module')
231
231
  this.log.error(`Plugin ${plg}${plugin.name}${er} is not a module`);
232
232
  if (!packageJson.main)
@@ -748,7 +748,13 @@ export class PluginManager {
748
748
  return schema;
749
749
  }
750
750
  catch (err) {
751
- this.log.debug(`Schema file ${schemaFile} for plugin ${plg}${plugin.name}${db} not found. Loading default schema. Error: ${err instanceof Error ? err.message + '\n' + err.stack : err}`);
751
+ const nodeErr = err;
752
+ if (nodeErr.code === 'ENOENT') {
753
+ this.log.debug(`Schema file ${schemaFile} for plugin ${plg}${plugin.name}${db} not found. Loading default schema.`);
754
+ }
755
+ else {
756
+ this.log.debug(`Schema file ${schemaFile} for plugin ${plg}${plugin.name}${db} not found. Loading default schema. Error: ${err instanceof Error ? err.message + '\n' + err.stack : err}`);
757
+ }
752
758
  return this.getDefaultSchema(plugin);
753
759
  }
754
760
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.ea7910e9.css",
4
- "main.js": "./static/js/main.1fa50342.js",
4
+ "main.js": "./static/js/main.fe57dcc8.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.1fa50342.js.map": "./static/js/main.1fa50342.js.map",
80
+ "main.fe57dcc8.js.map": "./static/js/main.fe57dcc8.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.1fa50342.js"
85
+ "static/js/main.fe57dcc8.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.1fa50342.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.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>