matterbridge 3.0.3 → 3.0.4-dev-20250525-b1cbfb7

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 (164) hide show
  1. package/CHANGELOG.md +25 -4
  2. package/README.md +6 -12
  3. package/dist/cli.js +2 -37
  4. package/dist/cluster/export.js +0 -2
  5. package/dist/defaultConfigSchema.js +0 -23
  6. package/dist/deviceManager.js +1 -94
  7. package/dist/frontend.js +100 -437
  8. package/dist/helpers.js +9 -53
  9. package/dist/index.js +1 -27
  10. package/dist/logger/export.js +0 -1
  11. package/dist/matter/behaviors.js +0 -2
  12. package/dist/matter/clusters.js +0 -2
  13. package/dist/matter/devices.js +0 -2
  14. package/dist/matter/endpoints.js +0 -2
  15. package/dist/matter/export.js +1 -3
  16. package/dist/matter/types.js +0 -2
  17. package/dist/matterbridge.js +47 -747
  18. package/dist/matterbridgeAccessoryPlatform.js +0 -34
  19. package/dist/matterbridgeBehaviors.js +43 -61
  20. package/dist/matterbridgeDeviceTypes.js +15 -563
  21. package/dist/matterbridgeDynamicPlatform.js +0 -34
  22. package/dist/matterbridgeEndpoint.js +68 -837
  23. package/dist/matterbridgeEndpointHelpers.js +33 -204
  24. package/dist/matterbridgePlatform.js +7 -225
  25. package/dist/matterbridgeTypes.js +0 -24
  26. package/dist/pluginManager.js +3 -264
  27. package/dist/roboticVacuumCleaner.js +3 -78
  28. package/dist/shelly.js +7 -155
  29. package/dist/storage/export.js +0 -1
  30. package/dist/update.js +0 -53
  31. package/dist/utils/colorUtils.js +2 -205
  32. package/dist/utils/commandLine.js +0 -53
  33. package/dist/utils/copyDirectory.js +1 -37
  34. package/dist/utils/createZip.js +2 -42
  35. package/dist/utils/deepCopy.js +0 -38
  36. package/dist/utils/deepEqual.js +1 -71
  37. package/dist/utils/export.js +0 -1
  38. package/dist/utils/hex.js +0 -57
  39. package/dist/utils/isvalid.js +0 -100
  40. package/dist/utils/network.js +5 -76
  41. package/dist/utils/wait.js +9 -58
  42. package/dist/waterHeater.js +0 -52
  43. package/npm-shrinkwrap.json +10 -10
  44. package/package.json +2 -3
  45. package/dist/cli.d.ts +0 -29
  46. package/dist/cli.d.ts.map +0 -1
  47. package/dist/cli.js.map +0 -1
  48. package/dist/cluster/export.d.ts +0 -2
  49. package/dist/cluster/export.d.ts.map +0 -1
  50. package/dist/cluster/export.js.map +0 -1
  51. package/dist/defaultConfigSchema.d.ts +0 -27
  52. package/dist/defaultConfigSchema.d.ts.map +0 -1
  53. package/dist/defaultConfigSchema.js.map +0 -1
  54. package/dist/deviceManager.d.ts +0 -114
  55. package/dist/deviceManager.d.ts.map +0 -1
  56. package/dist/deviceManager.js.map +0 -1
  57. package/dist/frontend.d.ts +0 -241
  58. package/dist/frontend.d.ts.map +0 -1
  59. package/dist/frontend.js.map +0 -1
  60. package/dist/helpers.d.ts +0 -47
  61. package/dist/helpers.d.ts.map +0 -1
  62. package/dist/helpers.js.map +0 -1
  63. package/dist/index.d.ts +0 -35
  64. package/dist/index.d.ts.map +0 -1
  65. package/dist/index.js.map +0 -1
  66. package/dist/logger/export.d.ts +0 -2
  67. package/dist/logger/export.d.ts.map +0 -1
  68. package/dist/logger/export.js.map +0 -1
  69. package/dist/matter/behaviors.d.ts +0 -2
  70. package/dist/matter/behaviors.d.ts.map +0 -1
  71. package/dist/matter/behaviors.js.map +0 -1
  72. package/dist/matter/clusters.d.ts +0 -2
  73. package/dist/matter/clusters.d.ts.map +0 -1
  74. package/dist/matter/clusters.js.map +0 -1
  75. package/dist/matter/devices.d.ts +0 -2
  76. package/dist/matter/devices.d.ts.map +0 -1
  77. package/dist/matter/devices.js.map +0 -1
  78. package/dist/matter/endpoints.d.ts +0 -2
  79. package/dist/matter/endpoints.d.ts.map +0 -1
  80. package/dist/matter/endpoints.js.map +0 -1
  81. package/dist/matter/export.d.ts +0 -5
  82. package/dist/matter/export.d.ts.map +0 -1
  83. package/dist/matter/export.js.map +0 -1
  84. package/dist/matter/types.d.ts +0 -3
  85. package/dist/matter/types.d.ts.map +0 -1
  86. package/dist/matter/types.js.map +0 -1
  87. package/dist/matterbridge.d.ts +0 -445
  88. package/dist/matterbridge.d.ts.map +0 -1
  89. package/dist/matterbridge.js.map +0 -1
  90. package/dist/matterbridgeAccessoryPlatform.d.ts +0 -40
  91. package/dist/matterbridgeAccessoryPlatform.d.ts.map +0 -1
  92. package/dist/matterbridgeAccessoryPlatform.js.map +0 -1
  93. package/dist/matterbridgeBehaviors.d.ts +0 -1201
  94. package/dist/matterbridgeBehaviors.d.ts.map +0 -1
  95. package/dist/matterbridgeBehaviors.js.map +0 -1
  96. package/dist/matterbridgeDeviceTypes.d.ts +0 -629
  97. package/dist/matterbridgeDeviceTypes.d.ts.map +0 -1
  98. package/dist/matterbridgeDeviceTypes.js.map +0 -1
  99. package/dist/matterbridgeDynamicPlatform.d.ts +0 -40
  100. package/dist/matterbridgeDynamicPlatform.d.ts.map +0 -1
  101. package/dist/matterbridgeDynamicPlatform.js.map +0 -1
  102. package/dist/matterbridgeEndpoint.d.ts +0 -967
  103. package/dist/matterbridgeEndpoint.d.ts.map +0 -1
  104. package/dist/matterbridgeEndpoint.js.map +0 -1
  105. package/dist/matterbridgeEndpointHelpers.d.ts +0 -2728
  106. package/dist/matterbridgeEndpointHelpers.d.ts.map +0 -1
  107. package/dist/matterbridgeEndpointHelpers.js.map +0 -1
  108. package/dist/matterbridgePlatform.d.ts +0 -294
  109. package/dist/matterbridgePlatform.d.ts.map +0 -1
  110. package/dist/matterbridgePlatform.js.map +0 -1
  111. package/dist/matterbridgeTypes.d.ts +0 -188
  112. package/dist/matterbridgeTypes.d.ts.map +0 -1
  113. package/dist/matterbridgeTypes.js.map +0 -1
  114. package/dist/pluginManager.d.ts +0 -273
  115. package/dist/pluginManager.d.ts.map +0 -1
  116. package/dist/pluginManager.js.map +0 -1
  117. package/dist/roboticVacuumCleaner.d.ts +0 -82
  118. package/dist/roboticVacuumCleaner.d.ts.map +0 -1
  119. package/dist/roboticVacuumCleaner.js.map +0 -1
  120. package/dist/shelly.d.ts +0 -153
  121. package/dist/shelly.d.ts.map +0 -1
  122. package/dist/shelly.js.map +0 -1
  123. package/dist/storage/export.d.ts +0 -2
  124. package/dist/storage/export.d.ts.map +0 -1
  125. package/dist/storage/export.js.map +0 -1
  126. package/dist/update.d.ts +0 -58
  127. package/dist/update.d.ts.map +0 -1
  128. package/dist/update.js.map +0 -1
  129. package/dist/utils/colorUtils.d.ts +0 -61
  130. package/dist/utils/colorUtils.d.ts.map +0 -1
  131. package/dist/utils/colorUtils.js.map +0 -1
  132. package/dist/utils/commandLine.d.ts +0 -58
  133. package/dist/utils/commandLine.d.ts.map +0 -1
  134. package/dist/utils/commandLine.js.map +0 -1
  135. package/dist/utils/copyDirectory.d.ts +0 -32
  136. package/dist/utils/copyDirectory.d.ts.map +0 -1
  137. package/dist/utils/copyDirectory.js.map +0 -1
  138. package/dist/utils/createZip.d.ts +0 -38
  139. package/dist/utils/createZip.d.ts.map +0 -1
  140. package/dist/utils/createZip.js.map +0 -1
  141. package/dist/utils/deepCopy.d.ts +0 -31
  142. package/dist/utils/deepCopy.d.ts.map +0 -1
  143. package/dist/utils/deepCopy.js.map +0 -1
  144. package/dist/utils/deepEqual.d.ts +0 -53
  145. package/dist/utils/deepEqual.d.ts.map +0 -1
  146. package/dist/utils/deepEqual.js.map +0 -1
  147. package/dist/utils/export.d.ts +0 -11
  148. package/dist/utils/export.d.ts.map +0 -1
  149. package/dist/utils/export.js.map +0 -1
  150. package/dist/utils/hex.d.ts +0 -48
  151. package/dist/utils/hex.d.ts.map +0 -1
  152. package/dist/utils/hex.js.map +0 -1
  153. package/dist/utils/isvalid.d.ts +0 -102
  154. package/dist/utils/isvalid.d.ts.map +0 -1
  155. package/dist/utils/isvalid.js.map +0 -1
  156. package/dist/utils/network.d.ts +0 -69
  157. package/dist/utils/network.d.ts.map +0 -1
  158. package/dist/utils/network.js.map +0 -1
  159. package/dist/utils/wait.d.ts +0 -52
  160. package/dist/utils/wait.d.ts.map +0 -1
  161. package/dist/utils/wait.js.map +0 -1
  162. package/dist/waterHeater.d.ts +0 -75
  163. package/dist/waterHeater.d.ts.map +0 -1
  164. package/dist/waterHeater.js.map +0 -1
