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.
- package/CHANGELOG.md +25 -4
- package/README.md +6 -12
- package/dist/cli.js +2 -37
- package/dist/cluster/export.js +0 -2
- package/dist/defaultConfigSchema.js +0 -23
- package/dist/deviceManager.js +1 -94
- package/dist/frontend.js +100 -437
- package/dist/helpers.js +9 -53
- package/dist/index.js +1 -27
- 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 +1 -3
- package/dist/matter/types.js +0 -2
- package/dist/matterbridge.js +47 -747
- package/dist/matterbridgeAccessoryPlatform.js +0 -34
- package/dist/matterbridgeBehaviors.js +43 -61
- package/dist/matterbridgeDeviceTypes.js +15 -563
- package/dist/matterbridgeDynamicPlatform.js +0 -34
- package/dist/matterbridgeEndpoint.js +68 -837
- package/dist/matterbridgeEndpointHelpers.js +33 -204
- 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 +10 -10
- package/package.json +2 -3
- 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 -241
- 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 -1201
- 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 -967
- package/dist/matterbridgeEndpoint.d.ts.map +0 -1
- package/dist/matterbridgeEndpoint.js.map +0 -1
- package/dist/matterbridgeEndpointHelpers.d.ts +0 -2728
- 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 -188
- 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) {
|
|
@@ -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
|
|
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
|
-
|
|
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;
|
|
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;
|
|
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;
|
|
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
|