matterbridge 3.0.4 → 3.0.5-dev-20250526-422f029
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 +14 -0
- package/dist/cli.js +16 -43
- package/dist/cluster/export.js +0 -2
- package/dist/defaultConfigSchema.js +0 -23
- package/dist/deviceManager.js +1 -94
- package/dist/frontend.js +16 -363
- package/dist/helpers.js +0 -51
- package/dist/index.js +1 -27
- package/dist/laundryWasher.js +122 -0
- package/dist/logger/export.js +0 -1
- package/dist/matter/behaviors.js +0 -2
- package/dist/matter/clusters.js +0 -2
- package/dist/matter/devices.js +0 -2
- package/dist/matter/endpoints.js +0 -2
- package/dist/matter/export.js +0 -2
- package/dist/matter/types.js +0 -2
- package/dist/matterbridge.js +47 -747
- package/dist/matterbridgeAccessoryPlatform.js +0 -34
- package/dist/matterbridgeBehaviors.js +4 -63
- package/dist/matterbridgeDeviceTypes.js +15 -563
- package/dist/matterbridgeDynamicPlatform.js +0 -34
- package/dist/matterbridgeEndpoint.js +23 -903
- package/dist/matterbridgeEndpointHelpers.js +11 -173
- package/dist/matterbridgePlatform.js +7 -225
- package/dist/matterbridgeTypes.js +0 -24
- package/dist/pluginManager.js +3 -264
- package/dist/roboticVacuumCleaner.js +3 -78
- package/dist/shelly.js +7 -155
- package/dist/storage/export.js +0 -1
- package/dist/update.js +0 -53
- package/dist/utils/colorUtils.js +2 -205
- package/dist/utils/commandLine.js +0 -53
- package/dist/utils/copyDirectory.js +1 -37
- package/dist/utils/createZip.js +2 -42
- package/dist/utils/deepCopy.js +0 -38
- package/dist/utils/deepEqual.js +1 -71
- package/dist/utils/export.js +0 -1
- package/dist/utils/hex.js +0 -57
- package/dist/utils/isvalid.js +0 -100
- package/dist/utils/network.js +5 -76
- package/dist/utils/wait.js +9 -58
- package/dist/waterHeater.js +0 -52
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -2
- package/dist/cli.d.ts +0 -29
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/cluster/export.d.ts +0 -2
- package/dist/cluster/export.d.ts.map +0 -1
- package/dist/cluster/export.js.map +0 -1
- package/dist/defaultConfigSchema.d.ts +0 -27
- package/dist/defaultConfigSchema.d.ts.map +0 -1
- package/dist/defaultConfigSchema.js.map +0 -1
- package/dist/deviceManager.d.ts +0 -114
- package/dist/deviceManager.d.ts.map +0 -1
- package/dist/deviceManager.js.map +0 -1
- package/dist/frontend.d.ts +0 -256
- package/dist/frontend.d.ts.map +0 -1
- package/dist/frontend.js.map +0 -1
- package/dist/helpers.d.ts +0 -47
- package/dist/helpers.d.ts.map +0 -1
- package/dist/helpers.js.map +0 -1
- package/dist/index.d.ts +0 -35
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/logger/export.d.ts +0 -2
- package/dist/logger/export.d.ts.map +0 -1
- package/dist/logger/export.js.map +0 -1
- package/dist/matter/behaviors.d.ts +0 -2
- package/dist/matter/behaviors.d.ts.map +0 -1
- package/dist/matter/behaviors.js.map +0 -1
- package/dist/matter/clusters.d.ts +0 -2
- package/dist/matter/clusters.d.ts.map +0 -1
- package/dist/matter/clusters.js.map +0 -1
- package/dist/matter/devices.d.ts +0 -2
- package/dist/matter/devices.d.ts.map +0 -1
- package/dist/matter/devices.js.map +0 -1
- package/dist/matter/endpoints.d.ts +0 -2
- package/dist/matter/endpoints.d.ts.map +0 -1
- package/dist/matter/endpoints.js.map +0 -1
- package/dist/matter/export.d.ts +0 -5
- package/dist/matter/export.d.ts.map +0 -1
- package/dist/matter/export.js.map +0 -1
- package/dist/matter/types.d.ts +0 -3
- package/dist/matter/types.d.ts.map +0 -1
- package/dist/matter/types.js.map +0 -1
- package/dist/matterbridge.d.ts +0 -445
- package/dist/matterbridge.d.ts.map +0 -1
- package/dist/matterbridge.js.map +0 -1
- package/dist/matterbridgeAccessoryPlatform.d.ts +0 -40
- package/dist/matterbridgeAccessoryPlatform.d.ts.map +0 -1
- package/dist/matterbridgeAccessoryPlatform.js.map +0 -1
- package/dist/matterbridgeBehaviors.d.ts +0 -1398
- package/dist/matterbridgeBehaviors.d.ts.map +0 -1
- package/dist/matterbridgeBehaviors.js.map +0 -1
- package/dist/matterbridgeDeviceTypes.d.ts +0 -629
- package/dist/matterbridgeDeviceTypes.d.ts.map +0 -1
- package/dist/matterbridgeDeviceTypes.js.map +0 -1
- package/dist/matterbridgeDynamicPlatform.d.ts +0 -40
- package/dist/matterbridgeDynamicPlatform.d.ts.map +0 -1
- package/dist/matterbridgeDynamicPlatform.js.map +0 -1
- package/dist/matterbridgeEndpoint.d.ts +0 -1053
- package/dist/matterbridgeEndpoint.d.ts.map +0 -1
- package/dist/matterbridgeEndpoint.js.map +0 -1
- package/dist/matterbridgeEndpointHelpers.d.ts +0 -2749
- package/dist/matterbridgeEndpointHelpers.d.ts.map +0 -1
- package/dist/matterbridgeEndpointHelpers.js.map +0 -1
- package/dist/matterbridgePlatform.d.ts +0 -294
- package/dist/matterbridgePlatform.d.ts.map +0 -1
- package/dist/matterbridgePlatform.js.map +0 -1
- package/dist/matterbridgeTypes.d.ts +0 -196
- package/dist/matterbridgeTypes.d.ts.map +0 -1
- package/dist/matterbridgeTypes.js.map +0 -1
- package/dist/pluginManager.d.ts +0 -273
- package/dist/pluginManager.d.ts.map +0 -1
- package/dist/pluginManager.js.map +0 -1
- package/dist/roboticVacuumCleaner.d.ts +0 -82
- package/dist/roboticVacuumCleaner.d.ts.map +0 -1
- package/dist/roboticVacuumCleaner.js.map +0 -1
- package/dist/shelly.d.ts +0 -153
- package/dist/shelly.d.ts.map +0 -1
- package/dist/shelly.js.map +0 -1
- package/dist/storage/export.d.ts +0 -2
- package/dist/storage/export.d.ts.map +0 -1
- package/dist/storage/export.js.map +0 -1
- package/dist/update.d.ts +0 -58
- package/dist/update.d.ts.map +0 -1
- package/dist/update.js.map +0 -1
- package/dist/utils/colorUtils.d.ts +0 -61
- package/dist/utils/colorUtils.d.ts.map +0 -1
- package/dist/utils/colorUtils.js.map +0 -1
- package/dist/utils/commandLine.d.ts +0 -58
- package/dist/utils/commandLine.d.ts.map +0 -1
- package/dist/utils/commandLine.js.map +0 -1
- package/dist/utils/copyDirectory.d.ts +0 -32
- package/dist/utils/copyDirectory.d.ts.map +0 -1
- package/dist/utils/copyDirectory.js.map +0 -1
- package/dist/utils/createZip.d.ts +0 -38
- package/dist/utils/createZip.d.ts.map +0 -1
- package/dist/utils/createZip.js.map +0 -1
- package/dist/utils/deepCopy.d.ts +0 -31
- package/dist/utils/deepCopy.d.ts.map +0 -1
- package/dist/utils/deepCopy.js.map +0 -1
- package/dist/utils/deepEqual.d.ts +0 -53
- package/dist/utils/deepEqual.d.ts.map +0 -1
- package/dist/utils/deepEqual.js.map +0 -1
- package/dist/utils/export.d.ts +0 -11
- package/dist/utils/export.d.ts.map +0 -1
- package/dist/utils/export.js.map +0 -1
- package/dist/utils/hex.d.ts +0 -48
- package/dist/utils/hex.d.ts.map +0 -1
- package/dist/utils/hex.js.map +0 -1
- package/dist/utils/isvalid.d.ts +0 -102
- package/dist/utils/isvalid.d.ts.map +0 -1
- package/dist/utils/isvalid.js.map +0 -1
- package/dist/utils/network.d.ts +0 -69
- package/dist/utils/network.d.ts.map +0 -1
- package/dist/utils/network.js.map +0 -1
- package/dist/utils/wait.d.ts +0 -52
- package/dist/utils/wait.d.ts.map +0 -1
- package/dist/utils/wait.js.map +0 -1
- package/dist/waterHeater.d.ts +0 -75
- package/dist/waterHeater.d.ts.map +0 -1
- 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;
|
|
38
|
+
device;
|
|
67
39
|
endpointId = undefined;
|
|
68
40
|
endpointNumber = undefined;
|
|
69
41
|
constructor(log, commandHandler, device) {
|
|
@@ -339,7 +311,6 @@ export class MatterbridgeLiftWindowCoveringServer extends WindowCoveringServer.w
|
|
|
339
311
|
super.goToLiftPercentage({ liftPercent100thsValue });
|
|
340
312
|
}
|
|
341
313
|
async handleMovement(type, reversed, direction, targetPercent100ths) {
|
|
342
|
-
// Do nothing here, as the device will handle the movement
|
|
343
314
|
}
|
|
344
315
|
}
|
|
345
316
|
export class MatterbridgeLiftTiltWindowCoveringServer extends WindowCoveringServer.with(WindowCovering.Feature.Lift, WindowCovering.Feature.PositionAwareLift, WindowCovering.Feature.Tilt, WindowCovering.Feature.PositionAwareTilt) {
|
|
@@ -374,7 +345,6 @@ export class MatterbridgeLiftTiltWindowCoveringServer extends WindowCoveringServ
|
|
|
374
345
|
super.goToTiltPercentage({ tiltPercent100thsValue });
|
|
375
346
|
}
|
|
376
347
|
async handleMovement(type, reversed, direction, targetPercent100ths) {
|
|
377
|
-
// Do nothing here, as the device will handle the movement
|
|
378
348
|
}
|
|
379
349
|
}
|
|
380
350
|
export class MatterbridgeDoorLockServer extends DoorLockServer {
|
|
@@ -421,8 +391,6 @@ export class MatterbridgeFanControlServer extends FanControlServer.with(FanContr
|
|
|
421
391
|
this.state.percentCurrent = Math.max(this.state.percentCurrent - 10, lowestOff ? 0 : 10);
|
|
422
392
|
}
|
|
423
393
|
device.log.debug('Set percentCurrent to:', this.state.percentCurrent);
|
|
424
|
-
// step is not implemented in matter.js
|
|
425
|
-
// super.step();
|
|
426
394
|
}
|
|
427
395
|
}
|
|
428
396
|
export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermostat.Feature.Cooling, Thermostat.Feature.Heating, Thermostat.Feature.AutoMode) {
|
|
@@ -443,8 +411,6 @@ export class MatterbridgeThermostatServer extends ThermostatServer.with(Thermost
|
|
|
443
411
|
this.state.occupiedCoolingSetpoint = setpoint * 100;
|
|
444
412
|
device.log.debug(`Set occupiedCoolingSetpoint to ${setpoint}`);
|
|
445
413
|
}
|
|
446
|
-
// setpointRaiseLower is not implemented in matter.js
|
|
447
|
-
// super.setpointRaiseLower();
|
|
448
414
|
}
|
|
449
415
|
}
|
|
450
416
|
export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigurationAndControlServer.with(ValveConfigurationAndControl.Feature.Level) {
|
|
@@ -454,8 +420,6 @@ export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigu
|
|
|
454
420
|
device.open({ openDuration, targetLevel });
|
|
455
421
|
this.state.targetLevel = targetLevel ?? 100;
|
|
456
422
|
this.state.currentLevel = targetLevel ?? 100;
|
|
457
|
-
// open is not implemented in matter.js
|
|
458
|
-
// super.open();
|
|
459
423
|
}
|
|
460
424
|
close() {
|
|
461
425
|
const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
|
|
@@ -463,8 +427,6 @@ export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigu
|
|
|
463
427
|
device.close();
|
|
464
428
|
this.state.targetLevel = 0;
|
|
465
429
|
this.state.currentLevel = 0;
|
|
466
|
-
// close is not implemented in matter.js
|
|
467
|
-
// super.close();
|
|
468
430
|
}
|
|
469
431
|
}
|
|
470
432
|
export class MatterbridgeSmokeCoAlarmServer extends SmokeCoAlarmServer.with(SmokeCoAlarm.Feature.SmokeAlarm, SmokeCoAlarm.Feature.CoAlarm) {
|
|
@@ -472,8 +434,6 @@ export class MatterbridgeSmokeCoAlarmServer extends SmokeCoAlarmServer.with(Smok
|
|
|
472
434
|
const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
|
|
473
435
|
device.log.debug(`MatterbridgeSmokeCoAlarmServer: selfTestRequest called`);
|
|
474
436
|
device.selfTestRequest();
|
|
475
|
-
// selfTestRequest is not implemented in matter.js
|
|
476
|
-
// super.selfTestRequest();
|
|
477
437
|
}
|
|
478
438
|
}
|
|
479
439
|
export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateConfigurationServer.with(BooleanStateConfiguration.Feature.Visual, BooleanStateConfiguration.Feature.Audible, BooleanStateConfiguration.Feature.SensitivityLevel) {
|
|
@@ -481,13 +441,10 @@ export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateCon
|
|
|
481
441
|
const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
|
|
482
442
|
device.log.debug(`MatterbridgeBooleanStateConfigurationServer: enableDisableAlarm called`);
|
|
483
443
|
device.enableDisableAlarm({ alarmsToEnableDisable });
|
|
484
|
-
// enableDisableAlarm is not implemented in matter.js
|
|
485
|
-
// super.enableDisableAlarm({ alarmsToEnableDisable });
|
|
486
444
|
}
|
|
487
445
|
}
|
|
488
446
|
export class MatterbridgeSwitchServer extends SwitchServer {
|
|
489
447
|
initialize() {
|
|
490
|
-
// 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
|
|
491
448
|
}
|
|
492
449
|
}
|
|
493
450
|
export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
@@ -503,7 +460,6 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
503
460
|
device.pause();
|
|
504
461
|
this.state.operationalState = OperationalState.OperationalStateEnum.Paused;
|
|
505
462
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
|
506
|
-
// pause is not implemented in matter.js
|
|
507
463
|
return {
|
|
508
464
|
commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' },
|
|
509
465
|
};
|
|
@@ -514,7 +470,6 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
514
470
|
device.stop();
|
|
515
471
|
this.state.operationalState = OperationalState.OperationalStateEnum.Stopped;
|
|
516
472
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
|
517
|
-
// stop is not implemented in matter.js
|
|
518
473
|
return {
|
|
519
474
|
commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' },
|
|
520
475
|
};
|
|
@@ -525,7 +480,6 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
525
480
|
device.start();
|
|
526
481
|
this.state.operationalState = OperationalState.OperationalStateEnum.Running;
|
|
527
482
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
|
528
|
-
// start is not implemented in matter.js
|
|
529
483
|
return {
|
|
530
484
|
commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' },
|
|
531
485
|
};
|
|
@@ -536,13 +490,11 @@ export class MatterbridgeOperationalStateServer extends OperationalStateServer {
|
|
|
536
490
|
device.resume();
|
|
537
491
|
this.state.operationalState = OperationalState.OperationalStateEnum.Running;
|
|
538
492
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
|
539
|
-
// resume is not implemented in matter.js
|
|
540
493
|
return {
|
|
541
494
|
commandResponseState: { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' },
|
|
542
495
|
};
|
|
543
496
|
}
|
|
544
497
|
}
|
|
545
|
-
/** ********************************************* roboticVacuumCleaner **********************************************************/
|
|
546
498
|
export class MatterbridgeRvcRunModeServer extends RvcRunModeServer {
|
|
547
499
|
changeToMode({ newMode }) {
|
|
548
500
|
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
|
@@ -587,7 +539,7 @@ export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateSe
|
|
|
587
539
|
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
|
588
540
|
device.log.info('MatterbridgeRvcOperationalStateServer: pause called setting operational state to Paused and currentMode to Idle');
|
|
589
541
|
device.pause();
|
|
590
|
-
this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
|
|
542
|
+
this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
|
|
591
543
|
this.state.operationalState = RvcOperationalState.OperationalState.Paused;
|
|
592
544
|
this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error', errorStateDetails: 'Fully operational' };
|
|
593
545
|
return {
|
|
@@ -598,7 +550,7 @@ export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateSe
|
|
|
598
550
|
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
|
599
551
|
device.log.info('MatterbridgeRvcOperationalStateServer: resume called setting operational state to Running and currentMode to Cleaning');
|
|
600
552
|
device.resume();
|
|
601
|
-
this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 2;
|
|
553
|
+
this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 2;
|
|
602
554
|
this.state.operationalState = RvcOperationalState.OperationalState.Running;
|
|
603
555
|
this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error', errorStateDetails: 'Fully operational' };
|
|
604
556
|
return {
|
|
@@ -606,11 +558,10 @@ export class MatterbridgeRvcOperationalStateServer extends RvcOperationalStateSe
|
|
|
606
558
|
};
|
|
607
559
|
}
|
|
608
560
|
goHome() {
|
|
609
|
-
// const device = this.agent.get(MatterbridgeServer).state.deviceCommand;
|
|
610
561
|
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
|
611
562
|
device.log.info('MatterbridgeRvcOperationalStateServer: goHome called setting operational state to Docked and currentMode to Idle');
|
|
612
563
|
device.goHome();
|
|
613
|
-
this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
|
|
564
|
+
this.agent.get(MatterbridgeRvcRunModeServer).state.currentMode = 1;
|
|
614
565
|
this.state.operationalState = RvcOperationalState.OperationalState.Docked;
|
|
615
566
|
this.state.operationalError = { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error', errorStateDetails: 'Fully operational' };
|
|
616
567
|
return {
|
|
@@ -630,31 +581,22 @@ export class MatterbridgeServiceAreaServer extends ServiceAreaServer {
|
|
|
630
581
|
}
|
|
631
582
|
device.selectAreas({ newAreas });
|
|
632
583
|
this.state.selectedAreas = newAreas;
|
|
633
|
-
this.state.currentArea = newAreas[0];
|
|
634
584
|
device.log.info(`MatterbridgeServiceAreaServer selectAreas called with: ${newAreas.map((area) => area.toString()).join(', ')}`);
|
|
635
|
-
device.selectAreas({ newAreas });
|
|
636
585
|
return { status: ServiceArea.SelectAreasStatus.Success, statusText: 'Succesfully selected new areas' };
|
|
637
586
|
}
|
|
638
587
|
}
|
|
639
|
-
/** ********************************************* waterHeater **********************************************************/
|
|
640
588
|
export class MatterbridgeWaterHeaterManagementServer extends WaterHeaterManagementServer {
|
|
641
589
|
boost({ boostInfo }) {
|
|
642
590
|
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
|
643
591
|
device.boost({ boostInfo });
|
|
644
592
|
device.log.info(`MatterbridgeWaterHeaterManagementServer boost called with: ${JSON.stringify(boostInfo)}`);
|
|
645
593
|
this.state.boostState = WaterHeaterManagement.BoostState.Active;
|
|
646
|
-
// The plugin is responsible for setting the device accordingly with the boostInfo of the boost command
|
|
647
|
-
// super.boost({ boostInfo });
|
|
648
|
-
// boost is not implemented in matter.js
|
|
649
594
|
}
|
|
650
595
|
cancelBoost() {
|
|
651
596
|
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
|
652
597
|
device.cancelBoost();
|
|
653
598
|
device.log.info(`MatterbridgeWaterHeaterManagementServer cancelBoost called`);
|
|
654
599
|
this.state.boostState = WaterHeaterManagement.BoostState.Inactive;
|
|
655
|
-
// The plugin is responsible for setting the device accordingly with the cancelBoost command
|
|
656
|
-
// super.cancelBoost();
|
|
657
|
-
// cancelBoost is not implemented in matter.js
|
|
658
600
|
}
|
|
659
601
|
}
|
|
660
602
|
export class MatterbridgeWaterHeaterModeServer extends WaterHeaterModeServer {
|
|
@@ -671,4 +613,3 @@ export class MatterbridgeWaterHeaterModeServer extends WaterHeaterModeServer {
|
|
|
671
613
|
return { status: ModeBase.ModeChangeStatus.Success, statusText: 'Success' };
|
|
672
614
|
}
|
|
673
615
|
}
|
|
674
|
-
//# sourceMappingURL=matterbridgeBehaviors.js.map
|