@@ -1,38 +1,5 @@
1
- /**
2
- * This file contains the class MatterbridgeAccessoryPlatform.
3
- *
4
- * @file matterbridgeAccessoryPlatform.ts
5
- * @author Luca Liguori
6
- * @date 2023-12-29
7
- * @version 1.0.5
8
- *
9
- * Copyright 2023, 2024, 2025 Luca Liguori.
10
- *
11
- * Licensed under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License.
13
- * You may obtain a copy of the License at
14
- *
15
- * http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software
18
- * distributed under the License is distributed on an "AS IS" BASIS,
19
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- * See the License for the specific language governing permissions and
21
- * limitations under the License. *
22
- */
23
1
  import { MatterbridgePlatform } from './matterbridgePlatform.js';
24
- /**
25
- * Represents a Matterbridge accessory platform.
26
- *
27
- * This class extends the MatterbridgePlatform class.
28
- */
29
2
  export class MatterbridgeAccessoryPlatform extends MatterbridgePlatform {
30
- /**
31
- * Creates an instance of MatterbridgeAccessoryPlatform.
32
- * @param {Matterbridge} matterbridge - The Matterbridge instance.
33
- * @param {AnsiLogger} log - The logger instance.
34
- * @param {PlatformConfig} config - The platform configuration.
35
- */
36
3
  constructor(matterbridge, log, config) {
37
4
  super(matterbridge, log, config);
38
5
  this.type = 'AccessoryPlatform';
@@ -40,4 +7,3 @@ export class MatterbridgeAccessoryPlatform extends MatterbridgePlatform {
40
7
  this.log.debug(`Matterbridge${this.type} loaded`);
41
8
  }
42
9
  }
43
- //# sourceMappingURL=matterbridgeAccessoryPlatform.js.map
@@ -1,31 +1,4 @@
1
- /**
2
- * This file contains the class MatterbridgeEndpoint that extends the Endpoint class from the Matter.js library.
3
- *
4
- * @file matterbridgeBehaviors.ts
5
- * @author Luca Liguori
6
- * @date 2024-11-07
7
- * @version 1.0.0
8
- *
9
- * Copyright 2024, 2025, 2026 Luca Liguori.
10
- *
11
- * Licensed under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License.
13
- * You may obtain a copy of the License at
14
- *
15
- * http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software
18
- * distributed under the License is distributed on an "AS IS" BASIS,
19
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- * See the License for the specific language governing permissions and
21
- * limitations under the License. *
22
- */
23
- /* eslint-disable @typescript-eslint/no-namespace */
24
- /* eslint-disable @typescript-eslint/no-unused-vars */
25
- /* eslint-disable @typescript-eslint/no-explicit-any */
26
- // @matter
27
1
  import { Behavior } from '@matter/main';
28
- // @matter clusters
29
2
  import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
30
3
  import { ColorControl } from '@matter/main/clusters/color-control';
31
4
  import { FanControl } from '@matter/main/clusters/fan-control';
@@ -40,7 +13,6 @@ import { RvcRunMode } from '@matter/main/clusters/rvc-run-mode';
40
13
  import { RvcOperationalState } from '@matter/main/clusters/rvc-operational-state';
41
14
  import { ServiceArea } from '@matter/main/clusters/service-area';
42
15
  import { WaterHeaterManagement } from '@matter/main/clusters/water-heater-management';
43
- // @matter behaviors
44
16
  import { IdentifyServer } from '@matter/main/behaviors/identify';
45
17
  import { OnOffServer } from '@matter/main/behaviors/on-off';
46
18
  import { LevelControlServer } from '@matter/main/behaviors/level-control';
@@ -63,7 +35,7 @@ import { WaterHeaterManagementServer } from '@matter/main/behaviors/water-heater
63
35
  export class MatterbridgeServerDevice {
64
36
  log;
65
37
  commandHandler;
66
- device; // Will be a plugin device
38
+ device;
67
39
  endpointId = undefined;
68
40
  endpointNumber = undefined;
69
41
  constructor(log, commandHandler, device) {
@@ -145,6 +117,10 @@ export class MatterbridgeServerDevice {
145
117
  this.log.info(`Setting cover lift percentage to ${liftPercent100thsValue} (endpoint ${this.endpointId}.${this.endpointNumber})`);
146
118
  this.commandHandler.executeHandler('goToLiftPercentage', { request: { liftPercent100thsValue }, attributes: {}, endpoint: { number: this.endpointNumber, uniqueStorageKey: this.endpointId } });
147
119
  }
120
+ goToTiltPercentage({ tiltPercent100thsValue }) {
121
+ this.log.info(`Setting cover tilt percentage to ${tiltPercent100thsValue} (endpoint ${this.endpointId}.${this.endpointNumber})`);
122
+ this.commandHandler.executeHandler('goToTiltPercentage', { request: { tiltPercent100thsValue }, attributes: {}, endpoint: { number: this.endpointNumber, uniqueStorageKey: this.endpointId } });
123
+ }
148
124
  lockDoor() {
149
125
  this.log.info(`Locking door (endpoint ${this.endpointId}.${this.endpointNumber})`);
150
126
  this.commandHandler.executeHandler('lockDoor', { request: {}, attributes: {}, endpoint: { number: this.endpointNumber, uniqueStorageKey: this.endpointId } });
@@ -309,7 +285,7 @@ export class MatterbridgeColorControlServer extends ColorControlServer.with(Colo
309
285
  super.moveToColorTemperature({ optionsOverride, optionsMask, colorTemperatureMireds, transitionTime });
310
286
  }
311
287
  }
312
- export class MatterbridgeWindowCoveringServer extends WindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift) {
288
+ export class MatterbridgeLiftWindowCoveringServer extends WindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift) {
313
289
  upOrOpen() {
314
290
  const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
315
291
  device.upOrOpen();
@@ -335,7 +311,40 @@ export class MatterbridgeWindowCoveringServer extends WindowCoveringServer.with(
335
311
  super.goToLiftPercentage({ liftPercent100thsValue });
336
312
  }
337
313
  async handleMovement(type, reversed, direction, targetPercent100ths) {
338
- // Do nothing here, as the device will handle the movement
314
+ }
315
+ }
316
+ export class MatterbridgeLiftTiltWindowCoveringServer extends WindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt) {
317
+ upOrOpen() {
318
+ const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
319
+ device.upOrOpen();
320
+ device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: upOrOpen called`);
321
+ super.upOrOpen();
322
+ }
323
+ downOrClose() {
324
+ const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
325
+ device.downOrClose();
326
+ device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: downOrClose called`);
327
+ super.downOrClose();
328
+ }
329
+ stopMotion() {
330
+ const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
331
+ device.stopMotion();
332
+ device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: stopMotion called`);
333
+ super.stopMotion();
334
+ }
335
+ goToLiftPercentage({ liftPercent100thsValue }) {
336
+ const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
337
+ device.goToLiftPercentage({ liftPercent100thsValue });
338
+ device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: goToLiftPercentage with ${liftPercent100thsValue}`);
339
+ super.goToLiftPercentage({ liftPercent100thsValue });
340
+ }
341
+ goToTiltPercentage({ tiltPercent100thsValue }) {
342
+ const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
343
+ device.goToTiltPercentage({ tiltPercent100thsValue });
344
+ device.log.debug(`MatterbridgeLiftTiltWindowCoveringServer: goToTiltPercentage with ${tiltPercent100thsValue}`);
345
+ super.goToTiltPercentage({ tiltPercent100thsValue });
346
+ }
347
+ async handleMovement(type, reversed, direction, targetPercent100ths) {
339
348
  }
340
349
  }
