matterbridge 2.0.0-edge1 → 2.1.0-dev.1
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 +36 -3
- 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 +2 -27
- package/dist/frontend.js +99 -245
- package/dist/index.js +2 -33
- package/dist/logger/export.js +0 -1
- package/dist/matter/export.js +0 -7
- package/dist/matterbridge.js +99 -710
- package/dist/matterbridgeAccessoryPlatform.js +0 -33
- package/dist/matterbridgeBehaviors.js +42 -32
- package/dist/matterbridgeDeviceTypes.js +90 -84
- package/dist/matterbridgeDynamicPlatform.js +0 -33
- package/dist/matterbridgeEndpoint.js +992 -2454
- package/dist/matterbridgePlatform.js +11 -130
- package/dist/matterbridgeTypes.js +0 -25
- package/dist/pluginManager.js +7 -251
- 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 +10 -255
- package/frontend/build/asset-manifest.json +3 -3
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/js/{main.ea28015b.js → main.26dbf9b9.js} +3 -3
- package/frontend/build/static/js/main.26dbf9b9.js.map +1 -0
- package/npm-shrinkwrap.json +97 -79
- package/package.json +2 -4
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/cluster/export.d.ts.map +0 -1
- package/dist/cluster/export.js.map +0 -1
- 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.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/logger/export.d.ts.map +0 -1
- package/dist/logger/export.js.map +0 -1
- package/dist/matter/export.d.ts.map +0 -1
- package/dist/matter/export.js.map +0 -1
- package/dist/matterbridge.d.ts +0 -357
- package/dist/matterbridge.d.ts.map +0 -1
- package/dist/matterbridge.js.map +0 -1
- package/dist/matterbridgeAccessoryPlatform.d.ts.map +0 -1
- package/dist/matterbridgeAccessoryPlatform.js.map +0 -1
- package/dist/matterbridgeBehaviors.d.ts +0 -123
- package/dist/matterbridgeBehaviors.d.ts.map +0 -1
- package/dist/matterbridgeBehaviors.js.map +0 -1
- package/dist/matterbridgeDeviceTypes.d.ts +0 -109
- package/dist/matterbridgeDeviceTypes.d.ts.map +0 -1
- package/dist/matterbridgeDeviceTypes.js.map +0 -1
- package/dist/matterbridgeDynamicPlatform.d.ts.map +0 -1
- package/dist/matterbridgeDynamicPlatform.js.map +0 -1
- package/dist/matterbridgeEndpoint.d.ts +0 -1167
- package/dist/matterbridgeEndpoint.d.ts.map +0 -1
- package/dist/matterbridgeEndpoint.js.map +0 -1
- package/dist/matterbridgePlatform.d.ts +0 -154
- package/dist/matterbridgePlatform.d.ts.map +0 -1
- package/dist/matterbridgePlatform.js.map +0 -1
- 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.map +0 -1
- package/dist/storage/export.js.map +0 -1
- package/dist/utils/colorUtils.d.ts.map +0 -1
- package/dist/utils/colorUtils.js.map +0 -1
- 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.ea28015b.js.map +0 -1
- /package/frontend/build/static/js/{main.ea28015b.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,37 +1,27 @@
|
|
|
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
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
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';
|
|
10
|
+
import { IdentifyServer } from '@matter/main/behaviors/identify';
|
|
11
|
+
import { OnOffServer } from '@matter/main/behaviors/on-off';
|
|
12
|
+
import { LevelControlServer } from '@matter/main/behaviors/level-control';
|
|
13
|
+
import { ColorControlServer } from '@matter/main/behaviors/color-control';
|
|
14
|
+
import { WindowCoveringServer } from '@matter/main/behaviors/window-covering';
|
|
15
|
+
import { DoorLockServer } from '@matter/main/behaviors/door-lock';
|
|
16
|
+
import { FanControlServer } from '@matter/main/behaviors/fan-control';
|
|
17
|
+
import { ThermostatServer } from '@matter/main/behaviors/thermostat';
|
|
18
|
+
import { ValveConfigurationAndControlServer } from '@matter/main/behaviors/valve-configuration-and-control';
|
|
19
|
+
import { ModeSelectServer } from '@matter/main/behaviors/mode-select';
|
|
20
|
+
import { SmokeCoAlarmServer } from '@matter/main/behaviors/smoke-co-alarm';
|
|
31
21
|
export class MatterbridgeBehaviorDevice {
|
|
32
22
|
log;
|
|
33
23
|
commandHandler;
|
|
34
|
-
device;
|
|
24
|
+
device;
|
|
35
25
|
endpointId = undefined;
|
|
36
26
|
endpointNumber = undefined;
|
|
37
27
|
constructor(log, commandHandler, device) {
|
|
@@ -137,6 +127,14 @@ export class MatterbridgeBehaviorDevice {
|
|
|
137
127
|
this.log.info(`Closing valve (endpoint ${this.endpointId}.${this.endpointNumber})`);
|
|
138
128
|
this.commandHandler.executeHandler('close', { request: {}, attributes: {}, endpoint: { number: this.endpointNumber, uniqueStorageKey: this.endpointId } });
|
|
139
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
|
+
}
|
|
140
138
|
enableDisableAlarm({ alarmsToEnableDisable }) {
|
|
141
139
|
this.log.info(`Enabling/disabling alarm ${alarmsToEnableDisable}`);
|
|
142
140
|
this.commandHandler.executeHandler('enableDisableAlarm', { request: { alarmsToEnableDisable }, attributes: {}, endpoint: { number: this.endpointNumber, uniqueStorageKey: this.endpointId } });
|
|
@@ -247,7 +245,6 @@ export class MatterbridgeWindowCoveringServer extends WindowCoveringServer.with(
|
|
|
247
245
|
super.goToLiftPercentage({ liftPercent100thsValue });
|
|
248
246
|
}
|
|
249
247
|
async handleMovement(type, reversed, direction, targetPercent100ths) {
|
|
250
|
-
// Do nothing here, as the device will handle the movement
|
|
251
248
|
}
|
|
252
249
|
}
|
|
253
250
|
export class MatterbridgeDoorLockServer extends DoorLockServer {
|
|
@@ -262,6 +259,13 @@ export class MatterbridgeDoorLockServer extends DoorLockServer {
|
|
|
262
259
|
super.unlockDoor();
|
|
263
260
|
}
|
|
264
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
|
+
}
|
|
265
269
|
export class MatterbridgeFanControlServer extends FanControlServer.with(FanControl.Feature.MultiSpeed, FanControl.Feature.Auto, FanControl.Feature.Step) {
|
|
266
270
|
async step({ direction, wrap, lowestOff }) {
|
|
267
271
|
const device = this.agent.get(MatterbridgeBehavior).state.deviceCommand;
|
|
@@ -320,6 +324,13 @@ export class MatterbridgeValveConfigurationAndControlServer extends ValveConfigu
|
|
|
320
324
|
super.close();
|
|
321
325
|
}
|
|
322
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
|
+
}
|
|
323
334
|
export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateConfigurationServer.with(BooleanStateConfiguration.Feature.Visual, BooleanStateConfiguration.Feature.Audible, BooleanStateConfiguration.Feature.SensitivityLevel) {
|
|
324
335
|
async enableDisableAlarm({ alarmsToEnableDisable }) {
|
|
325
336
|
const device = this.agent.get(MatterbridgeBehavior).state.deviceCommand;
|
|
@@ -327,4 +338,3 @@ export class MatterbridgeBooleanStateConfigurationServer extends BooleanStateCon
|
|
|
327
338
|
super.enableDisableAlarm({ alarmsToEnableDisable });
|
|
328
339
|
}
|
|
329
340
|
}
|
|
330
|
-
//# sourceMappingURL=matterbridgeBehaviors.js.map
|
|
@@ -1,29 +1,82 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
import {
|
|
26
|
-
|
|
1
|
+
import { DeviceTypeId } from '@matter/main';
|
|
2
|
+
import { BooleanState } from '@matter/main/clusters/boolean-state';
|
|
3
|
+
import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
|
|
4
|
+
import { BridgedDeviceBasicInformation } from '@matter/main/clusters/bridged-device-basic-information';
|
|
5
|
+
import { CarbonDioxideConcentrationMeasurement } from '@matter/main/clusters/carbon-dioxide-concentration-measurement';
|
|
6
|
+
import { CarbonMonoxideConcentrationMeasurement } from '@matter/main/clusters/carbon-monoxide-concentration-measurement';
|
|
7
|
+
import { ColorControl } from '@matter/main/clusters/color-control';
|
|
8
|
+
import { DeviceEnergyManagement } from '@matter/main/clusters/device-energy-management';
|
|
9
|
+
import { DoorLock } from '@matter/main/clusters/door-lock';
|
|
10
|
+
import { ElectricalEnergyMeasurement } from '@matter/main/clusters/electrical-energy-measurement';
|
|
11
|
+
import { ElectricalPowerMeasurement } from '@matter/main/clusters/electrical-power-measurement';
|
|
12
|
+
import { FanControl } from '@matter/main/clusters/fan-control';
|
|
13
|
+
import { FixedLabel } from '@matter/main/clusters/fixed-label';
|
|
14
|
+
import { FlowMeasurement } from '@matter/main/clusters/flow-measurement';
|
|
15
|
+
import { FormaldehydeConcentrationMeasurement } from '@matter/main/clusters/formaldehyde-concentration-measurement';
|
|
16
|
+
import { Groups } from '@matter/main/clusters/groups';
|
|
17
|
+
import { Identify } from '@matter/main/clusters/identify';
|
|
18
|
+
import { IlluminanceMeasurement } from '@matter/main/clusters/illuminance-measurement';
|
|
19
|
+
import { LevelControl } from '@matter/main/clusters/level-control';
|
|
20
|
+
import { ModeSelect } from '@matter/main/clusters/mode-select';
|
|
21
|
+
import { NitrogenDioxideConcentrationMeasurement } from '@matter/main/clusters/nitrogen-dioxide-concentration-measurement';
|
|
22
|
+
import { OccupancySensing } from '@matter/main/clusters/occupancy-sensing';
|
|
23
|
+
import { OnOff } from '@matter/main/clusters/on-off';
|
|
24
|
+
import { OzoneConcentrationMeasurement } from '@matter/main/clusters/ozone-concentration-measurement';
|
|
25
|
+
import { Pm10ConcentrationMeasurement } from '@matter/main/clusters/pm10-concentration-measurement';
|
|
26
|
+
import { Pm1ConcentrationMeasurement } from '@matter/main/clusters/pm1-concentration-measurement';
|
|
27
|
+
import { Pm25ConcentrationMeasurement } from '@matter/main/clusters/pm25-concentration-measurement';
|
|
28
|
+
import { PowerSource } from '@matter/main/clusters/power-source';
|
|
29
|
+
import { PowerTopology } from '@matter/main/clusters/power-topology';
|
|
30
|
+
import { PressureMeasurement } from '@matter/main/clusters/pressure-measurement';
|
|
31
|
+
import { PumpConfigurationAndControl } from '@matter/main/clusters/pump-configuration-and-control';
|
|
32
|
+
import { RadonConcentrationMeasurement } from '@matter/main/clusters/radon-concentration-measurement';
|
|
33
|
+
import { RelativeHumidityMeasurement } from '@matter/main/clusters/relative-humidity-measurement';
|
|
34
|
+
import { SmokeCoAlarm } from '@matter/main/clusters/smoke-co-alarm';
|
|
35
|
+
import { SwitchCluster } from '@matter/main/clusters/switch';
|
|
36
|
+
import { TemperatureMeasurement } from '@matter/main/clusters/temperature-measurement';
|
|
37
|
+
import { Thermostat } from '@matter/main/clusters/thermostat';
|
|
38
|
+
import { TimeSynchronization } from '@matter/main/clusters/time-synchronization';
|
|
39
|
+
import { TotalVolatileOrganicCompoundsConcentrationMeasurement } from '@matter/main/clusters/total-volatile-organic-compounds-concentration-measurement';
|
|
40
|
+
import { ValveConfigurationAndControl } from '@matter/main/clusters/valve-configuration-and-control';
|
|
41
|
+
import { WindowCovering } from '@matter/main/clusters/window-covering';
|
|
42
|
+
import { AirQuality } from '@matter/main/clusters/air-quality';
|
|
43
|
+
import { Actions } from '@matter/main/clusters/actions';
|
|
44
|
+
import { ThermostatUserInterfaceConfiguration } from '@matter/main/clusters/thermostat-user-interface-configuration';
|
|
45
|
+
import { EnergyPreference } from '@matter/main/clusters/energy-preference';
|
|
46
|
+
import { RvcRunMode } from '@matter/main/clusters/rvc-run-mode';
|
|
47
|
+
import { RvcOperationalState } from '@matter/main/clusters/rvc-operational-state';
|
|
48
|
+
import { RvcCleanMode } from '@matter/main/clusters/rvc-clean-mode';
|
|
49
|
+
import { ScenesManagement } from '@matter/main/clusters/scenes-management';
|
|
50
|
+
import { HepaFilterMonitoring } from '@matter/main/clusters/hepa-filter-monitoring';
|
|
51
|
+
import { ActivatedCarbonFilterMonitoring } from '@matter/main/clusters/activated-carbon-filter-monitoring';
|
|
52
|
+
import { DeviceEnergyManagementMode } from '@matter/main/clusters/device-energy-management-mode';
|
|
53
|
+
export var DeviceClasses;
|
|
54
|
+
(function (DeviceClasses) {
|
|
55
|
+
DeviceClasses["Node"] = "Node";
|
|
56
|
+
DeviceClasses["Utility"] = "Utility";
|
|
57
|
+
DeviceClasses["App"] = "App";
|
|
58
|
+
DeviceClasses["Simple"] = "Simple";
|
|
59
|
+
DeviceClasses["Dynamic"] = "Dynamic";
|
|
60
|
+
DeviceClasses["Client"] = "Client";
|
|
61
|
+
DeviceClasses["Server"] = "Server";
|
|
62
|
+
DeviceClasses["Composed"] = "Composed";
|
|
63
|
+
DeviceClasses["Multiple"] = "Multiple";
|
|
64
|
+
DeviceClasses["EZInitiator"] = "EZ-Initiator";
|
|
65
|
+
DeviceClasses["EZTarget"] = "EZ-Target";
|
|
66
|
+
DeviceClasses["BridgedPowerSourceInfo"] = "BridgedPowerSourceInfo";
|
|
67
|
+
})(DeviceClasses || (DeviceClasses = {}));
|
|
68
|
+
export const DeviceTypeDefinition = ({ name, code, deviceClass, superSet, revision, requiredServerClusters = [], optionalServerClusters = [], requiredClientClusters = [], optionalClientClusters = [], unknown = false, }) => ({
|
|
69
|
+
name,
|
|
70
|
+
code: DeviceTypeId(code),
|
|
71
|
+
deviceClass,
|
|
72
|
+
superSet,
|
|
73
|
+
revision,
|
|
74
|
+
requiredServerClusters,
|
|
75
|
+
optionalServerClusters,
|
|
76
|
+
requiredClientClusters,
|
|
77
|
+
optionalClientClusters,
|
|
78
|
+
unknown,
|
|
79
|
+
});
|
|
27
80
|
export const bridge = DeviceTypeDefinition({
|
|
28
81
|
name: 'MA-aggregator',
|
|
29
82
|
code: 0x000e,
|
|
@@ -46,22 +99,6 @@ export const powerSource = DeviceTypeDefinition({
|
|
|
46
99
|
requiredServerClusters: [PowerSource.Cluster.id],
|
|
47
100
|
optionalServerClusters: [],
|
|
48
101
|
});
|
|
49
|
-
/**
|
|
50
|
-
2.5.3. Conditions
|
|
51
|
-
Please see the Base Device Type definition for conformance tags.
|
|
52
|
-
This device type SHALL only be used for Nodes which have a device type of Bridge.
|
|
53
|
-
|
|
54
|
-
2.5.6. Endpoint Composition
|
|
55
|
-
• A Bridged Node endpoint SHALL support one of the following composition patterns:
|
|
56
|
-
◦ Separate Endpoints: All application device types are supported on separate endpoints, and
|
|
57
|
-
not on the Bridged Node endpoint. The Bridged Node endpoint’s Descriptor cluster PartsList
|
|
58
|
-
attribute SHALL indicate a list of all endpoints representing the functionality of the bridged
|
|
59
|
-
device, including the endpoints supporting the application device types, i.e. the full-family
|
|
60
|
-
pattern defined in the System Model specification.
|
|
61
|
-
◦ One Endpoint: Both the Bridged Node and one or more application device types are sup
|
|
62
|
-
ported on the same endpoint (following application device type rules). Endpoint composi
|
|
63
|
-
tion SHALL conform to the application device type(s) definition
|
|
64
|
-
*/
|
|
65
102
|
export const bridgedNode = DeviceTypeDefinition({
|
|
66
103
|
name: 'MA-bridgedNode',
|
|
67
104
|
code: 0x0013,
|
|
@@ -83,7 +120,7 @@ export const onOffLight = DeviceTypeDefinition({
|
|
|
83
120
|
code: 0x0100,
|
|
84
121
|
deviceClass: DeviceClasses.Simple,
|
|
85
122
|
revision: 3,
|
|
86
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
123
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id],
|
|
87
124
|
optionalServerClusters: [LevelControl.Cluster.id, ColorControl.Cluster.id],
|
|
88
125
|
});
|
|
89
126
|
export const dimmableLight = DeviceTypeDefinition({
|
|
@@ -91,7 +128,7 @@ export const dimmableLight = DeviceTypeDefinition({
|
|
|
91
128
|
code: 0x0101,
|
|
92
129
|
deviceClass: DeviceClasses.Simple,
|
|
93
130
|
revision: 3,
|
|
94
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
131
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
|
|
95
132
|
optionalServerClusters: [ColorControl.Cluster.id],
|
|
96
133
|
});
|
|
97
134
|
export const colorTemperatureLight = DeviceTypeDefinition({
|
|
@@ -99,7 +136,7 @@ export const colorTemperatureLight = DeviceTypeDefinition({
|
|
|
99
136
|
code: 0x010c,
|
|
100
137
|
deviceClass: DeviceClasses.Simple,
|
|
101
138
|
revision: 4,
|
|
102
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
139
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
|
|
103
140
|
optionalServerClusters: [],
|
|
104
141
|
});
|
|
105
142
|
export const onOffOutlet = DeviceTypeDefinition({
|
|
@@ -107,7 +144,7 @@ export const onOffOutlet = DeviceTypeDefinition({
|
|
|
107
144
|
code: 0x010a,
|
|
108
145
|
deviceClass: DeviceClasses.Simple,
|
|
109
146
|
revision: 3,
|
|
110
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
147
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id],
|
|
111
148
|
optionalServerClusters: [LevelControl.Cluster.id],
|
|
112
149
|
});
|
|
113
150
|
export const dimmableOutlet = DeviceTypeDefinition({
|
|
@@ -115,7 +152,7 @@ export const dimmableOutlet = DeviceTypeDefinition({
|
|
|
115
152
|
code: 0x010b,
|
|
116
153
|
deviceClass: DeviceClasses.Simple,
|
|
117
154
|
revision: 3,
|
|
118
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
155
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
|
|
119
156
|
optionalServerClusters: [],
|
|
120
157
|
});
|
|
121
158
|
export const doorLockDevice = DeviceTypeDefinition({
|
|
@@ -124,7 +161,7 @@ export const doorLockDevice = DeviceTypeDefinition({
|
|
|
124
161
|
deviceClass: DeviceClasses.Simple,
|
|
125
162
|
revision: 3,
|
|
126
163
|
requiredServerClusters: [Identify.Cluster.id, DoorLock.Cluster.id],
|
|
127
|
-
optionalServerClusters: [Groups.Cluster.id
|
|
164
|
+
optionalServerClusters: [Groups.Cluster.id],
|
|
128
165
|
});
|
|
129
166
|
export const coverDevice = DeviceTypeDefinition({
|
|
130
167
|
name: 'MA-windowCovering',
|
|
@@ -132,13 +169,8 @@ export const coverDevice = DeviceTypeDefinition({
|
|
|
132
169
|
deviceClass: DeviceClasses.Simple,
|
|
133
170
|
revision: 3,
|
|
134
171
|
requiredServerClusters: [Identify.Cluster.id, WindowCovering.Cluster.id],
|
|
135
|
-
optionalServerClusters: [Groups.Cluster.id
|
|
172
|
+
optionalServerClusters: [Groups.Cluster.id],
|
|
136
173
|
});
|
|
137
|
-
/**
|
|
138
|
-
* Remark: it may have a thermostat device type.
|
|
139
|
-
* Additional device types MAY also be included in device compositions.
|
|
140
|
-
* The FanControl cluster must have the FanModeSequence attribute.
|
|
141
|
-
*/
|
|
142
174
|
export const fanDevice = DeviceTypeDefinition({
|
|
143
175
|
name: 'MA-fan',
|
|
144
176
|
code: 0x2b,
|
|
@@ -153,7 +185,7 @@ export const thermostatDevice = DeviceTypeDefinition({
|
|
|
153
185
|
deviceClass: DeviceClasses.Simple,
|
|
154
186
|
revision: 3,
|
|
155
187
|
requiredServerClusters: [Identify.Cluster.id, Thermostat.Cluster.id],
|
|
156
|
-
optionalServerClusters: [Groups.Cluster.id
|
|
188
|
+
optionalServerClusters: [Groups.Cluster.id, ThermostatUserInterfaceConfiguration.Cluster.id, EnergyPreference.Cluster.id, TimeSynchronization.Cluster.id],
|
|
157
189
|
});
|
|
158
190
|
export const contactSensor = DeviceTypeDefinition({
|
|
159
191
|
name: 'MA-contactsensor',
|
|
@@ -219,34 +251,30 @@ export const roboticVacuumCleaner = DeviceTypeDefinition({
|
|
|
219
251
|
requiredServerClusters: [Identify.Cluster.id, RvcRunMode.Cluster.id, RvcOperationalState.Cluster.id],
|
|
220
252
|
optionalServerClusters: [RvcCleanMode.Cluster.id],
|
|
221
253
|
});
|
|
222
|
-
// Custom device types without client clusters (not working in Alexa)
|
|
223
254
|
export const onOffSwitch = DeviceTypeDefinition({
|
|
224
255
|
name: 'MA-onoffswitch',
|
|
225
256
|
code: 0x0103,
|
|
226
257
|
deviceClass: DeviceClasses.Simple,
|
|
227
258
|
revision: 3,
|
|
228
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
259
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id],
|
|
229
260
|
optionalServerClusters: [LevelControl.Cluster.id, ColorControl.Cluster.id],
|
|
230
261
|
});
|
|
231
|
-
// Custom device types without client clusters (not working in Alexa)
|
|
232
262
|
export const dimmableSwitch = DeviceTypeDefinition({
|
|
233
263
|
name: 'MA-dimmableswitch',
|
|
234
264
|
code: 0x0104,
|
|
235
265
|
deviceClass: DeviceClasses.Simple,
|
|
236
266
|
revision: 3,
|
|
237
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
267
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
|
|
238
268
|
optionalServerClusters: [ColorControl.Cluster.id],
|
|
239
269
|
});
|
|
240
|
-
// Custom device types without client clusters (not working in Alexa)
|
|
241
270
|
export const colorTemperatureSwitch = DeviceTypeDefinition({
|
|
242
271
|
name: 'MA-colortemperatureswitch',
|
|
243
272
|
code: 0x0105,
|
|
244
273
|
deviceClass: DeviceClasses.Simple,
|
|
245
274
|
revision: 3,
|
|
246
|
-
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id,
|
|
275
|
+
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
|
|
247
276
|
optionalServerClusters: [],
|
|
248
277
|
});
|
|
249
|
-
// Matter 1.2 and 1.3 device types
|
|
250
278
|
export const airQualitySensor = DeviceTypeDefinition({
|
|
251
279
|
name: 'MA-airQualitySensor',
|
|
252
280
|
code: 0x002c,
|
|
@@ -292,7 +320,6 @@ export const rainSensor = DeviceTypeDefinition({
|
|
|
292
320
|
requiredServerClusters: [Identify.Cluster.id, BooleanState.Cluster.id],
|
|
293
321
|
optionalServerClusters: [BooleanStateConfiguration.Cluster.id],
|
|
294
322
|
});
|
|
295
|
-
// Remark: A Smoke CO Alarm device type SHALL support an instance of a Power Source device type on some endpoint.
|
|
296
323
|
export const smokeCoAlarm = DeviceTypeDefinition({
|
|
297
324
|
name: 'MA-smokeCoAlarm',
|
|
298
325
|
code: 0x0076,
|
|
@@ -301,12 +328,6 @@ export const smokeCoAlarm = DeviceTypeDefinition({
|
|
|
301
328
|
requiredServerClusters: [Identify.Cluster.id, SmokeCoAlarm.Cluster.id],
|
|
302
329
|
optionalServerClusters: [Groups.Cluster.id, TemperatureMeasurement.Cluster.id, RelativeHumidityMeasurement.Cluster.id, CarbonMonoxideConcentrationMeasurement.Cluster.id],
|
|
303
330
|
});
|
|
304
|
-
/**
|
|
305
|
-
* Remark: LevelControl cluster:
|
|
306
|
-
* 0 N/A Pump is stopped,
|
|
307
|
-
* 1–200 Level / 2 (0.5–100.0%) Pump setpoint in percent
|
|
308
|
-
* 201–255 100.0% Pump setpoint is 100.0%
|
|
309
|
-
*/
|
|
310
331
|
export const pumpDevice = DeviceTypeDefinition({
|
|
311
332
|
name: 'MA-pump',
|
|
312
333
|
code: 0x303,
|
|
@@ -323,10 +344,6 @@ export const waterValve = DeviceTypeDefinition({
|
|
|
323
344
|
requiredServerClusters: [Identify.Cluster.id, ValveConfigurationAndControl.Cluster.id],
|
|
324
345
|
optionalServerClusters: [FlowMeasurement.Cluster.id],
|
|
325
346
|
});
|
|
326
|
-
/**
|
|
327
|
-
* Remark: it may have a Thermostat, Temperature Sensor, Humidity Sensor and an Air Quality Sensor device type.
|
|
328
|
-
* Additional device types MAY also be included in device compositions.
|
|
329
|
-
*/
|
|
330
347
|
export const airPurifier = DeviceTypeDefinition({
|
|
331
348
|
name: 'MA-airPurifier',
|
|
332
349
|
code: 0x2d,
|
|
@@ -335,16 +352,6 @@ export const airPurifier = DeviceTypeDefinition({
|
|
|
335
352
|
requiredServerClusters: [Identify.Cluster.id, FanControl.Cluster.id],
|
|
336
353
|
optionalServerClusters: [Groups.Cluster.id, HepaFilterMonitoring.Cluster.id, ActivatedCarbonFilterMonitoring.Cluster.id],
|
|
337
354
|
});
|
|
338
|
-
/**
|
|
339
|
-
* Remark: it may have a temperature sensor and a humidity sensor device.
|
|
340
|
-
* Additional device types MAY also be included in device compositions.
|
|
341
|
-
* The DF (Dead Front) feature is required for the On/Off cluster in this device type:
|
|
342
|
-
* - Thermostat LocalTemperature null
|
|
343
|
-
* - Temperature Measurement MeasuredValue null
|
|
344
|
-
* - Relative Humidity Measurement MeasuredValue null
|
|
345
|
-
* - Fan Control SpeedSetting null
|
|
346
|
-
* - Fan Control PercentSetting null
|
|
347
|
-
*/
|
|
348
355
|
export const airConditioner = DeviceTypeDefinition({
|
|
349
356
|
name: 'MA-airConditioner',
|
|
350
357
|
code: 0x72,
|
|
@@ -369,4 +376,3 @@ export const deviceEnergyManagement = DeviceTypeDefinition({
|
|
|
369
376
|
requiredServerClusters: [DeviceEnergyManagement.Cluster.id, DeviceEnergyManagementMode.Cluster.id],
|
|
370
377
|
optionalServerClusters: [],
|
|
371
378
|
});
|
|
372
|
-
//# 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
|