matterbridge-example-dynamic-platform 1.2.0-edge.3 → 1.2.0-edge.7
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/dist/appliances.js +289 -105
- package/dist/platform.js +151 -72
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/appliances.js
CHANGED
@@ -1,74 +1,109 @@
|
|
1
|
-
import {
|
1
|
+
import { DeviceTypeId, Matterbridge, MatterbridgeEndpoint, MatterbridgeServer, MatterbridgeOnOffServer, Status, VendorId, smokeCoAlarm, RefrigeratorTag, PositionTag, laundryWasher, laundryDryer, dishwasher, refrigerator, temperatureControlledCabinetCooler, oven, temperatureControlledCabinetHeater, microwaveOven, extractorHood, cooktop, cookSurface, } from 'matterbridge';
|
2
2
|
import { ClusterBehavior, LogLevel as MatterLogLevel, LogFormat as MatterLogFormat, EndpointServer, logEndpoint } from 'matterbridge/matter';
|
3
|
-
import {
|
4
|
-
import { DishwasherAlarmServer, OperationalStateBehavior, TemperatureControlBehavior } from 'matterbridge/matter/behaviors';
|
3
|
+
import { OperationalState, TemperatureControl, DishwasherMode, LaundryWasherControls, LaundryWasherMode, LaundryDryerControls, OvenMode, RefrigeratorAndTemperatureControlledCabinetMode, MicrowaveOvenMode, MicrowaveOvenControl, } from 'matterbridge/matter/clusters';
|
4
|
+
import { DishwasherAlarmServer, LaundryDryerControlsServer, LaundryWasherControlsServer, MicrowaveOvenControlBehavior, MicrowaveOvenModeServer, OperationalStateBehavior, TemperatureControlBehavior, } from 'matterbridge/matter/behaviors';
|
5
5
|
import { OvenCavityOperationalState } from './implementations/ovenCavityOperationalStateCluster.js';
|
6
6
|
import { AnsiLogger } from 'matterbridge/logger';
|
7
7
|
import { Robot } from './robot.js';
|
8
8
|
export class Appliances extends MatterbridgeEndpoint {
|
9
|
-
static temperatureControlledCabinetCooler = DeviceTypeDefinition({
|
10
|
-
name: 'MA-temperaturecontrolledcabinetcooler',
|
11
|
-
code: 0x71,
|
12
|
-
deviceClass: DeviceClasses.Simple,
|
13
|
-
revision: 3,
|
14
|
-
requiredServerClusters: [TemperatureControl.Cluster.id, RefrigeratorAndTemperatureControlledCabinetMode.Cluster.id],
|
15
|
-
optionalServerClusters: [TemperatureMeasurement.Cluster.id],
|
16
|
-
});
|
17
|
-
static temperatureControlledCabinetHeater = DeviceTypeDefinition({
|
18
|
-
name: 'MA-temperaturecontrolledcabinetheater',
|
19
|
-
code: 0x71,
|
20
|
-
deviceClass: DeviceClasses.Simple,
|
21
|
-
revision: 3,
|
22
|
-
requiredServerClusters: [TemperatureControl.Cluster.id, OvenMode.Cluster.id, OvenCavityOperationalState.Cluster.id],
|
23
|
-
optionalServerClusters: [TemperatureMeasurement.Cluster.id],
|
24
|
-
});
|
25
|
-
static laundryWasher = DeviceTypeDefinition({
|
26
|
-
name: 'MA-laundrywasher',
|
27
|
-
code: 0x73,
|
28
|
-
deviceClass: DeviceClasses.Simple,
|
29
|
-
revision: 1,
|
30
|
-
requiredServerClusters: [OperationalState.Cluster.id],
|
31
|
-
optionalServerClusters: [Identify.Cluster.id, LaundryWasherMode.Cluster.id, OnOff.Cluster.id, LaundryWasherControls.Cluster.id, TemperatureControl.Cluster.id],
|
32
|
-
});
|
33
|
-
static dishwasher = DeviceTypeDefinition({
|
34
|
-
name: 'MA-dishwasher',
|
35
|
-
code: 0x75,
|
36
|
-
deviceClass: DeviceClasses.Simple,
|
37
|
-
revision: 1,
|
38
|
-
requiredServerClusters: [OperationalState.Cluster.id],
|
39
|
-
optionalServerClusters: [Identify.Cluster.id, OnOff.Cluster.id, TemperatureControl.Cluster.id, DishwasherMode.Cluster.id, DishwasherAlarm.Cluster.id],
|
40
|
-
});
|
41
9
|
constructor(deviceType, name, serial) {
|
42
|
-
super(deviceType, { uniqueStorageKey: `${name}-${serial}` });
|
43
|
-
if (deviceType.code ===
|
10
|
+
super(deviceType, { uniqueStorageKey: `${name}-${serial}` }, true);
|
11
|
+
if (deviceType.code === laundryWasher.code) {
|
44
12
|
this.createDefaultIdentifyClusterServer();
|
45
13
|
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Laundry Washer');
|
46
|
-
this.
|
14
|
+
this.createDeadFrontOnOffClusterServer();
|
15
|
+
this.createLevelTemperatureControlClusterServer(3, ['Cold', '30°', '40°', '60°', '80°']);
|
16
|
+
this.createDefaultLaundryWasherModeClusterServer();
|
17
|
+
this.createSpinLaundryWasherControlsClusterServer(3, ['400', '800', '1200', '1600']);
|
47
18
|
this.createDefaultOperationalStateClusterServer(OperationalState.OperationalStateEnum.Stopped);
|
48
19
|
}
|
49
|
-
else if (deviceType.code ===
|
20
|
+
else if (deviceType.code === laundryDryer.code) {
|
50
21
|
this.createDefaultIdentifyClusterServer();
|
22
|
+
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Laundry Dryer');
|
51
23
|
this.createDeadFrontOnOffClusterServer();
|
24
|
+
this.createLevelTemperatureControlClusterServer(3, ['Cold', '30°', '40°', '60°', '80°']);
|
25
|
+
this.createDefaultLaundryWasherModeClusterServer();
|
26
|
+
this.createDefaultLaundryDryerControlsClusterServer(1);
|
27
|
+
this.createDefaultOperationalStateClusterServer(OperationalState.OperationalStateEnum.Stopped);
|
28
|
+
}
|
29
|
+
else if (deviceType.code === dishwasher.code) {
|
30
|
+
this.createDefaultIdentifyClusterServer();
|
52
31
|
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Dishwasher');
|
32
|
+
this.createDeadFrontOnOffClusterServer();
|
53
33
|
this.createLevelTemperatureControlClusterServer(1, ['Cold', '30°', '40°', '60°']);
|
54
34
|
this.createDefaultDishwasherModeClusterServer();
|
55
35
|
this.createDefaultDishwasherAlarmClusterServer();
|
56
36
|
this.createDefaultOperationalStateClusterServer(OperationalState.OperationalStateEnum.Stopped);
|
57
37
|
}
|
58
|
-
else if (deviceType.name ===
|
38
|
+
else if (deviceType.name === refrigerator.name) {
|
39
|
+
this.createDefaultIdentifyClusterServer();
|
40
|
+
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Refrigerator');
|
41
|
+
const refrigerator = this.addChildDeviceType('Refrigerator', temperatureControlledCabinetCooler, { tagList: [{ mfgCode: null, namespaceId: RefrigeratorTag.Refrigerator.namespaceId, tag: RefrigeratorTag.Refrigerator.tag, label: RefrigeratorTag.Refrigerator.label }] }, true);
|
42
|
+
refrigerator.log.logName = `Refrigerator (cabinet Refrigerator)`;
|
43
|
+
refrigerator.createDefaultIdentifyClusterServer();
|
44
|
+
Appliances.createLevelTemperatureControlClusterServer(refrigerator, 2, ['Level 1', 'Level 2', 'Level 3', 'Level 4', 'Level 5']);
|
45
|
+
refrigerator.createDefaultTemperatureMeasurementClusterServer(1000);
|
46
|
+
Appliances.createDefaultRefrigeratorAndTemperatureControlledCabinetModeClusterServer(refrigerator, 1);
|
47
|
+
const freezer = this.addChildDeviceType('Freezer', temperatureControlledCabinetCooler, { tagList: [{ mfgCode: null, namespaceId: RefrigeratorTag.Freezer.namespaceId, tag: RefrigeratorTag.Freezer.tag, label: RefrigeratorTag.Freezer.label }] }, true);
|
48
|
+
freezer.log.logName = `Refrigerator (cabinet Freezer)`;
|
49
|
+
freezer.createDefaultIdentifyClusterServer();
|
50
|
+
Appliances.createLevelTemperatureControlClusterServer(freezer, 2, ['Level 1', 'Level 2', 'Level 3', 'Level 4', 'Level 5']);
|
51
|
+
freezer.createDefaultTemperatureMeasurementClusterServer(-2000);
|
52
|
+
Appliances.createDefaultRefrigeratorAndTemperatureControlledCabinetModeClusterServer(freezer, 1);
|
53
|
+
}
|
54
|
+
else if (deviceType.name === oven.name) {
|
55
|
+
this.createDefaultIdentifyClusterServer();
|
56
|
+
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Oven');
|
57
|
+
const cabinettop = this.addChildDeviceType('Oven (top)', temperatureControlledCabinetHeater, { tagList: [{ mfgCode: null, namespaceId: PositionTag.Top.namespaceId, tag: PositionTag.Top.tag, label: PositionTag.Top.label }] }, true);
|
58
|
+
cabinettop.log.logName = `Oven (top)`;
|
59
|
+
cabinettop.createDefaultIdentifyClusterServer();
|
60
|
+
Appliances.createLevelTemperatureControlClusterServer(cabinettop, 2, ['Defrost', '180°', '200°', '250°', '300°']);
|
61
|
+
cabinettop.createDefaultTemperatureMeasurementClusterServer(20000);
|
62
|
+
Appliances.createDefaultOvenModeClusterServer(cabinettop, 1);
|
63
|
+
const cabinetbottom = this.addChildDeviceType('Oven (bottom)', temperatureControlledCabinetHeater, { tagList: [{ mfgCode: null, namespaceId: PositionTag.Bottom.namespaceId, tag: PositionTag.Bottom.tag, label: PositionTag.Bottom.label }] }, true);
|
64
|
+
cabinetbottom.log.logName = `Oven (bottom)`;
|
65
|
+
cabinetbottom.createDefaultIdentifyClusterServer();
|
66
|
+
Appliances.createLevelTemperatureControlClusterServer(cabinetbottom, 2, ['Defrost', '180°', '200°', '250°', '300°']);
|
67
|
+
cabinetbottom.createDefaultTemperatureMeasurementClusterServer(30000);
|
68
|
+
Appliances.createDefaultOvenModeClusterServer(cabinetbottom, 1);
|
69
|
+
}
|
70
|
+
else if (deviceType.name === microwaveOven.name) {
|
71
|
+
this.createDefaultIdentifyClusterServer();
|
72
|
+
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Microwave Oven');
|
73
|
+
this.createDefaultOperationalStateClusterServer(OperationalState.OperationalStateEnum.Stopped);
|
74
|
+
this.createDefaultMicrowaveOvenModeClusterServer();
|
75
|
+
this.createDefaultMicrowaveOvenControlClusterServer();
|
76
|
+
}
|
77
|
+
else if (deviceType.name === extractorHood.name) {
|
59
78
|
this.createDefaultIdentifyClusterServer();
|
60
|
-
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, '
|
61
|
-
this.
|
62
|
-
this.
|
63
|
-
this.
|
79
|
+
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Extractor Hood');
|
80
|
+
this.createBaseFanControlClusterServer();
|
81
|
+
this.createDefaultHepaFilterMonitoringClusterServer();
|
82
|
+
this.createDefaultActivatedCarbonFilterMonitoringClusterServer();
|
64
83
|
}
|
65
|
-
else if (deviceType.name ===
|
84
|
+
else if (deviceType.name === cooktop.name) {
|
66
85
|
this.createDefaultIdentifyClusterServer();
|
67
|
-
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, '
|
68
|
-
this.
|
69
|
-
this.
|
70
|
-
|
71
|
-
|
86
|
+
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Cooktop');
|
87
|
+
this.createOffOnlyOnOffClusterServer(true);
|
88
|
+
const cookSurface1 = this.addChildDeviceType('Surface 1', cookSurface, { tagList: [{ mfgCode: null, namespaceId: PositionTag.Left.namespaceId, tag: PositionTag.Left.tag, label: PositionTag.Left.label }] }, true);
|
89
|
+
cookSurface1.log.logName = `Cook surface (right)`;
|
90
|
+
cookSurface1.createDefaultIdentifyClusterServer();
|
91
|
+
Appliances.createLevelTemperatureControlClusterServer(cookSurface1, 2, ['Level 1', 'Level 2', 'Level 3', 'Level 4', 'Level 5']);
|
92
|
+
cookSurface1.createDefaultTemperatureMeasurementClusterServer(10000);
|
93
|
+
cookSurface1.createOffOnlyOnOffClusterServer(true);
|
94
|
+
const cookSurface2 = this.addChildDeviceType('Surface 2', cookSurface, { tagList: [{ mfgCode: null, namespaceId: PositionTag.Right.namespaceId, tag: PositionTag.Right.tag, label: PositionTag.Right.label }] }, true);
|
95
|
+
cookSurface2.log.logName = `Cook surface (left)`;
|
96
|
+
cookSurface2.createDefaultIdentifyClusterServer();
|
97
|
+
Appliances.createLevelTemperatureControlClusterServer(cookSurface2, 3, ['Level 1', 'Level 2', 'Level 3', 'Level 4', 'Level 5']);
|
98
|
+
cookSurface2.createDefaultTemperatureMeasurementClusterServer(12000);
|
99
|
+
cookSurface2.createOffOnlyOnOffClusterServer(true);
|
100
|
+
this.eventsOf(MatterbridgeOnOffServer).onOff$Changed.on(async (value) => {
|
101
|
+
if (!value) {
|
102
|
+
this.log.notice('Turning off all cook surfaces');
|
103
|
+
await cookSurface1.setStateOf(MatterbridgeOnOffServer, { onOff: false });
|
104
|
+
await cookSurface2.setStateOf(MatterbridgeOnOffServer, { onOff: false });
|
105
|
+
}
|
106
|
+
});
|
72
107
|
}
|
73
108
|
}
|
74
109
|
createDefaultOperationalStateClusterServer(operationalState = OperationalState.OperationalStateEnum.Stopped) {
|
@@ -100,15 +135,34 @@ export class Appliances extends MatterbridgeEndpoint {
|
|
100
135
|
});
|
101
136
|
return this;
|
102
137
|
}
|
103
|
-
createDefaultRefrigeratorAndTemperatureControlledCabinetModeClusterServer(currentMode) {
|
104
|
-
|
138
|
+
static createDefaultRefrigeratorAndTemperatureControlledCabinetModeClusterServer(endpoint, currentMode) {
|
139
|
+
endpoint.behaviors.require(RefrigeratorAndTemperatureControlledCabinetModeServer, {
|
105
140
|
supportedModes: [
|
141
|
+
{ label: 'Auto', mode: 0, modeTags: [{ value: RefrigeratorAndTemperatureControlledCabinetMode.ModeTag.Auto }] },
|
106
142
|
{ label: 'RapidCool', mode: 1, modeTags: [{ value: RefrigeratorAndTemperatureControlledCabinetMode.ModeTag.RapidCool }] },
|
107
143
|
{ label: 'RapidFreeze', mode: 2, modeTags: [{ value: RefrigeratorAndTemperatureControlledCabinetMode.ModeTag.RapidFreeze }] },
|
108
144
|
],
|
109
145
|
currentMode,
|
110
146
|
});
|
111
|
-
return
|
147
|
+
return endpoint;
|
148
|
+
}
|
149
|
+
static createDefaultOvenModeClusterServer(endpoint, currentMode) {
|
150
|
+
endpoint.behaviors.require(OvenModeServer, {
|
151
|
+
supportedModes: [
|
152
|
+
{ label: 'Bake', mode: 1, modeTags: [{ value: OvenMode.ModeTag.Bake }] },
|
153
|
+
{ label: 'Convection', mode: 2, modeTags: [{ value: OvenMode.ModeTag.Convection }] },
|
154
|
+
{ label: 'Grill', mode: 3, modeTags: [{ value: OvenMode.ModeTag.Grill }] },
|
155
|
+
{ label: 'Roast', mode: 4, modeTags: [{ value: OvenMode.ModeTag.Roast }] },
|
156
|
+
{ label: 'Clean', mode: 5, modeTags: [{ value: OvenMode.ModeTag.Clean }] },
|
157
|
+
{ label: 'Convection Bake', mode: 6, modeTags: [{ value: OvenMode.ModeTag.ConvectionBake }] },
|
158
|
+
{ label: 'Convection Roast', mode: 7, modeTags: [{ value: OvenMode.ModeTag.ConvectionRoast }] },
|
159
|
+
{ label: 'Warming', mode: 8, modeTags: [{ value: OvenMode.ModeTag.Warming }] },
|
160
|
+
{ label: 'Proofing', mode: 9, modeTags: [{ value: OvenMode.ModeTag.Proofing }] },
|
161
|
+
{ label: 'Steam', mode: 10, modeTags: [{ value: OvenMode.ModeTag.Steam }] },
|
162
|
+
],
|
163
|
+
currentMode,
|
164
|
+
});
|
165
|
+
return endpoint;
|
112
166
|
}
|
113
167
|
createDefaultDishwasherModeClusterServer(currentMode) {
|
114
168
|
this.behaviors.require(DishwasherModeServer, {
|
@@ -121,6 +175,73 @@ export class Appliances extends MatterbridgeEndpoint {
|
|
121
175
|
});
|
122
176
|
return this;
|
123
177
|
}
|
178
|
+
createDefaultLaundryWasherModeClusterServer(currentMode) {
|
179
|
+
this.behaviors.require(LaundryWasherModeServer, {
|
180
|
+
supportedModes: [
|
181
|
+
{ label: 'Delicate', mode: 1, modeTags: [{ value: LaundryWasherMode.ModeTag.Delicate }] },
|
182
|
+
{ label: 'Normal', mode: 2, modeTags: [{ value: LaundryWasherMode.ModeTag.Normal }] },
|
183
|
+
{ label: 'Heavy', mode: 3, modeTags: [{ value: LaundryWasherMode.ModeTag.Heavy }] },
|
184
|
+
{ label: 'Whites', mode: 4, modeTags: [{ value: LaundryWasherMode.ModeTag.Whites }] },
|
185
|
+
],
|
186
|
+
currentMode,
|
187
|
+
});
|
188
|
+
return this;
|
189
|
+
}
|
190
|
+
createDefaultMicrowaveOvenModeClusterServer(currentMode, supportedModes) {
|
191
|
+
this.behaviors.require(MicrowaveOvenModeServer, {
|
192
|
+
supportedModes: supportedModes ?? [
|
193
|
+
{ label: 'Auto', mode: 1, modeTags: [{ value: MicrowaveOvenMode.ModeTag.Auto }] },
|
194
|
+
{ label: 'Quick', mode: 2, modeTags: [{ value: MicrowaveOvenMode.ModeTag.Quick }] },
|
195
|
+
{ label: 'Quiet', mode: 3, modeTags: [{ value: MicrowaveOvenMode.ModeTag.Quiet }] },
|
196
|
+
{ label: 'Min', mode: 4, modeTags: [{ value: MicrowaveOvenMode.ModeTag.Min }] },
|
197
|
+
{ label: 'Max', mode: 5, modeTags: [{ value: MicrowaveOvenMode.ModeTag.Max }] },
|
198
|
+
{ label: 'Normal', mode: 6, modeTags: [{ value: MicrowaveOvenMode.ModeTag.Normal }] },
|
199
|
+
{ label: 'Defrost', mode: 7, modeTags: [{ value: MicrowaveOvenMode.ModeTag.Defrost }] },
|
200
|
+
],
|
201
|
+
currentMode: currentMode ?? 1,
|
202
|
+
});
|
203
|
+
return this;
|
204
|
+
}
|
205
|
+
createDefaultMicrowaveOvenControlClusterServer(selectedWattIndex = 5, supportedWatts = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], cookTime = 60, maxCookTime = 3600) {
|
206
|
+
this.behaviors.require(MatterbridgeMicrowaveOvenControlServer.with(MicrowaveOvenControl.Feature.PowerInWatts), {
|
207
|
+
supportedWatts,
|
208
|
+
selectedWattIndex,
|
209
|
+
cookTime,
|
210
|
+
maxCookTime,
|
211
|
+
});
|
212
|
+
return this;
|
213
|
+
}
|
214
|
+
createSpinLaundryWasherControlsClusterServer(spinSpeedCurrent, spinSpeeds) {
|
215
|
+
this.behaviors.require(LaundryWasherControlsServer.with(LaundryWasherControls.Feature.Spin), {
|
216
|
+
spinSpeeds: spinSpeeds ?? ['400', '800', '1200', '1600'],
|
217
|
+
spinSpeedCurrent,
|
218
|
+
});
|
219
|
+
return this;
|
220
|
+
}
|
221
|
+
createRinseLaundryWasherControlsClusterServer(numberOfRinses, supportedRinses) {
|
222
|
+
this.behaviors.require(LaundryWasherControlsServer.with(LaundryWasherControls.Feature.Rinse), {
|
223
|
+
supportedRinses: supportedRinses ?? [
|
224
|
+
LaundryWasherControls.NumberOfRinses.None,
|
225
|
+
LaundryWasherControls.NumberOfRinses.Normal,
|
226
|
+
LaundryWasherControls.NumberOfRinses.Extra,
|
227
|
+
LaundryWasherControls.NumberOfRinses.Max,
|
228
|
+
],
|
229
|
+
numberOfRinses,
|
230
|
+
});
|
231
|
+
return this;
|
232
|
+
}
|
233
|
+
createDefaultLaundryDryerControlsClusterServer(selectedDrynessLevel, supportedDrynessLevels) {
|
234
|
+
this.behaviors.require(LaundryDryerControlsServer, {
|
235
|
+
supportedDrynessLevels: supportedDrynessLevels ?? [
|
236
|
+
LaundryDryerControls.DrynessLevel.Low,
|
237
|
+
LaundryDryerControls.DrynessLevel.Normal,
|
238
|
+
LaundryDryerControls.DrynessLevel.Extra,
|
239
|
+
LaundryDryerControls.DrynessLevel.Max,
|
240
|
+
],
|
241
|
+
selectedDrynessLevel,
|
242
|
+
});
|
243
|
+
return this;
|
244
|
+
}
|
124
245
|
createDefaultDishwasherAlarmClusterServer() {
|
125
246
|
this.behaviors.require(DishwasherAlarmServer, {
|
126
247
|
mask: { inflowError: true, drainError: true, doorError: true, tempTooLow: true, tempTooHigh: true, waterLevelError: true },
|
@@ -129,24 +250,6 @@ export class Appliances extends MatterbridgeEndpoint {
|
|
129
250
|
});
|
130
251
|
return this;
|
131
252
|
}
|
132
|
-
createDefaultOvenModeClusterServer(currentMode) {
|
133
|
-
this.behaviors.require(OvenModeServer, {
|
134
|
-
supportedModes: [
|
135
|
-
{ label: 'Bake', mode: 1, modeTags: [{ value: OvenMode.ModeTag.Bake }] },
|
136
|
-
{ label: 'Convection', mode: 2, modeTags: [{ value: OvenMode.ModeTag.Convection }] },
|
137
|
-
{ label: 'Grill', mode: 3, modeTags: [{ value: OvenMode.ModeTag.Grill }] },
|
138
|
-
{ label: 'Roast', mode: 4, modeTags: [{ value: OvenMode.ModeTag.Roast }] },
|
139
|
-
{ label: 'Clean', mode: 5, modeTags: [{ value: OvenMode.ModeTag.Clean }] },
|
140
|
-
{ label: 'Convection Bake', mode: 6, modeTags: [{ value: OvenMode.ModeTag.ConvectionBake }] },
|
141
|
-
{ label: 'Convection Roast', mode: 7, modeTags: [{ value: OvenMode.ModeTag.ConvectionRoast }] },
|
142
|
-
{ label: 'Warming', mode: 8, modeTags: [{ value: OvenMode.ModeTag.Warming }] },
|
143
|
-
{ label: 'Proofing', mode: 9, modeTags: [{ value: OvenMode.ModeTag.Proofing }] },
|
144
|
-
{ label: 'Steam', mode: 10, modeTags: [{ value: OvenMode.ModeTag.Steam }] },
|
145
|
-
],
|
146
|
-
currentMode,
|
147
|
-
});
|
148
|
-
return this;
|
149
|
-
}
|
150
253
|
createLevelTemperatureControlClusterServer(selectedTemperatureLevel = 1, supportedTemperatureLevels = ['Cold', 'Warm', 'Hot']) {
|
151
254
|
this.behaviors.require(MatterbridgeLevelTemperatureControlServer.with(TemperatureControl.Feature.TemperatureLevel), {
|
152
255
|
selectedTemperatureLevel,
|
@@ -154,6 +257,13 @@ export class Appliances extends MatterbridgeEndpoint {
|
|
154
257
|
});
|
155
258
|
return this;
|
156
259
|
}
|
260
|
+
static createLevelTemperatureControlClusterServer(endpoint, selectedTemperatureLevel = 1, supportedTemperatureLevels = ['Cold', 'Warm', 'Hot']) {
|
261
|
+
endpoint.behaviors.require(MatterbridgeLevelTemperatureControlServer.with(TemperatureControl.Feature.TemperatureLevel), {
|
262
|
+
selectedTemperatureLevel,
|
263
|
+
supportedTemperatureLevels,
|
264
|
+
});
|
265
|
+
return endpoint;
|
266
|
+
}
|
157
267
|
createNumberTemperatureControlClusterServer(temperatureSetpoint, minTemperature, maxTemperature, step = 1) {
|
158
268
|
this.behaviors.require(MatterbridgeNumberTemperatureControlServer.with(TemperatureControl.Feature.TemperatureNumber, TemperatureControl.Feature.TemperatureStep), {
|
159
269
|
temperatureSetpoint,
|
@@ -163,17 +273,26 @@ export class Appliances extends MatterbridgeEndpoint {
|
|
163
273
|
});
|
164
274
|
return this;
|
165
275
|
}
|
276
|
+
static createNumberTemperatureControlClusterServer(endpoint, temperatureSetpoint, minTemperature, maxTemperature, step = 1) {
|
277
|
+
endpoint.behaviors.require(MatterbridgeNumberTemperatureControlServer.with(TemperatureControl.Feature.TemperatureNumber, TemperatureControl.Feature.TemperatureStep), {
|
278
|
+
temperatureSetpoint,
|
279
|
+
minTemperature,
|
280
|
+
maxTemperature,
|
281
|
+
step,
|
282
|
+
});
|
283
|
+
return endpoint;
|
284
|
+
}
|
166
285
|
}
|
167
286
|
class MatterbridgeOperationalStateServer extends OperationalStateBehavior {
|
168
287
|
initialize() {
|
169
|
-
const device = this.
|
170
|
-
device.log.info('MatterbridgeOperationalStateServer initialized: setting operational state to
|
288
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
289
|
+
device.log.info('MatterbridgeOperationalStateServer initialized: setting operational state to Stopped');
|
171
290
|
this.state.operationalState = OperationalState.OperationalStateEnum.Stopped;
|
172
291
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
173
292
|
}
|
174
293
|
pause() {
|
175
|
-
const device = this.
|
176
|
-
device.log.info('MatterbridgeOperationalStateServer: pause called setting operational state to Paused
|
294
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
295
|
+
device.log.info('MatterbridgeOperationalStateServer: pause called setting operational state to Paused');
|
177
296
|
this.state.operationalState = OperationalState.OperationalStateEnum.Paused;
|
178
297
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
179
298
|
return {
|
@@ -181,8 +300,8 @@ class MatterbridgeOperationalStateServer extends OperationalStateBehavior {
|
|
181
300
|
};
|
182
301
|
}
|
183
302
|
stop() {
|
184
|
-
const device = this.
|
185
|
-
device.log.info('MatterbridgeOperationalStateServer: stop called setting operational state to Stopped
|
303
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
304
|
+
device.log.info('MatterbridgeOperationalStateServer: stop called setting operational state to Stopped');
|
186
305
|
this.state.operationalState = OperationalState.OperationalStateEnum.Stopped;
|
187
306
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
188
307
|
return {
|
@@ -190,8 +309,8 @@ class MatterbridgeOperationalStateServer extends OperationalStateBehavior {
|
|
190
309
|
};
|
191
310
|
}
|
192
311
|
start() {
|
193
|
-
const device = this.
|
194
|
-
device.log.info('MatterbridgeOperationalStateServer: start called setting operational state to Running
|
312
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
313
|
+
device.log.info('MatterbridgeOperationalStateServer: start called setting operational state to Running');
|
195
314
|
this.state.operationalState = OperationalState.OperationalStateEnum.Running;
|
196
315
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
197
316
|
return {
|
@@ -199,8 +318,8 @@ class MatterbridgeOperationalStateServer extends OperationalStateBehavior {
|
|
199
318
|
};
|
200
319
|
}
|
201
320
|
resume() {
|
202
|
-
const device = this.
|
203
|
-
device.log.info('MatterbridgeOperationalStateServer: resume called setting operational state to Running
|
321
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
322
|
+
device.log.info('MatterbridgeOperationalStateServer: resume called setting operational state to Running');
|
204
323
|
this.state.operationalState = OperationalState.OperationalStateEnum.Running;
|
205
324
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
206
325
|
return {
|
@@ -211,14 +330,13 @@ class MatterbridgeOperationalStateServer extends OperationalStateBehavior {
|
|
211
330
|
class MatterbridgeLevelTemperatureControlServer extends TemperatureControlBehavior.with(TemperatureControl.Feature.TemperatureLevel) {
|
212
331
|
initialize() {
|
213
332
|
if (this.state.supportedTemperatureLevels.length >= 2) {
|
214
|
-
const device = this.
|
215
|
-
device.log.info('MatterbridgeLevelTemperatureControlServer initialized
|
216
|
-
this.state.selectedTemperatureLevel = 1;
|
333
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
334
|
+
device.log.info('MatterbridgeLevelTemperatureControlServer initialized');
|
217
335
|
}
|
218
336
|
}
|
219
337
|
setTemperature(request) {
|
220
|
-
const device = this.
|
221
|
-
if (request.targetTemperatureLevel && request.targetTemperatureLevel >= 0 && request.targetTemperatureLevel < this.state.supportedTemperatureLevels.length) {
|
338
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
339
|
+
if (request.targetTemperatureLevel !== undefined && request.targetTemperatureLevel >= 0 && request.targetTemperatureLevel < this.state.supportedTemperatureLevels.length) {
|
222
340
|
device.log.info(`MatterbridgeLevelTemperatureControlServer: setTemperature called setting selectedTemperatureLevel to ${request.targetTemperatureLevel}: ${this.state.supportedTemperatureLevels[request.targetTemperatureLevel]}`);
|
223
341
|
this.state.selectedTemperatureLevel = request.targetTemperatureLevel;
|
224
342
|
}
|
@@ -229,12 +347,12 @@ class MatterbridgeLevelTemperatureControlServer extends TemperatureControlBehavi
|
|
229
347
|
}
|
230
348
|
class MatterbridgeNumberTemperatureControlServer extends TemperatureControlBehavior.with(TemperatureControl.Feature.TemperatureNumber) {
|
231
349
|
initialize() {
|
232
|
-
const device = this.
|
350
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
233
351
|
device.log.info('MatterbridgeNumberTemperatureControlServer initialized');
|
234
352
|
}
|
235
353
|
setTemperature(request) {
|
236
|
-
const device = this.
|
237
|
-
if (request.targetTemperature && request.targetTemperature >= this.state.minTemperature && request.targetTemperature <= this.state.maxTemperature) {
|
354
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
355
|
+
if (request.targetTemperature !== undefined && request.targetTemperature >= this.state.minTemperature && request.targetTemperature <= this.state.maxTemperature) {
|
238
356
|
device.log.info(`MatterbridgeNumberTemperatureControlServer: setTemperature called setting temperatureSetpoint to ${request.targetTemperature}`);
|
239
357
|
this.state.temperatureSetpoint = request.targetTemperature;
|
240
358
|
}
|
@@ -243,16 +361,42 @@ class MatterbridgeNumberTemperatureControlServer extends TemperatureControlBehav
|
|
243
361
|
}
|
244
362
|
}
|
245
363
|
}
|
364
|
+
class MatterbridgeMicrowaveOvenControlServer extends MicrowaveOvenControlBehavior.with(MicrowaveOvenControl.Feature.PowerInWatts) {
|
365
|
+
initialize() {
|
366
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
367
|
+
device.log.info('MatterbridgeMicrowaveOvenControlServer initialized');
|
368
|
+
}
|
369
|
+
setCookingParameters(request) {
|
370
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
371
|
+
if (request.wattSettingIndex !== undefined && request.wattSettingIndex >= 0 && request.wattSettingIndex < this.state.supportedWatts.length) {
|
372
|
+
device.log.info(`MatterbridgeMicrowaveOvenControlServer: setCookingParameters called setting selectedWattIndex to ${request.wattSettingIndex}`);
|
373
|
+
this.state.selectedWattIndex = request.wattSettingIndex;
|
374
|
+
}
|
375
|
+
else {
|
376
|
+
device.log.error(`MatterbridgeMicrowaveOvenControlServer: setCookingParameters called with invalid wattSettingIndex ${request.wattSettingIndex}`);
|
377
|
+
}
|
378
|
+
}
|
379
|
+
addMoreTime(request) {
|
380
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
381
|
+
if (request.timeToAdd !== undefined && request.timeToAdd >= 0) {
|
382
|
+
device.log.info(`MatterbridgeMicrowaveOvenControlServer: addMoreTime called setting cookTime to ${this.state.cookTime + request.timeToAdd}`);
|
383
|
+
this.state.cookTime += request.timeToAdd;
|
384
|
+
}
|
385
|
+
else {
|
386
|
+
device.log.error(`MatterbridgeMicrowaveOvenControlServer: addMoreTime called with invalid cookTime ${request.timeToAdd}`);
|
387
|
+
}
|
388
|
+
}
|
389
|
+
}
|
246
390
|
export const OvenCavityOperationalStateBehavior = ClusterBehavior.withInterface().for(OvenCavityOperationalState.Cluster);
|
247
391
|
export class OvenCavityOperationalStateServer extends OvenCavityOperationalStateBehavior {
|
248
392
|
initialize() {
|
249
|
-
const device = this.
|
393
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
250
394
|
device.log.info('OvenCavityOperationalStateServer initialized: setting operational state to Stopped and operational error to No error');
|
251
395
|
this.state.operationalState = OperationalState.OperationalStateEnum.Stopped;
|
252
396
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
253
397
|
}
|
254
398
|
stop() {
|
255
|
-
const device = this.
|
399
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
256
400
|
device.log.info('OvenCavityOperationalStateServer: stop called setting operational state to Stopped and operational error to No error');
|
257
401
|
this.state.operationalState = OperationalState.OperationalStateEnum.Stopped;
|
258
402
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
@@ -261,7 +405,7 @@ export class OvenCavityOperationalStateServer extends OvenCavityOperationalState
|
|
261
405
|
};
|
262
406
|
}
|
263
407
|
start() {
|
264
|
-
const device = this.
|
408
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
265
409
|
device.log.info('OvenCavityOperationalStateServer: start called setting operational state to Running and operational error to No error');
|
266
410
|
this.state.operationalState = OperationalState.OperationalStateEnum.Running;
|
267
411
|
this.state.operationalError = { errorStateId: OperationalState.ErrorState.NoError, errorStateLabel: 'No error', errorStateDetails: 'Fully operational' };
|
@@ -273,14 +417,15 @@ export class OvenCavityOperationalStateServer extends OvenCavityOperationalState
|
|
273
417
|
export const RefrigeratorAndTemperatureControlledCabinetModeBehavior = ClusterBehavior.withInterface().for(RefrigeratorAndTemperatureControlledCabinetMode.Cluster);
|
274
418
|
class RefrigeratorAndTemperatureControlledCabinetModeServer extends RefrigeratorAndTemperatureControlledCabinetModeBehavior {
|
275
419
|
initialize() {
|
276
|
-
const device = this.
|
420
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
277
421
|
device.log.info('MatterbridgeRefrigeratorAndTemperatureControlledCabinetModeServer initialized: setting currentMode to 1');
|
278
422
|
this.state.currentMode = 1;
|
279
423
|
}
|
280
424
|
changeToMode(request) {
|
281
|
-
const device = this.
|
282
|
-
|
283
|
-
|
425
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
426
|
+
const supportedMode = this.state.supportedModes.find((supportedMode) => supportedMode.mode === request.newMode);
|
427
|
+
if (supportedMode) {
|
428
|
+
device.log.info(`MatterbridgeRefrigeratorAndTemperatureControlledCabinetModeServer: changeToMode called with mode ${supportedMode.mode} = ${supportedMode.label}`);
|
284
429
|
this.state.currentMode = request.newMode;
|
285
430
|
return { status: Status.Success, statusText: 'Success' };
|
286
431
|
}
|
@@ -293,14 +438,15 @@ class RefrigeratorAndTemperatureControlledCabinetModeServer extends Refrigerator
|
|
293
438
|
export const OvenModeBehavior = ClusterBehavior.withInterface().for(OvenMode.Cluster);
|
294
439
|
class OvenModeServer extends OvenModeBehavior {
|
295
440
|
initialize() {
|
296
|
-
const device = this.
|
441
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
297
442
|
device.log.info('OvenModeServer initialized: setting currentMode to 3');
|
298
443
|
this.state.currentMode = 3;
|
299
444
|
}
|
300
445
|
changeToMode(request) {
|
301
|
-
const device = this.
|
302
|
-
|
303
|
-
|
446
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
447
|
+
const supportedMode = this.state.supportedModes.find((supportedMode) => supportedMode.mode === request.newMode);
|
448
|
+
if (supportedMode) {
|
449
|
+
device.log.info(`OvenModeServer: changeToMode called with mode ${supportedMode.mode} = ${supportedMode.label}`);
|
304
450
|
this.state.currentMode = request.newMode;
|
305
451
|
return { status: Status.Success, statusText: 'Success' };
|
306
452
|
}
|
@@ -313,14 +459,23 @@ class OvenModeServer extends OvenModeBehavior {
|
|
313
459
|
export const DishwasherModeBehavior = ClusterBehavior.withInterface().for(DishwasherMode.Cluster);
|
314
460
|
class DishwasherModeServer extends DishwasherModeBehavior {
|
315
461
|
initialize() {
|
316
|
-
const device = this.
|
462
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
317
463
|
device.log.info('DishwasherModeServer initialized: setting currentMode to 3');
|
318
|
-
this.state.currentMode =
|
464
|
+
this.state.currentMode = 2;
|
465
|
+
this.reactTo(this.agent.get(MatterbridgeOnOffServer).events.onOff$Changed, this.handleOnOffChange);
|
466
|
+
}
|
467
|
+
handleOnOffChange(onOff) {
|
468
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
469
|
+
if (onOff === false) {
|
470
|
+
device.log.info('***OnOffServer changed to OFF: setting Dead Front state to Manufacturer Specific');
|
471
|
+
this.state.currentMode = 2;
|
472
|
+
}
|
319
473
|
}
|
320
474
|
changeToMode(request) {
|
321
|
-
const device = this.
|
322
|
-
|
323
|
-
|
475
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
476
|
+
const supportedMode = this.state.supportedModes.find((supportedMode) => supportedMode.mode === request.newMode);
|
477
|
+
if (supportedMode) {
|
478
|
+
device.log.info(`DishwasherModeServer: changeToMode called with mode ${supportedMode.mode} = ${supportedMode.label}`);
|
324
479
|
this.state.currentMode = request.newMode;
|
325
480
|
return { status: Status.Success, statusText: 'Success' };
|
326
481
|
}
|
@@ -330,6 +485,35 @@ class DishwasherModeServer extends DishwasherModeBehavior {
|
|
330
485
|
}
|
331
486
|
}
|
332
487
|
}
|
488
|
+
export const LaundryWasherModeBehavior = ClusterBehavior.withInterface().for(LaundryWasherMode.Cluster);
|
489
|
+
class LaundryWasherModeServer extends LaundryWasherModeBehavior {
|
490
|
+
initialize() {
|
491
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
492
|
+
device.log.info('LaundryWasherModeServer initialized: setting currentMode to 3');
|
493
|
+
this.state.currentMode = 2;
|
494
|
+
this.reactTo(this.agent.get(MatterbridgeOnOffServer).events.onOff$Changed, this.handleOnOffChange);
|
495
|
+
}
|
496
|
+
handleOnOffChange(onOff) {
|
497
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
498
|
+
if (onOff === false) {
|
499
|
+
device.log.notice('OnOffServer changed to OFF: setting Dead Front state to Manufacturer Specific');
|
500
|
+
this.state.currentMode = 2;
|
501
|
+
}
|
502
|
+
}
|
503
|
+
changeToMode(request) {
|
504
|
+
const device = this.endpoint.stateOf(MatterbridgeServer).deviceCommand;
|
505
|
+
const supportedMode = this.state.supportedModes.find((supportedMode) => supportedMode.mode === request.newMode);
|
506
|
+
if (supportedMode) {
|
507
|
+
device.log.info(`LaundryWasherModeServer: changeToMode called with mode ${supportedMode.mode} = ${supportedMode.label}`);
|
508
|
+
this.state.currentMode = request.newMode;
|
509
|
+
return { status: Status.Success, statusText: 'Success' };
|
510
|
+
}
|
511
|
+
else {
|
512
|
+
device.log.error(`LaundryWasherModeServer: changeToMode called with invalid mode ${request.newMode}`);
|
513
|
+
return { status: Status.InvalidCommand, statusText: 'Invalid mode' };
|
514
|
+
}
|
515
|
+
}
|
516
|
+
}
|
333
517
|
if (process.argv.includes('-testRobot')) {
|
334
518
|
const matterbridge = await Matterbridge.loadInstance(false);
|
335
519
|
matterbridge.log = new AnsiLogger({ logName: 'Matterbridge', logTimestampFormat: 4, logLevel: "debug" });
|
package/dist/platform.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { MatterbridgeEndpoint, MatterbridgeDynamicPlatform,
|
1
|
+
import { MatterbridgeEndpoint, MatterbridgeDynamicPlatform, airQualitySensor, bridgedNode, colorTemperatureLight, coverDevice, dimmableLight, doorLockDevice, fanDevice, flowSensor, humiditySensor, onOffLight, onOffOutlet, onOffSwitch, powerSource, rainSensor, smokeCoAlarm, temperatureSensor, thermostatDevice, waterFreezeDetector, waterLeakDetector, airPurifier, pumpDevice, waterValve, genericSwitch, airConditioner, laundryWasher, cooktop, extractorHood, microwaveOven, oven, refrigerator, dishwasher, laundryDryer, onOffMountedSwitch, dimmableMountedSwitch, } from 'matterbridge';
|
2
2
|
import { isValidBoolean, isValidNumber } from 'matterbridge/utils';
|
3
3
|
import { LocationTag } from 'matterbridge/matter';
|
4
4
|
import { PowerSource, BooleanState, OnOff, LevelControl, AirQuality, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, FlowMeasurement, ColorControl, DoorLock, FanControl, FormaldehydeConcentrationMeasurement, NitrogenDioxideConcentrationMeasurement, OzoneConcentrationMeasurement, Pm10ConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm25ConcentrationMeasurement, RadonConcentrationMeasurement, RelativeHumidityMeasurement, RelativeHumidityMeasurementCluster, SmokeCoAlarm, TemperatureMeasurement, Thermostat, ThermostatCluster, TotalVolatileOrganicCompoundsConcentrationMeasurement, WindowCovering, } from 'matterbridge/matter/clusters';
|
@@ -50,6 +50,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
50
50
|
airConditionerInterval;
|
51
51
|
genericSwitchInterval;
|
52
52
|
genericSwitchLastEvent = 'Release';
|
53
|
+
intervalOnOff = false;
|
54
|
+
intervalLevel = 0;
|
53
55
|
bridgedDevices = new Map();
|
54
56
|
fanModeLookup = ['Off', 'Low', 'Medium', 'High', 'On', 'Auto', 'Smart'];
|
55
57
|
constructor(matterbridge, log, config) {
|
@@ -92,6 +94,65 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
92
94
|
await this.switch?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.switch.log);
|
93
95
|
this.switch?.log.info('Command off called');
|
94
96
|
});
|
97
|
+
this.mountedOnOffSwitch = new MatterbridgeEndpoint([onOffMountedSwitch, bridgedNode, powerSource], { uniqueStorageKey: 'OnOffMountedSwitch' }, this.config.debug)
|
98
|
+
.createDefaultIdentifyClusterServer()
|
99
|
+
.createDefaultGroupsClusterServer()
|
100
|
+
.createDefaultBridgedDeviceBasicInformationClusterServer('OnOff Mounted Switch', '0x298242164', 0xfff1, 'Matterbridge', 'Matterbridge OnOff Mounted Switch', parseInt(this.version.replace(/\D/g, '')), this.version === '' ? 'Unknown' : this.version, parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion)
|
101
|
+
.createDefaultOnOffClusterServer()
|
102
|
+
.createDefaultPowerSourceRechargeableBatteryClusterServer(70);
|
103
|
+
this.setSelectDevice(this.mountedOnOffSwitch.serialNumber ?? '', this.mountedOnOffSwitch.deviceName ?? '', undefined, 'hub');
|
104
|
+
if (this.validateDevice(this.mountedOnOffSwitch.deviceName ?? '')) {
|
105
|
+
await this.registerDevice(this.mountedOnOffSwitch);
|
106
|
+
this.bridgedDevices.set(this.mountedOnOffSwitch.deviceName ?? '', this.mountedOnOffSwitch);
|
107
|
+
}
|
108
|
+
else {
|
109
|
+
this.mountedOnOffSwitch = undefined;
|
110
|
+
}
|
111
|
+
this.mountedOnOffSwitch?.addCommandHandler('identify', async ({ request: { identifyTime } }) => {
|
112
|
+
this.mountedOnOffSwitch?.log.info(`Command identify called identifyTime:${identifyTime}`);
|
113
|
+
});
|
114
|
+
this.mountedOnOffSwitch?.addCommandHandler('on', async () => {
|
115
|
+
await this.mountedOnOffSwitch?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.mountedOnOffSwitch.log);
|
116
|
+
this.mountedOnOffSwitch?.log.info('Command on called');
|
117
|
+
});
|
118
|
+
this.mountedOnOffSwitch?.addCommandHandler('off', async () => {
|
119
|
+
await this.mountedOnOffSwitch?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.mountedOnOffSwitch.log);
|
120
|
+
this.mountedOnOffSwitch?.log.info('Command off called');
|
121
|
+
});
|
122
|
+
this.mountedDimmerSwitch = new MatterbridgeEndpoint([dimmableMountedSwitch, bridgedNode, powerSource], { uniqueStorageKey: 'DimmerMountedSwitch' }, this.config.debug)
|
123
|
+
.createDefaultIdentifyClusterServer()
|
124
|
+
.createDefaultGroupsClusterServer()
|
125
|
+
.createDefaultBridgedDeviceBasicInformationClusterServer('Dimmer Mounted Switch', '0x22145578864', 0xfff1, 'Matterbridge', 'Matterbridge Dimmer Mounted Switch', parseInt(this.version.replace(/\D/g, '')), this.version === '' ? 'Unknown' : this.version, parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion)
|
126
|
+
.createDefaultOnOffClusterServer()
|
127
|
+
.createDefaultLevelControlClusterServer()
|
128
|
+
.createDefaultPowerSourceRechargeableBatteryClusterServer(70);
|
129
|
+
this.setSelectDevice(this.mountedDimmerSwitch.serialNumber ?? '', this.mountedDimmerSwitch.deviceName ?? '', undefined, 'hub');
|
130
|
+
if (this.validateDevice(this.mountedDimmerSwitch.deviceName ?? '')) {
|
131
|
+
await this.registerDevice(this.mountedDimmerSwitch);
|
132
|
+
this.bridgedDevices.set(this.mountedDimmerSwitch.deviceName ?? '', this.mountedDimmerSwitch);
|
133
|
+
}
|
134
|
+
else {
|
135
|
+
this.mountedDimmerSwitch = undefined;
|
136
|
+
}
|
137
|
+
this.mountedDimmerSwitch?.addCommandHandler('identify', async ({ request: { identifyTime } }) => {
|
138
|
+
this.mountedDimmerSwitch?.log.info(`Command identify called identifyTime:${identifyTime}`);
|
139
|
+
});
|
140
|
+
this.mountedDimmerSwitch?.addCommandHandler('on', async () => {
|
141
|
+
await this.mountedDimmerSwitch?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.mountedDimmerSwitch.log);
|
142
|
+
this.mountedDimmerSwitch?.log.info('Command on called');
|
143
|
+
});
|
144
|
+
this.mountedDimmerSwitch?.addCommandHandler('off', async () => {
|
145
|
+
await this.mountedDimmerSwitch?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.mountedDimmerSwitch.log);
|
146
|
+
this.mountedDimmerSwitch?.log.info('Command off called');
|
147
|
+
});
|
148
|
+
this.mountedDimmerSwitch?.addCommandHandler('moveToLevel', async ({ request: { level } }) => {
|
149
|
+
await this.mountedDimmerSwitch?.setAttribute(LevelControl.Cluster.id, 'currentLevel', level, this.mountedDimmerSwitch.log);
|
150
|
+
this.mountedDimmerSwitch?.log.debug(`Command moveToLevel called request: ${level}`);
|
151
|
+
});
|
152
|
+
this.mountedDimmerSwitch?.addCommandHandler('moveToLevelWithOnOff', async ({ request: { level } }) => {
|
153
|
+
await this.mountedDimmerSwitch?.setAttribute(LevelControl.Cluster.id, 'currentLevel', level, this.mountedDimmerSwitch.log);
|
154
|
+
this.mountedDimmerSwitch?.log.debug(`Command moveToLevelWithOnOff called request: ${level}`);
|
155
|
+
});
|
95
156
|
this.lightOnOff = new MatterbridgeEndpoint([onOffLight, bridgedNode, powerSource], { uniqueStorageKey: 'Light (on/off)' }, this.config.debug)
|
96
157
|
.createDefaultIdentifyClusterServer()
|
97
158
|
.createDefaultGroupsClusterServer()
|
@@ -123,7 +184,7 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
123
184
|
.createDefaultBridgedDeviceBasicInformationClusterServer('Dimmer', '0x234554564', 0xfff1, 'Matterbridge', 'Matterbridge Dimmer', parseInt(this.version.replace(/\D/g, '')), this.version === '' ? 'Unknown' : this.version, parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion)
|
124
185
|
.createDefaultOnOffClusterServer()
|
125
186
|
.createDefaultLevelControlClusterServer()
|
126
|
-
.createDefaultPowerSourceReplaceableBatteryClusterServer(70);
|
187
|
+
.createDefaultPowerSourceReplaceableBatteryClusterServer(70, PowerSource.BatChargeLevel.Ok, 2990, '2 x AA', 2);
|
127
188
|
this.setSelectDevice(this.dimmer.serialNumber ?? '', this.dimmer.deviceName ?? '', undefined, 'hub');
|
128
189
|
if (this.validateDevice(this.dimmer.deviceName ?? '')) {
|
129
190
|
await this.registerDevice(this.dimmer);
|
@@ -556,7 +617,9 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
556
617
|
.createDefaultFanControlClusterServer()
|
557
618
|
.createDefaultTemperatureMeasurementClusterServer(20 * 100)
|
558
619
|
.createDefaultRelativeHumidityMeasurementClusterServer(50 * 100)
|
559
|
-
.createDefaultPowerSourceWiredClusterServer()
|
620
|
+
.createDefaultPowerSourceWiredClusterServer()
|
621
|
+
.createDefaultActivatedCarbonFilterMonitoringClusterServer()
|
622
|
+
.createDefaultHepaFilterMonitoringClusterServer();
|
560
623
|
this.setSelectDevice(this.airPurifier.serialNumber ?? '', this.airPurifier.deviceName ?? '', undefined, 'hub');
|
561
624
|
if (this.validateDevice(this.airPurifier.deviceName ?? '')) {
|
562
625
|
await this.registerDevice(this.airPurifier);
|
@@ -617,8 +680,6 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
617
680
|
});
|
618
681
|
this.airConditioner?.addCommandHandler('on', async () => {
|
619
682
|
this.airConditioner?.log.info('Command on called');
|
620
|
-
await this.airConditioner?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.airConditioner?.log);
|
621
|
-
await this.airConditioner?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.airConditioner?.log);
|
622
683
|
await this.airConditioner?.setAttribute(ThermostatCluster.id, 'localTemperature', 20 * 100, this.airConditioner?.log);
|
623
684
|
await this.airConditioner?.setAttribute(TemperatureMeasurement.Cluster.id, 'measuredValue', 20 * 100, this.airConditioner?.log);
|
624
685
|
await this.airConditioner?.setAttribute(RelativeHumidityMeasurementCluster.id, 'measuredValue', 50 * 100, this.airConditioner?.log);
|
@@ -627,7 +688,6 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
627
688
|
});
|
628
689
|
this.airConditioner?.addCommandHandler('off', async () => {
|
629
690
|
this.airConditioner?.log.info('Command off called');
|
630
|
-
await this.airConditioner?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.airConditioner?.log);
|
631
691
|
await this.airConditioner?.setAttribute(ThermostatCluster.id, 'localTemperature', null, this.airConditioner?.log);
|
632
692
|
await this.airConditioner?.setAttribute(TemperatureMeasurement.Cluster.id, 'measuredValue', null, this.airConditioner?.log);
|
633
693
|
await this.airConditioner?.setAttribute(RelativeHumidityMeasurementCluster.id, 'measuredValue', null, this.airConditioner?.log);
|
@@ -859,49 +919,75 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
859
919
|
await this.registerDevice(robot);
|
860
920
|
this.bridgedDevices.set(robot.deviceName ?? '', robot);
|
861
921
|
}
|
862
|
-
const
|
863
|
-
this.setSelectDevice(
|
864
|
-
if (this.validateDevice(
|
865
|
-
await this.registerDevice(
|
866
|
-
this.bridgedDevices.set(
|
867
|
-
}
|
868
|
-
const
|
869
|
-
this.setSelectDevice(
|
870
|
-
if (this.validateDevice(
|
871
|
-
await this.registerDevice(
|
872
|
-
this.bridgedDevices.set(
|
873
|
-
}
|
874
|
-
const
|
875
|
-
this.setSelectDevice(
|
876
|
-
if (this.validateDevice(
|
877
|
-
await this.registerDevice(
|
878
|
-
this.bridgedDevices.set(
|
879
|
-
}
|
880
|
-
const
|
881
|
-
this.setSelectDevice(
|
882
|
-
if (this.validateDevice(
|
883
|
-
await this.registerDevice(
|
884
|
-
this.bridgedDevices.set(
|
922
|
+
const laundryWasherDevice = new Appliances(laundryWasher, 'Laundry Washer', '1234567890');
|
923
|
+
this.setSelectDevice(laundryWasherDevice.serialNumber ?? '', laundryWasherDevice.deviceName ?? '', undefined, 'hub');
|
924
|
+
if (this.validateDevice(laundryWasherDevice.deviceName ?? '')) {
|
925
|
+
await this.registerDevice(laundryWasherDevice);
|
926
|
+
this.bridgedDevices.set(laundryWasherDevice.deviceName ?? '', laundryWasherDevice);
|
927
|
+
}
|
928
|
+
const laundryDryerDevice = new Appliances(laundryDryer, 'Laundry Dryer', '1235227890');
|
929
|
+
this.setSelectDevice(laundryDryerDevice.serialNumber ?? '', laundryDryerDevice.deviceName ?? '', undefined, 'hub');
|
930
|
+
if (this.validateDevice(laundryDryerDevice.deviceName ?? '')) {
|
931
|
+
await this.registerDevice(laundryDryerDevice);
|
932
|
+
this.bridgedDevices.set(laundryDryerDevice.deviceName ?? '', laundryDryerDevice);
|
933
|
+
}
|
934
|
+
const dishwasherDevice = new Appliances(dishwasher, 'Dishwasher', '0987654321');
|
935
|
+
this.setSelectDevice(dishwasherDevice.serialNumber ?? '', dishwasherDevice.deviceName ?? '', undefined, 'hub');
|
936
|
+
if (this.validateDevice(dishwasherDevice.deviceName ?? '')) {
|
937
|
+
await this.registerDevice(dishwasherDevice);
|
938
|
+
this.bridgedDevices.set(dishwasherDevice.deviceName ?? '', dishwasherDevice);
|
939
|
+
}
|
940
|
+
const refrigeratorDevice = new Appliances(refrigerator, 'Refrigerator', '9987654322');
|
941
|
+
this.setSelectDevice(refrigeratorDevice.serialNumber ?? '', refrigeratorDevice.deviceName ?? '', undefined, 'hub');
|
942
|
+
if (this.validateDevice(refrigeratorDevice.deviceName ?? '')) {
|
943
|
+
await this.registerDevice(refrigeratorDevice);
|
944
|
+
this.bridgedDevices.set(refrigeratorDevice.deviceName ?? '', refrigeratorDevice);
|
945
|
+
}
|
946
|
+
const ovenDevice = new Appliances(oven, 'Oven', '1298867891');
|
947
|
+
this.setSelectDevice(ovenDevice.serialNumber ?? '', ovenDevice.deviceName ?? '', undefined, 'hub');
|
948
|
+
if (this.validateDevice(ovenDevice.deviceName ?? '')) {
|
949
|
+
await this.registerDevice(ovenDevice);
|
950
|
+
this.bridgedDevices.set(ovenDevice.deviceName ?? '', ovenDevice);
|
951
|
+
}
|
952
|
+
const microwaveOvenDevice = new Appliances(microwaveOven, 'Microwave Oven', '1234567892');
|
953
|
+
this.setSelectDevice(microwaveOvenDevice.serialNumber ?? '', microwaveOvenDevice.deviceName ?? '', undefined, 'hub');
|
954
|
+
if (this.validateDevice(microwaveOvenDevice.deviceName ?? '')) {
|
955
|
+
await this.registerDevice(microwaveOvenDevice);
|
956
|
+
this.bridgedDevices.set(microwaveOvenDevice.deviceName ?? '', microwaveOvenDevice);
|
957
|
+
}
|
958
|
+
const extractorHoodDevice = new Appliances(extractorHood, 'Extractor Hood', '1234567893');
|
959
|
+
this.setSelectDevice(extractorHoodDevice.serialNumber ?? '', extractorHoodDevice.deviceName ?? '', undefined, 'hub');
|
960
|
+
if (this.validateDevice(extractorHoodDevice.deviceName ?? '')) {
|
961
|
+
await this.registerDevice(extractorHoodDevice);
|
962
|
+
this.bridgedDevices.set(extractorHoodDevice.deviceName ?? '', extractorHoodDevice);
|
963
|
+
}
|
964
|
+
const cooktopDevice = new Appliances(cooktop, 'Cooktop', '1255887894');
|
965
|
+
this.setSelectDevice(cooktopDevice.serialNumber ?? '', cooktopDevice.deviceName ?? '', undefined, 'hub');
|
966
|
+
if (this.validateDevice(cooktopDevice.deviceName ?? '')) {
|
967
|
+
await this.registerDevice(cooktopDevice);
|
968
|
+
this.bridgedDevices.set(cooktopDevice.deviceName ?? '', cooktopDevice);
|
885
969
|
}
|
886
970
|
}
|
887
971
|
async onConfigure() {
|
888
972
|
await super.onConfigure();
|
889
973
|
this.log.info('onConfigure called');
|
890
|
-
await this.switch?.setAttribute(OnOff.Cluster.id, 'onOff',
|
891
|
-
this.
|
974
|
+
await this.switch?.setAttribute(OnOff.Cluster.id, 'onOff', this.intervalOnOff, this.switch.log);
|
975
|
+
await this.mountedOnOffSwitch?.setAttribute(OnOff.Cluster.id, 'onOff', this.intervalOnOff, this.mountedOnOffSwitch.log);
|
976
|
+
this.switch?.log.info(`Set switch initial onOff to ${this.intervalOnOff}`);
|
892
977
|
if (this.config.useInterval) {
|
893
978
|
this.switchInterval = setInterval(async () => {
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
}
|
979
|
+
await this.switch?.setAttribute(OnOff.Cluster.id, 'onOff', this.intervalOnOff, this.switch.log);
|
980
|
+
await this.mountedOnOffSwitch?.setAttribute(OnOff.Cluster.id, 'onOff', this.intervalOnOff, this.mountedOnOffSwitch.log);
|
981
|
+
this.log.info(`Set switches onOff to ${this.intervalOnOff}`);
|
982
|
+
this.intervalOnOff = !this.intervalOnOff;
|
899
983
|
}, 60 * 1000 + 100);
|
900
984
|
}
|
901
985
|
await this.lightOnOff?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.lightOnOff.log);
|
902
986
|
this.lightOnOff?.log.info('Set light initial onOff to false.');
|
903
987
|
await this.dimmer?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.dimmer.log);
|
904
988
|
await this.dimmer?.setAttribute(LevelControl.Cluster.id, 'currentLevel', 1, this.dimmer.log);
|
989
|
+
await this.mountedDimmerSwitch?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.mountedDimmerSwitch.log);
|
990
|
+
await this.mountedDimmerSwitch?.setAttribute(LevelControl.Cluster.id, 'currentLevel', 1, this.mountedDimmerSwitch.log);
|
905
991
|
this.dimmer?.log.info(`Set dimmer initial onOff to false, currentLevel to 1.`);
|
906
992
|
await this.light?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.light.log);
|
907
993
|
await this.light?.setAttribute(LevelControl.Cluster.id, 'currentLevel', 200, this.light.log);
|
@@ -928,41 +1014,34 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
928
1014
|
this.lightCT?.log.info('Set light CT initial onOff to true, currentLevel to 128, colorTemperatureMireds to 250.');
|
929
1015
|
if (this.config.useInterval) {
|
930
1016
|
this.lightInterval = setInterval(async () => {
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
await this.dimmer?.setAttribute(LevelControl.Cluster.id, 'currentLevel', level, this.dimmer.log);
|
960
|
-
await this.light?.setAttribute(LevelControl.Cluster.id, 'currentLevel', level, this.light.log);
|
961
|
-
await this.lightXY?.setAttribute(LevelControl.Cluster.id, 'currentLevel', level, this.lightXY.log);
|
962
|
-
await this.lightHS?.setAttribute(LevelControl.Cluster.id, 'currentLevel', level, this.lightHS.log);
|
963
|
-
await this.lightCT?.setAttribute(LevelControl.Cluster.id, 'currentLevel', level, this.lightCT.log);
|
964
|
-
this.log.info(`Set lights currentLevel to ${level}`);
|
965
|
-
}
|
1017
|
+
this.intervalLevel += 10;
|
1018
|
+
if (this.intervalLevel >= 250) {
|
1019
|
+
this.intervalLevel = 0;
|
1020
|
+
await this.lightOnOff?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.lightOnOff.log);
|
1021
|
+
await this.dimmer?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.dimmer.log);
|
1022
|
+
await this.mountedDimmerSwitch?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.mountedDimmerSwitch.log);
|
1023
|
+
await this.light?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.light.log);
|
1024
|
+
await this.lightXY?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.lightXY.log);
|
1025
|
+
await this.lightHS?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.lightHS.log);
|
1026
|
+
await this.lightCT?.setAttribute(OnOff.Cluster.id, 'onOff', false, this.lightCT.log);
|
1027
|
+
this.log.info('Set lights onOff to false');
|
1028
|
+
}
|
1029
|
+
else {
|
1030
|
+
await this.lightOnOff?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.lightOnOff?.log);
|
1031
|
+
await this.dimmer?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.dimmer.log);
|
1032
|
+
await this.mountedDimmerSwitch?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.mountedDimmerSwitch.log);
|
1033
|
+
await this.light?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.light.log);
|
1034
|
+
await this.lightXY?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.lightXY.log);
|
1035
|
+
await this.lightHS?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.lightHS.log);
|
1036
|
+
await this.lightCT?.setAttribute(OnOff.Cluster.id, 'onOff', true, this.lightCT.log);
|
1037
|
+
this.log.info('Set lights onOff to true');
|
1038
|
+
await this.dimmer?.setAttribute(LevelControl.Cluster.id, 'currentLevel', this.intervalLevel, this.dimmer.log);
|
1039
|
+
await this.mountedDimmerSwitch?.setAttribute(LevelControl.Cluster.id, 'currentLevel', this.intervalLevel, this.mountedDimmerSwitch.log);
|
1040
|
+
await this.light?.setAttribute(LevelControl.Cluster.id, 'currentLevel', this.intervalLevel, this.light.log);
|
1041
|
+
await this.lightXY?.setAttribute(LevelControl.Cluster.id, 'currentLevel', this.intervalLevel, this.lightXY.log);
|
1042
|
+
await this.lightHS?.setAttribute(LevelControl.Cluster.id, 'currentLevel', this.intervalLevel, this.lightHS.log);
|
1043
|
+
await this.lightCT?.setAttribute(LevelControl.Cluster.id, 'currentLevel', this.intervalLevel, this.lightCT.log);
|
1044
|
+
this.log.info(`Set lights currentLevel to ${this.intervalLevel}`);
|
966
1045
|
}
|
967
1046
|
}, 60 * 1000 + 200);
|
968
1047
|
}
|
@@ -1186,6 +1265,6 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
1186
1265
|
await super.onShutdown(reason);
|
1187
1266
|
this.log.info('onShutdown called with reason:', reason ?? 'none');
|
1188
1267
|
if (this.config.unregisterOnShutdown === true)
|
1189
|
-
await this.unregisterAllDevices(
|
1268
|
+
await this.unregisterAllDevices(500);
|
1190
1269
|
}
|
1191
1270
|
}
|
package/npm-shrinkwrap.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
3
|
-
"version": "1.2.0-edge.
|
3
|
+
"version": "1.2.0-edge.7",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "matterbridge-example-dynamic-platform",
|
9
|
-
"version": "1.2.0-edge.
|
9
|
+
"version": "1.2.0-edge.7",
|
10
10
|
"license": "MIT",
|
11
11
|
"dependencies": {
|
12
12
|
"node-ansi-logger": "3.0.1",
|