341
350
  export class MatterbridgeDoorLockServer extends DoorLockServer {
@@ -382,8 +391,6 @@ export class MatterbridgeFanControlServer extends FanControlServer.with(FanContr
382
391
  this.state.percentCurrent = Math.max(this.state.percentCurrent - 10, lowestOff ? 0 : 10);
383
392
  }
384
393
  device.log.debug('Set percentCurrent to:', this.state.percentCurrent);
385
- // step is not implemented in matter.js
386
- // super.step();
387
394
  }
388
395
  }
389
396
  export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode) {
@@ -404,8 +411,6 @@ export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermost
404
411
  this.state.occupiedCoolingSetpoint = setpoint * 100;
405
412
  device.log.debug(`Set occupiedCoolingSetpoint to ${setpoint}`);
406
413
  }
407
- // setpointRaiseLower is not implemented in matter.js
408
- // super.setpointRaiseLower();
409
414
  }
410
415
  }
411
416
  export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigurationAndControlServer.with(ValveConfigurationAndControl.Feature.Level) {
@@ -415,8 +420,6 @@ export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigu
415
420
  device.open({ openDuration, targetLevel });
416
421
  this.state.targetLevel = targetLevel ?? 100;
417
422
  this.state.currentLevel = targetLevel ?? 100;
418
- // open is not implemented in matter.js
419
- // super.open();
420
423
  }
