matterbridge 2.2.3 → 2.2.4-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 +15 -0
- 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 +33 -306
- package/dist/index.js +1 -28
- 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 +65 -725
- package/dist/matterbridgeAccessoryPlatform.js +0 -33
- package/dist/matterbridgeBehaviors.js +1 -32
- package/dist/matterbridgeDeviceTypes.js +11 -112
- package/dist/matterbridgeDynamicPlatform.js +0 -33
- package/dist/matterbridgeEndpoint.js +6 -690
- package/dist/matterbridgeEndpointHelpers.js +9 -118
- package/dist/matterbridgePlatform.js +7 -185
- package/dist/matterbridgeTypes.js +0 -24
- package/dist/pluginManager.js +3 -229
- package/dist/shelly.js +6 -121
- package/dist/storage/export.js +0 -1
- package/dist/update.js +0 -45
- package/dist/utils/colorUtils.js +2 -205
- package/dist/utils/copyDirectory.js +1 -37
- package/dist/utils/createZip.js +2 -42
- package/dist/utils/deepCopy.js +0 -40
- package/dist/utils/deepEqual.js +1 -65
- package/dist/utils/export.js +0 -1
- package/dist/utils/isvalid.js +0 -86
- package/dist/utils/network.js +5 -77
- package/dist/utils/parameter.js +0 -41
- package/dist/utils/wait.js +5 -48
- package/frontend/build/asset-manifest.json +3 -3
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/js/{main.6ffd2c31.js → main.819c0908.js} +4 -4
- package/frontend/build/static/js/{main.6ffd2c31.js.map → main.819c0908.js.map} +1 -1
- 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 -201
- package/dist/frontend.d.ts.map +0 -1
- package/dist/frontend.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 -412
- 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 -1056
- 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 -835
- package/dist/matterbridgeEndpoint.d.ts.map +0 -1
- package/dist/matterbridgeEndpoint.js.map +0 -1
- package/dist/matterbridgeEndpointHelpers.d.ts +0 -2275
- package/dist/matterbridgeEndpointHelpers.d.ts.map +0 -1
- package/dist/matterbridgeEndpointHelpers.js.map +0 -1
- package/dist/matterbridgePlatform.d.ts +0 -251
- package/dist/matterbridgePlatform.d.ts.map +0 -1
- package/dist/matterbridgePlatform.js.map +0 -1
- package/dist/matterbridgeTypes.d.ts +0 -178
- package/dist/matterbridgeTypes.d.ts.map +0 -1
- package/dist/matterbridgeTypes.js.map +0 -1
- package/dist/pluginManager.d.ts +0 -236
- package/dist/pluginManager.d.ts.map +0 -1
- package/dist/pluginManager.js.map +0 -1
- package/dist/shelly.d.ts +0 -77
- 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 -32
- 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/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 -10
- package/dist/utils/export.d.ts.map +0 -1
- package/dist/utils/export.js.map +0 -1
- package/dist/utils/isvalid.d.ts +0 -87
- package/dist/utils/isvalid.d.ts.map +0 -1
- package/dist/utils/isvalid.js.map +0 -1
- package/dist/utils/network.d.ts +0 -70
- package/dist/utils/network.d.ts.map +0 -1
- package/dist/utils/network.js.map +0 -1
- package/dist/utils/parameter.d.ts +0 -44
- package/dist/utils/parameter.d.ts.map +0 -1
- package/dist/utils/parameter.js.map +0 -1
- package/dist/utils/wait.d.ts +0 -43
- package/dist/utils/wait.d.ts.map +0 -1
- package/dist/utils/wait.js.map +0 -1
- /package/frontend/build/static/js/{main.6ffd2c31.js.LICENSE.txt → main.819c0908.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,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';
|
|
@@ -34,7 +7,6 @@ import { Thermostat } from '@matter/main/clusters/thermostat';
|
|
|
34
7
|
import { ValveConfigurationAndControl } from '@matter/main/clusters/valve-configuration-and-control';
|
|
35
8
|
import { SmokeCoAlarm } from '@matter/main/clusters/smoke-co-alarm';
|
|
36
9
|
import { BooleanStateConfigurationServer } from '@matter/main/behaviors/boolean-state-configuration';
|
|
37
|
-
// @matter behaviors
|
|
38
10
|
import { IdentifyServer } from '@matter/main/behaviors/identify';
|
|
39
11
|
import { OnOffServer } from '@matter/main/behaviors/on-off';
|
|
40
12
|
import { LevelControlServer } from '@matter/main/behaviors/level-control';
|
|
@@ -50,7 +22,7 @@ import { SwitchServer } from '@matter/main/behaviors/switch';
|
|
|
50
22
|
export class MatterbridgeBehaviorDevice {
|
|
51
23
|
log;
|
|
52
24
|
commandHandler;
|
|
53
|
-
device;
|
|
25
|
+
device;
|
|
54
26
|
endpointId = undefined;
|
|
55
27
|
endpointNumber = undefined;
|
|
56
28
|
constructor(log, commandHandler, device) {
|
|
@@ -274,7 +246,6 @@ export class MatterbridgeWindowCoveringServer extends WindowCoveringServer.with(
|
|
|
274
246
|
super.goToLiftPercentage({ liftPercent100thsValue });
|
|
275
247
|
}
|
|
276
248
|
async handleMovement(type, reversed, direction, targetPercent100ths) {
|
|
277
|
-
// Do nothing here, as the device will handle the movement
|
|
278
249
|
}
|
|
279
250
|
}
|
|
280
251
|
export class MatterbridgeDoorLockServer extends DoorLockServer {
|
|
@@ -370,7 +341,5 @@ export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateCon
|
|
|
370
341
|
}
|
|
371
342
|
export class MatterbridgeSwitchServer extends SwitchServer {
|
|
372
343
|
initialize() {
|
|
373
|
-
// Do nothing here, as the device will handle the switch logic
|
|
374
344
|
}
|
|
375
345
|
}
|
|
376
|
-
//# 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
|