matterbridge 2.0.0 → 2.1.0-dev.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 +22 -1
- package/README.md +1 -1
- package/dist/cli.js +0 -26
- package/dist/cluster/export.js +0 -2
- package/dist/defaultConfigSchema.js +0 -23
- package/dist/deviceManager.js +1 -26
- package/dist/frontend.js +57 -242
- package/dist/index.js +1 -30
- package/dist/logger/export.js +0 -1
- package/dist/matter/export.js +0 -7
- package/dist/matterbridge.js +77 -702
- package/dist/matterbridgeAccessoryPlatform.js +0 -33
- package/dist/matterbridgeBehaviors.js +33 -38
- package/dist/matterbridgeDeviceTypes.js +11 -112
- package/dist/matterbridgeDynamicPlatform.js +0 -33
- package/dist/matterbridgeEndpoint.js +970 -2524
- package/dist/matterbridgePlatform.js +3 -123
- package/dist/matterbridgeTypes.js +0 -28
- package/dist/pluginManager.js +3 -240
- package/dist/storage/export.js +0 -1
- package/dist/utils/colorUtils.js +2 -205
- package/dist/utils/export.js +0 -1
- package/dist/utils/utils.js +7 -251
- package/frontend/build/asset-manifest.json +3 -3
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/js/{main.6df4ebe4.js → main.26dbf9b9.js} +3 -3
- package/frontend/build/static/js/{main.6df4ebe4.js.map → main.26dbf9b9.js.map} +1 -1
- package/npm-shrinkwrap.json +83 -68
- package/package.json +2 -4
- package/dist/cli.d.ts +0 -25
- 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 -46
- package/dist/deviceManager.d.ts.map +0 -1
- package/dist/deviceManager.js.map +0 -1
- package/dist/frontend.d.ts +0 -98
- package/dist/frontend.d.ts.map +0 -1
- package/dist/frontend.js.map +0 -1
- package/dist/index.d.ts +0 -34
- 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/export.d.ts +0 -10
- package/dist/matter/export.d.ts.map +0 -1
- package/dist/matter/export.js.map +0 -1
- package/dist/matterbridge.d.ts +0 -356
- package/dist/matterbridge.d.ts.map +0 -1
- package/dist/matterbridge.js.map +0 -1
- package/dist/matterbridgeAccessoryPlatform.d.ts +0 -39
- package/dist/matterbridgeAccessoryPlatform.d.ts.map +0 -1
- package/dist/matterbridgeAccessoryPlatform.js.map +0 -1
- package/dist/matterbridgeBehaviors.d.ts +0 -963
- package/dist/matterbridgeBehaviors.d.ts.map +0 -1
- package/dist/matterbridgeBehaviors.js.map +0 -1
- package/dist/matterbridgeDeviceTypes.d.ts +0 -177
- package/dist/matterbridgeDeviceTypes.d.ts.map +0 -1
- package/dist/matterbridgeDeviceTypes.js.map +0 -1
- package/dist/matterbridgeDynamicPlatform.d.ts +0 -39
- package/dist/matterbridgeDynamicPlatform.d.ts.map +0 -1
- package/dist/matterbridgeDynamicPlatform.js.map +0 -1
- package/dist/matterbridgeEndpoint.d.ts +0 -10254
- package/dist/matterbridgeEndpoint.d.ts.map +0 -1
- package/dist/matterbridgeEndpoint.js.map +0 -1
- package/dist/matterbridgeEndpointDefault.d.ts +0 -2
- package/dist/matterbridgeEndpointDefault.d.ts.map +0 -1
- package/dist/matterbridgeEndpointDefault.js +0 -159
- package/dist/matterbridgeEndpointDefault.js.map +0 -1
- package/dist/matterbridgePlatform.d.ts +0 -164
- package/dist/matterbridgePlatform.d.ts.map +0 -1
- package/dist/matterbridgePlatform.js.map +0 -1
- package/dist/matterbridgeTypes.d.ts +0 -167
- package/dist/matterbridgeTypes.d.ts.map +0 -1
- package/dist/matterbridgeTypes.js.map +0 -1
- package/dist/pluginManager.d.ts +0 -238
- package/dist/pluginManager.d.ts.map +0 -1
- package/dist/pluginManager.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/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/export.d.ts +0 -3
- package/dist/utils/export.d.ts.map +0 -1
- package/dist/utils/export.js.map +0 -1
- package/dist/utils/utils.d.ts +0 -221
- package/dist/utils/utils.d.ts.map +0 -1
- package/dist/utils/utils.js.map +0 -1
- /package/frontend/build/static/js/{main.6df4ebe4.js.LICENSE.txt → main.26dbf9b9.js.LICENSE.txt} +0 -0
|
@@ -1,37 +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
|
-
*/
|
|
28
2
|
export class MatterbridgeAccessoryPlatform extends MatterbridgePlatform {
|
|
29
|
-
/**
|
|
30
|
-
* Creates an instance of MatterbridgeAccessoryPlatform.
|
|
31
|
-
* @param {Matterbridge} matterbridge - The Matterbridge instance.
|
|
32
|
-
* @param {AnsiLogger} log - The logger instance.
|
|
33
|
-
* @param {PlatformConfig} config - The platform configuration.
|
|
34
|
-
*/
|
|
35
3
|
constructor(matterbridge, log, config) {
|
|
36
4
|
super(matterbridge, log, config);
|
|
37
5
|
this.type = 'AccessoryPlatform';
|
|
@@ -39,4 +7,3 @@ export class MatterbridgeAccessoryPlatform extends MatterbridgePlatform {
|
|
|
39
7
|
this.log.debug(`Matterbridge${this.type} loaded`);
|
|
40
8
|
}
|
|
41
9
|
}
|
|
42
|
-
//# sourceMappingURL=matterbridgeAccessoryPlatform.js.map
|
|
@@ -1,31 +1,12 @@
|
|
|
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
|
-
|
|
2
|
+
import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
|
|
3
|
+
import { ColorControl } from '@matter/main/clusters/color-control';
|
|
4
|
+
import { FanControl } from '@matter/main/clusters/fan-control';
|
|
5
|
+
import { WindowCovering } from '@matter/main/clusters/window-covering';
|
|
6
|
+
import { Thermostat } from '@matter/main/clusters/thermostat';
|
|
7
|
+
import { ValveConfigurationAndControl } from '@matter/main/clusters/valve-configuration-and-control';
|
|
8
|
+
import { SmokeCoAlarm } from '@matter/main/clusters/smoke-co-alarm';
|
|
9
|
+
import { BooleanStateConfigurationServer } from '@matter/main/behaviors/boolean-state-configuration';
|
|
29
10
|
import { IdentifyServer } from '@matter/main/behaviors/identify';
|
|
30
11
|
import { OnOffServer } from '@matter/main/behaviors/on-off';
|
|
31
12
|
import { LevelControlServer } from '@matter/main/behaviors/level-control';
|
|
@@ -35,18 +16,12 @@ import { DoorLockServer } from '@matter/main/behaviors/door-lock';
|
|
|
35
16
|
import { FanControlServer } from '@matter/main/behaviors/fan-control';
|
|
36
17
|
import { ThermostatServer } from '@matter/main/behaviors/thermostat';
|
|
37
18
|
import { ValveConfigurationAndControlServer } from '@matter/main/behaviors/valve-configuration-and-control';
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
|
|
41
|
-
import { ColorControl } from '@matter/main/clusters/color-control';
|
|
42
|
-
import { FanControl } from '@matter/main/clusters/fan-control';
|
|
43
|
-
import { Thermostat } from '@matter/main/clusters/thermostat';
|
|
44
|
-
import { ValveConfigurationAndControl } from '@matter/main/clusters/valve-configuration-and-control';
|
|
45
|
-
import { WindowCovering } from '@matter/main/clusters/window-covering';
|
|
19
|
+
import { ModeSelectServer } from '@matter/main/behaviors/mode-select';
|
|
20
|
+
import { SmokeCoAlarmServer } from '@matter/main/behaviors/smoke-co-alarm';
|
|
46
21
|
export class MatterbridgeBehaviorDevice {
|
|
47
22
|
log;
|
|
48
23
|
commandHandler;
|
|
49
|
-
device;
|
|
24
|
+
device;
|
|
50
25
|
endpointId = undefined;
|
|
51
26
|
endpointNumber = undefined;
|
|
52
27
|
constructor(log, commandHandler, device) {
|
|
@@ -152,6 +127,14 @@ export class MatterbridgeBehaviorDevice {
|
|
|
152
127
|
this.log.info(`Closing valve (endpoint ${this.endpointId}.${this.endpointNumber})`);
|
|
153
128
|
this.commandHandler.executeHandler('close', { request: {}, attributes: {}, endpoint: { number: this.endpointNumber, uniqueStorageKey: this.endpointId } });
|
|
154
129
|
}
|
|
130
|
+
changeToMode({ newMode }) {
|
|
131
|
+
this.log.info(`Changing mode to ${newMode}`);
|
|
132
|
+
this.commandHandler.executeHandler('changeToMode', { request: { newMode }, attributes: {}, endpoint: { number: this.endpointNumber, uniqueStorageKey: this.endpointId } });
|
|
133
|
+
}
|
|
134
|
+
selfTestRequest() {
|
|
135
|
+
this.log.info(`Testing SmokeCOAlarm (endpoint ${this.endpointId}.${this.endpointNumber})`);
|
|
136
|
+
this.commandHandler.executeHandler('selfTestRequest', { request: {}, attributes: {}, endpoint: { number: this.endpointNumber, uniqueStorageKey: this.endpointId } });
|
|
137
|
+
}
|
|
155
138
|
enableDisableAlarm({ alarmsToEnableDisable }) {
|
|
156
139
|
this.log.info(`Enabling/disabling alarm ${alarmsToEnableDisable}`);
|
|
157
140
|
this.commandHandler.executeHandler('enableDisableAlarm', { request: { alarmsToEnableDisable }, attributes: {}, endpoint: { number: this.endpointNumber, uniqueStorageKey: this.endpointId } });
|
|
@@ -262,7 +245,6 @@ export class MatterbridgeWindowCoveringServer extends WindowCoveringServer.with(
|
|
|
262
245
|
super.goToLiftPercentage({ liftPercent100thsValue });
|
|
263
246
|
}
|
|
264
247
|
async handleMovement(type, reversed, direction, targetPercent100ths) {
|
|
265
|
-
// Do nothing here, as the device will handle the movement
|
|
266
248
|
}
|
|
267
249
|
}
|
|
268
250
|
export class MatterbridgeDoorLockServer extends DoorLockServer {
|
|
@@ -277,6 +259,13 @@ export class MatterbridgeDoorLockServer extends DoorLockServer {
|
|
|
277
259
|
super.unlockDoor();
|
|
278
260
|
}
|
|
279
261
|
}
|
|
262
|
+
export class MatterbridgeModeSelectServer extends ModeSelectServer {
|
|
263
|
+
async changeToMode({ newMode }) {
|
|
264
|
+
const device = this.agent.get(MatterbridgeBehavior).state.deviceCommand;
|
|
265
|
+
device.changeToMode({ newMode });
|
|
266
|
+
super.changeToMode({ newMode });
|
|
267
|
+
}
|
|
268
|
+
}
|
|
280
269
|
export class MatterbridgeFanControlServer extends FanControlServer.with(FanControl.Feature.MultiSpeed, FanControl.Feature.Auto, FanControl.Feature.Step) {
|
|
281
270
|
async step({ direction, wrap, lowestOff }) {
|
|
282
271
|
const device = this.agent.get(MatterbridgeBehavior).state.deviceCommand;
|
|
@@ -335,6 +324,13 @@ export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigu
|
|
|
335
324
|
super.close();
|
|
336
325
|
}
|
|
337
326
|
}
|
|
327
|
+
export class MatterbridgeSmokeCoAlarmServer extends SmokeCoAlarmServer.with(SmokeCoAlarm.Feature.SmokeAlarm, SmokeCoAlarm.Feature.CoAlarm) {
|
|
328
|
+
async selfTestRequest() {
|
|
329
|
+
const device = this.agent.get(MatterbridgeBehavior).state.deviceCommand;
|
|
330
|
+
device.selfTestRequest();
|
|
331
|
+
super.selfTestRequest();
|
|
332
|
+
}
|
|
333
|
+
}
|
|
338
334
|
export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateConfigurationServer.with(BooleanStateConfiguration.Feature.Visual, BooleanStateConfiguration.Feature.Audible, BooleanStateConfiguration.Feature.SensitivityLevel) {
|
|
339
335
|
async enableDisableAlarm({ alarmsToEnableDisable }) {
|
|
340
336
|
const device = this.agent.get(MatterbridgeBehavior).state.deviceCommand;
|
|
@@ -342,4 +338,3 @@ export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateCon
|
|
|
342
338
|
super.enableDisableAlarm({ alarmsToEnableDisable });
|
|
343
339
|
}
|
|
344
340
|
}
|
|
345
|
-
//# sourceMappingURL=matterbridgeBehaviors.js.map
|
|
@@ -1,28 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file contains the class MatterbridgeDevice.
|
|
3
|
-
*
|
|
4
|
-
* @file matterbridgeDeviceTypes.ts
|
|
5
|
-
* @author Luca Liguori
|
|
6
|
-
* @date 2024-11-08
|
|
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
|
-
// @matter
|
|
24
1
|
import { DeviceTypeId } from '@matter/main';
|
|
25
|
-
// @matter clusters
|
|
26
2
|
import { BooleanState } from '@matter/main/clusters/boolean-state';
|
|
27
3
|
import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
|
|
28
4
|
import { BridgedDeviceBasicInformation } from '@matter/main/clusters/bridged-device-basic-information';
|
|
@@ -76,46 +52,17 @@ import { ActivatedCarbonFilterMonitoring } from '@matter/main/clusters/activated
|
|
|
76
52
|
import { DeviceEnergyManagementMode } from '@matter/main/clusters/device-energy-management-mode';
|
|
77
53
|
export var DeviceClasses;
|
|
78
54
|
(function (DeviceClasses) {
|
|
79
|
-
/** Node device type. */
|
|
80
55
|
DeviceClasses["Node"] = "Node";
|
|
81
|
-
/**
|
|
82
|
-
* Utility device type.
|
|
83
|
-
* A Utility device type supports configuration and settings.
|
|
84
|
-
*/
|
|
85
56
|
DeviceClasses["Utility"] = "Utility";
|
|
86
|
-
/**
|
|
87
|
-
* Application device type.
|
|
88
|
-
* Application devices types are typically the most datatype endpoints on a node and in the network.
|
|
89
|
-
*/
|
|
90
57
|
DeviceClasses["App"] = "App";
|
|
91
|
-
/**
|
|
92
|
-
* Simple device type.
|
|
93
|
-
* A Simple device type supports local control that is persistent, independent, and unsupervised.
|
|
94
|
-
*/
|
|
95
58
|
DeviceClasses["Simple"] = "Simple";
|
|
96
|
-
/**
|
|
97
|
-
* Dynamic device type.
|
|
98
|
-
* A Dynamic device type supports intelligent and supervisory services, such as commissioning,
|
|
99
|
-
* monitoring, trend analysis, scheduling and central management. A dynamic device type is an
|
|
100
|
-
* application device type.
|
|
101
|
-
*/
|
|
102
59
|
DeviceClasses["Dynamic"] = "Dynamic";
|
|
103
|
-
/** There exists a client application cluster on the endpoint. */
|
|
104
60
|
DeviceClasses["Client"] = "Client";
|
|
105
|
-
/** There exists a server application cluster on the endpoint. */
|
|
106
61
|
DeviceClasses["Server"] = "Server";
|
|
107
|
-
/** The device type is composed of 2 or more device types. */
|
|
108
62
|
DeviceClasses["Composed"] = "Composed";
|
|
109
|
-
/** Composed device type that is composed of 2 or more endpoints with the same device type. */
|
|
110
63
|
DeviceClasses["Multiple"] = "Multiple";
|
|
111
|
-
/** The endpoint is an Initiator for Zigbee EZ-Mode Finding & Binding. */
|
|
112
64
|
DeviceClasses["EZInitiator"] = "EZ-Initiator";
|
|
113
|
-
/** The endpoint is a Target for Zigbee EZ-Mode Finding & Binding. */
|
|
114
65
|
DeviceClasses["EZTarget"] = "EZ-Target";
|
|
115
|
-
/**
|
|
116
|
-
* The endpoint represents a Bridged Device, for which information about the state of
|
|
117
|
-
* its power source is available to the Bridge
|
|
118
|
-
*/
|
|
119
66
|
DeviceClasses["BridgedPowerSourceInfo"] = "BridgedPowerSourceInfo";
|
|
120
67
|
})(DeviceClasses || (DeviceClasses = {}));
|
|
121
68
|
export const DeviceTypeDefinition = ({ name, code, deviceClass, superSet, revision, requiredServerClusters = [], optionalServerClusters = [], requiredClientClusters = [], optionalClientClusters = [], unknown = false, }) => ({
|
|
@@ -130,7 +77,6 @@ export const DeviceTypeDefinition = ({ name, code, deviceClass, superSet, revisi
|
|
|
130
77
|
optionalClientClusters,
|
|
131
78
|
unknown,
|
|
132
79
|
});
|
|
133
|
-
// Matter 1.0 and 1.1 device types
|
|
134
80
|
export const bridge = DeviceTypeDefinition({
|
|
135
81
|
name: 'MA-aggregator',
|
|
136
82
|
code: 0x000e,
|
|
@@ -153,22 +99,6 @@ export const powerSource = DeviceTypeDefinition({
|
|
|
153
99
|
requiredServerClusters: [PowerSource.Cluster.id],
|
|
154
100
|
optionalServerClusters: [],
|
|
155
101
|
});
|
|
156
|
-
/**
|
|
157
|
-
2.5.3. Conditions
|
|
158
|
-
Please see the Base Device Type definition for conformance tags.
|
|
159
|
-
This device type SHALL only be used for Nodes which have a device type of Bridge.
|
|
160
|
-
|
|
161
|
-
2.5.6. Endpoint Composition
|
|
162
|
-
• A Bridged Node endpoint SHALL support one of the following composition patterns:
|
|
163
|
-
◦ Separate Endpoints: All application device types are supported on separate endpoints, and
|
|
164
|
-
not on the Bridged Node endpoint. The Bridged Node endpoint’s Descriptor cluster PartsList
|
|
165
|
-
attribute SHALL indicate a list of all endpoints representing the functionality of the bridged
|
|
166
|
-
device, including the endpoints supporting the application device types, i.e. the full-family
|
|
167
|
-
pattern defined in the System Model specification.
|
|
168
|
-
◦ One Endpoint: Both the Bridged Node and one or more application device types are sup
|
|
169
|
-
ported on the same endpoint (following application device type rules). Endpoint composi
|
|
170
|
-
tion SHALL conform to the application device type(s) definition
|
|
171
|
-
*/
|
|
172
102
|
export const bridgedNode = DeviceTypeDefinition({
|
|
173
103
|
name: 'MA-bridgedNode',
|
|
174
104
|
code: 0x0013,
|
|
@@ -190,7 +120,7 @@ export const onOffLight = DeviceTypeDefinition({
|
|
|
190
120
|
code: 0x0100,
|
|
191
121
|
deviceClass: DeviceClasses.Simple,
|
|
192
122
|
revision: 3,
|
|
193
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
123
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id],
|
|
194
124
|
optionalServerClusters: [LevelControl.Cluster.id, ColorControl.Cluster.id],
|
|
195
125
|
});
|
|
196
126
|
export const dimmableLight = DeviceTypeDefinition({
|
|
@@ -198,7 +128,7 @@ export const dimmableLight = DeviceTypeDefinition({
|
|
|
198
128
|
code: 0x0101,
|
|
199
129
|
deviceClass: DeviceClasses.Simple,
|
|
200
130
|
revision: 3,
|
|
201
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
131
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
|
|
202
132
|
optionalServerClusters: [ColorControl.Cluster.id],
|
|
203
133
|
});
|
|
204
134
|
export const colorTemperatureLight = DeviceTypeDefinition({
|
|
@@ -206,7 +136,7 @@ export const colorTemperatureLight = DeviceTypeDefinition({
|
|
|
206
136
|
code: 0x010c,
|
|
207
137
|
deviceClass: DeviceClasses.Simple,
|
|
208
138
|
revision: 4,
|
|
209
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
139
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
|
|
210
140
|
optionalServerClusters: [],
|
|
211
141
|
});
|
|
212
142
|
export const onOffOutlet = DeviceTypeDefinition({
|
|
@@ -214,7 +144,7 @@ export const onOffOutlet = DeviceTypeDefinition({
|
|
|
214
144
|
code: 0x010a,
|
|
215
145
|
deviceClass: DeviceClasses.Simple,
|
|
216
146
|
revision: 3,
|
|
217
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
147
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id],
|
|
218
148
|
optionalServerClusters: [LevelControl.Cluster.id],
|
|
219
149
|
});
|
|
220
150
|
export const dimmableOutlet = DeviceTypeDefinition({
|
|
@@ -222,7 +152,7 @@ export const dimmableOutlet = DeviceTypeDefinition({
|
|
|
222
152
|
code: 0x010b,
|
|
223
153
|
deviceClass: DeviceClasses.Simple,
|
|
224
154
|
revision: 3,
|
|
225
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
155
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
|
|
226
156
|
optionalServerClusters: [],
|
|
227
157
|
});
|
|
228
158
|
export const doorLockDevice = DeviceTypeDefinition({
|
|
@@ -231,7 +161,7 @@ export const doorLockDevice = DeviceTypeDefinition({
|
|
|
231
161
|
deviceClass: DeviceClasses.Simple,
|
|
232
162
|
revision: 3,
|
|
233
163
|
requiredServerClusters: [Identify.Cluster.id, DoorLock.Cluster.id],
|
|
234
|
-
optionalServerClusters: [Groups.Cluster.id
|
|
164
|
+
optionalServerClusters: [Groups.Cluster.id],
|
|
235
165
|
});
|
|
236
166
|
export const coverDevice = DeviceTypeDefinition({
|
|
237
167
|
name: 'MA-windowCovering',
|
|
@@ -239,13 +169,8 @@ export const coverDevice = DeviceTypeDefinition({
|
|
|
239
169
|
deviceClass: DeviceClasses.Simple,
|
|
240
170
|
revision: 3,
|
|
241
171
|
requiredServerClusters: [Identify.Cluster.id, WindowCovering.Cluster.id],
|
|
242
|
-
optionalServerClusters: [Groups.Cluster.id
|
|
172
|
+
optionalServerClusters: [Groups.Cluster.id],
|
|
243
173
|
});
|
|
244
|
-
/**
|
|
245
|
-
* Remark: it may have a thermostat device type.
|
|
246
|
-
* Additional device types MAY also be included in device compositions.
|
|
247
|
-
* The FanControl cluster must have the FanModeSequence attribute.
|
|
248
|
-
*/
|
|
249
174
|
export const fanDevice = DeviceTypeDefinition({
|
|
250
175
|
name: 'MA-fan',
|
|
251
176
|
code: 0x2b,
|
|
@@ -260,7 +185,7 @@ export const thermostatDevice = DeviceTypeDefinition({
|
|
|
260
185
|
deviceClass: DeviceClasses.Simple,
|
|
261
186
|
revision: 3,
|
|
262
187
|
requiredServerClusters: [Identify.Cluster.id, Thermostat.Cluster.id],
|
|
263
|
-
optionalServerClusters: [Groups.Cluster.id
|
|
188
|
+
optionalServerClusters: [Groups.Cluster.id, ThermostatUserInterfaceConfiguration.Cluster.id, EnergyPreference.Cluster.id, TimeSynchronization.Cluster.id],
|
|
264
189
|
});
|
|
265
190
|
export const contactSensor = DeviceTypeDefinition({
|
|
266
191
|
name: 'MA-contactsensor',
|
|
@@ -326,34 +251,30 @@ export const roboticVacuumCleaner = DeviceTypeDefinition({
|
|
|
326
251
|
requiredServerClusters: [Identify.Cluster.id, RvcRunMode.Cluster.id, RvcOperationalState.Cluster.id],
|
|
327
252
|
optionalServerClusters: [RvcCleanMode.Cluster.id],
|
|
328
253
|
});
|
|
329
|
-
// Custom device types without client clusters (not working in Alexa)
|
|
330
254
|
export const onOffSwitch = DeviceTypeDefinition({
|
|
331
255
|
name: 'MA-onoffswitch',
|
|
332
256
|
code: 0x0103,
|
|
333
257
|
deviceClass: DeviceClasses.Simple,
|
|
334
258
|
revision: 3,
|
|
335
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
259
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id],
|
|
336
260
|
optionalServerClusters: [LevelControl.Cluster.id, ColorControl.Cluster.id],
|
|
337
261
|
});
|
|
338
|
-
// Custom device types without client clusters (not working in Alexa)
|
|
339
262
|
export const dimmableSwitch = DeviceTypeDefinition({
|
|
340
263
|
name: 'MA-dimmableswitch',
|
|
341
264
|
code: 0x0104,
|
|
342
265
|
deviceClass: DeviceClasses.Simple,
|
|
343
266
|
revision: 3,
|
|
344
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
267
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
|
|
345
268
|
optionalServerClusters: [ColorControl.Cluster.id],
|
|
346
269
|
});
|
|
347
|
-
// Custom device types without client clusters (not working in Alexa)
|
|
348
270
|
export const colorTemperatureSwitch = DeviceTypeDefinition({
|
|
349
271
|
name: 'MA-colortemperatureswitch',
|
|
350
272
|
code: 0x0105,
|
|
351
273
|
deviceClass: DeviceClasses.Simple,
|
|
352
274
|
revision: 3,
|
|
353
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
275
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
|
|
354
276
|
optionalServerClusters: [],
|
|
355
277
|
});
|
|
356
|
-
// Matter 1.2 and 1.3 device types
|
|
357
278
|
export const airQualitySensor = DeviceTypeDefinition({
|
|
358
279
|
name: 'MA-airQualitySensor',
|
|
359
280
|
code: 0x002c,
|
|
@@ -399,7 +320,6 @@ export const rainSensor = DeviceTypeDefinition({
|
|
|
399
320
|
requiredServerClusters: [Identify.Cluster.id, BooleanState.Cluster.id],
|
|
400
321
|
optionalServerClusters: [BooleanStateConfiguration.Cluster.id],
|
|
401
322
|
});
|
|
402
|
-
// Remark: A Smoke CO Alarm device type SHALL support an instance of a Power Source device type on some endpoint.
|
|
403
323
|
export const smokeCoAlarm = DeviceTypeDefinition({
|
|
404
324
|
name: 'MA-smokeCoAlarm',
|
|
405
325
|
code: 0x0076,
|
|
@@ -408,12 +328,6 @@ export const smokeCoAlarm = DeviceTypeDefinition({
|
|
|
408
328
|
requiredServerClusters: [Identify.Cluster.id, SmokeCoAlarm.Cluster.id],
|
|
409
329
|
optionalServerClusters: [Groups.Cluster.id, TemperatureMeasurement.Cluster.id, RelativeHumidityMeasurement.Cluster.id, CarbonMonoxideConcentrationMeasurement.Cluster.id],
|
|
410
330
|
});
|
|
411
|
-
/**
|
|
412
|
-
* Remark: LevelControl cluster:
|
|
413
|
-
* 0 N/A Pump is stopped,
|
|
414
|
-
* 1–200 Level / 2 (0.5–100.0%) Pump setpoint in percent
|
|
415
|
-
* 201–255 100.0% Pump setpoint is 100.0%
|
|
416
|
-
*/
|
|
417
331
|
export const pumpDevice = DeviceTypeDefinition({
|
|
418
332
|
name: 'MA-pump',
|
|
419
333
|
code: 0x303,
|
|
@@ -430,10 +344,6 @@ export const waterValve = DeviceTypeDefinition({
|
|
|
430
344
|
requiredServerClusters: [Identify.Cluster.id, ValveConfigurationAndControl.Cluster.id],
|
|
431
345
|
optionalServerClusters: [FlowMeasurement.Cluster.id],
|
|
432
346
|
});
|
|
433
|
-
/**
|
|
434
|
-
* Remark: it may have a Thermostat, Temperature Sensor, Humidity Sensor and an Air Quality Sensor device type.
|
|
435
|
-
* Additional device types MAY also be included in device compositions.
|
|
436
|
-
*/
|
|
437
347
|
export const airPurifier = DeviceTypeDefinition({
|
|
438
348
|
name: 'MA-airPurifier',
|
|
439
349
|
code: 0x2d,
|
|
@@ -442,16 +352,6 @@ export const airPurifier = DeviceTypeDefinition({
|
|
|
442
352
|
requiredServerClusters: [Identify.Cluster.id, FanControl.Cluster.id],
|
|
443
353
|
optionalServerClusters: [Groups.Cluster.id, HepaFilterMonitoring.Cluster.id, ActivatedCarbonFilterMonitoring.Cluster.id],
|
|
444
354
|
});
|
|
445
|
-
/**
|
|
446
|
-
* Remark: it may have a temperature sensor and a humidity sensor device.
|
|
447
|
-
* Additional device types MAY also be included in device compositions.
|
|
448
|
-
* The DF (Dead Front) feature is required for the On/Off cluster in this device type:
|
|
449
|
-
* - Thermostat LocalTemperature null
|
|
450
|
-
* - Temperature Measurement MeasuredValue null
|
|
451
|
-
* - Relative Humidity Measurement MeasuredValue null
|
|
452
|
-
* - Fan Control SpeedSetting null
|
|
453
|
-
* - Fan Control PercentSetting null
|
|
454
|
-
*/
|
|
455
355
|
export const airConditioner = DeviceTypeDefinition({
|
|
456
356
|
name: 'MA-airConditioner',
|
|
457
357
|
code: 0x72,
|
|
@@ -476,4 +376,3 @@ export const deviceEnergyManagement = DeviceTypeDefinition({
|
|
|
476
376
|
requiredServerClusters: [DeviceEnergyManagement.Cluster.id, DeviceEnergyManagementMode.Cluster.id],
|
|
477
377
|
optionalServerClusters: [],
|
|
478
378
|
});
|
|
479
|
-
//# sourceMappingURL=matterbridgeDeviceTypes.js.map
|
|
@@ -1,37 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file contains the class MatterbridgeDynamicPlatform.
|
|
3
|
-
*
|
|
4
|
-
* @file matterbridgeDynamicPlatform.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 dynamic platform for Matterbridge.
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
2
|
export class MatterbridgeDynamicPlatform extends MatterbridgePlatform {
|
|
29
|
-
/**
|
|
30
|
-
* Creates an instance of MatterbridgeDynamicPlatform.
|
|
31
|
-
* @param {Matterbridge} matterbridge - The Matterbridge instance.
|
|
32
|
-
* @param {AnsiLogger} log - The logger instance.
|
|
33
|
-
* @param {PlatformConfig} config - The platform configuration.
|
|
34
|
-
*/
|
|
35
3
|
constructor(matterbridge, log, config) {
|
|
36
4
|
super(matterbridge, log, config);
|
|
37
5
|
this.type = 'DynamicPlatform';
|
|
@@ -39,4 +7,3 @@ export class MatterbridgeDynamicPlatform extends MatterbridgePlatform {
|
|
|
39
7
|
this.log.debug(`Matterbridge${this.type} loaded`);
|
|
40
8
|
}
|
|
41
9
|
}
|
|
42
|
-
//# sourceMappingURL=matterbridgeDynamicPlatform.js.map
|