421
424
  close() {
422
425
  const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
@@ -424,8 +427,6 @@ export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigu
424
427
  device.close();
425
428
  this.state.targetLevel = 0;
426
429
  this.state.currentLevel = 0;
427
- // close is not implemented in matter.js
428
- // super.close();
429
430
  }
430
431
  }
431
432
  export class MatterbridgeSmokeCoAlarmServer extends SmokeCoAlarmServer.with(SmokeCoAlarm.Feature.SmokeAlarm, SmokeCoAlarm.Feature.CoAlarm) {
@@ -433,8 +434,6 @@ export class MatterbridgeSmokeCoAlarmServer extends SmokeCoAlarmServer.with(Smok
433
434
  const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
434
435
  device.log.debug(`MatterbridgeSmokeCoAlarmServer: selfTestRequest called`);
435
436
  device.selfTestRequest();
436
- // selfTestRequest is not implemented in matter.js
437
- // super.selfTestRequest();
438
437
  }
439
438
  }
440
439
  export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateConfigurationServer.with(BooleanStateConfiguration.Feature.Visual, BooleanStateConfiguration.Feature.Audible, BooleanStateConfiguration.Feature.SensitivityLevel) {
@@ -442,13 +441,10 @@ export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateCon
442
441
  const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
443
442
  device.log.debug(`MatterbridgeBooleanStateConfigurationServer: enableDisableAlarm called`);
444
443
  device.enableDisableAlarm({ alarmsToEnableDisable });
445
- // enableDisableAlarm is not implemented in matter.js
446
- // super.enableDisableAlarm({ alarmsToEnableDisable });
447
444
  }
448
445
  }
449
446
  export class MatterbridgeSwitchServer extends SwitchServer {
450
447
  initialize() {
451
- // Do nothing here, as the device will handle the switch logic: we need to convert something like "single" into the oppropriate states and events sequences
452
448
  }
453
449
  }
454
450
  export class MatterbridgeOperationalStateServer extends OperationalStateServer {
@@ -464,7 +460,6 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
464
460
  device.pause();
465
461
  this.state.operationalState = OperationalState.OperationalStateEnum.Paused;
466
462
  this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
467
- // pause is not implemented in matter.js
468
463
  return {
469
464
  commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' },
470
465
  };
@@ -475,7 +470,6 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
475
470
  device.stop();
476
471
  this.state.operationalState = OperationalState.OperationalStateEnum.Stopped;
477
472
  this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
478
- // stop is not implemented in matter.js
479
473
  return {
480
474
  commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' },
481
475
  };
@@ -486,7 +480,6 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
486
480
  device.start();
487
481
  this.state.operationalState = OperationalState.OperationalStateEnum.Running;
488
482
  this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
489
- // start is not implemented in matter.js
490
483
  return {
491
484
  commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' },
492
485
  };
@@ -497,13 +490,11 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
497
490
  device.resume();
498
491
  this.state.operationalState = OperationalState.OperationalStateEnum.Running;
499
492
  this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
500
- // resume is not implemented in matter.js
501
493
  return {
502
494
  commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' },
503
495
  };
504
496
  }
505
497
  }
506
- /** ********************************************* roboticVacuumCleaner **********************************************************/
507
498
  export class MatterbridgeRvcRunModeServer extends RvcRunModeServer {
508
499
  changeToMode({ newMode }) {
509
500
  const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
@@ -548,7 +539,7 @@ export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateSe
548
539
  const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
549
540
  device.log.info('MatterbridgeRvcOperationalStateServer: pause called setting operational state to Paused and currentMode to Idle');
550
541
  device.pause();
551
- this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1; // RvcRunMode.ModeTag.Idle
542
+ this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
552
543
  this.state.operationalState = RvcOperationalState.OperationalState.Paused;
553
544
  this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error', errorStateDetails: 'Fully operational' };
554
545
  return {
@@ -559,7 +550,7 @@ export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateSe
559
550
  const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
560
551
  device.log.info('MatterbridgeRvcOperationalStateServer: resume called setting operational state to Running and currentMode to Cleaning');
561
552
  device.resume();
562
- this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 2; // RvcRunMode.ModeTag.Cleaning
553
+ this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 2;
563
554
  this.state.operationalState = RvcOperationalState.OperationalState.Running;
564
555
  this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error', errorStateDetails: 'Fully operational' };
565
556
  return {
@@ -567,11 +558,10 @@ export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateSe
567
558
  };
568
559
  }
569
560
  goHome() {
570
- // const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
571
561
  const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
572
562
  device.log.info('MatterbridgeRvcOperationalStateServer: goHome called setting operational state to Docked and currentMode to Idle');
573
563
  device.goHome();
574
- this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1; // RvcRunMode.ModeTag.Idle
564
+ this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
575
565
  this.state.operationalState = RvcOperationalState.OperationalState.Docked;
576
566
  this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error', errorStateDetails: 'Fully operational' };
577
567
  return {
@@ -597,25 +587,18 @@ export class MatterbridgeServiceAreaServer extends ServiceAreaServer {
597
587
  return { status: ServiceArea.SelectAreasStatus.Success, statusText: 'Succesfully selected new areas' };
598
588
  }
599
589
  }
600
- /** ********************************************* waterHeater **********************************************************/
601
590
  export class MatterbridgeWaterHeaterManagementServer extends WaterHeaterManagementServer {
602
591
  boost({ boostInfo }) {
603
592
  const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
604
593
  device.boost({ boostInfo });
605
594
  device.log.info(`MatterbridgeWaterHeaterManagementServer boost called with: ${JSON.stringify(boostInfo)}`);
606
595
  this.state.boostState = WaterHeaterManagement.BoostState.Active;
607
- // The plugin is responsible for setting the device accordingly with the boostInfo of the boost command
608
- // super.boost({ boostInfo });
609
- // boost is not implemented in matter.js
610
596
  }
611
597
  cancelBoost() {
612
598
  const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
613
599
  device.cancelBoost();
614
600
  device.log.info(`MatterbridgeWaterHeaterManagementServer cancelBoost called`);
615
601
  this.state.boostState = WaterHeaterManagement.BoostState.Inactive;
616
- // The plugin is responsible for setting the device accordingly with the cancelBoost command
617
- // super.cancelBoost();
618
- // cancelBoost is not implemented in matter.js
619
602
  }
620
603
  }
621
604
  export class MatterbridgeWaterHeaterModeServer extends WaterHeaterModeServer {
@@ -632,4 +615,3 @@ export class MatterbridgeWaterHeaterModeServer extends WaterHeaterModeServer {
632
615
  return { status: ModeBase.ModeChangeStatus.Success, statusText: 'Success' };
633
616
  }
634
617
  }
635
- //# sourceMappingURL=matterbridgeBehaviors.js.map