matterbridge 3.0.0-edge.1 → 3.0.0-edge.11
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 +54 -3
- package/README-DEV.md +4 -0
- package/README-DOCKER.md +9 -0
- package/dist/cli.js +4 -1
- package/dist/frontend.js +3 -3
- package/dist/matterbridge.js +50 -19
- package/dist/matterbridgeBehaviors.js +31 -31
- package/dist/matterbridgeDeviceTypes.js +121 -20
- package/dist/matterbridgeEndpoint.js +56 -48
- package/dist/matterbridgePlatform.js +2 -2
- package/dist/pluginManager.js +8 -2
- package/frontend/build/asset-manifest.json +3 -3
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/js/{main.1fa50342.js → main.eb438c68.js} +3 -3
- package/frontend/build/static/js/{main.1fa50342.js.map → main.eb438c68.js.map} +1 -1
- package/npm-shrinkwrap.json +296 -365
- package/package.json +3 -4
- package/tsconfig.jest.json +8 -0
- /package/frontend/build/static/js/{main.1fa50342.js.LICENSE.txt → main.eb438c68.js.LICENSE.txt} +0 -0
|
@@ -44,41 +44,48 @@ import { EnergyPreference } from '@matter/main/clusters/energy-preference';
|
|
|
44
44
|
import { RvcRunMode } from '@matter/main/clusters/rvc-run-mode';
|
|
45
45
|
import { RvcOperationalState } from '@matter/main/clusters/rvc-operational-state';
|
|
46
46
|
import { RvcCleanMode } from '@matter/main/clusters/rvc-clean-mode';
|
|
47
|
-
import { ScenesManagement } from '@matter/main/clusters/scenes-management';
|
|
48
47
|
import { HepaFilterMonitoring } from '@matter/main/clusters/hepa-filter-monitoring';
|
|
49
48
|
import { ActivatedCarbonFilterMonitoring } from '@matter/main/clusters/activated-carbon-filter-monitoring';
|
|
50
49
|
import { DeviceEnergyManagementMode } from '@matter/main/clusters/device-energy-management-mode';
|
|
51
50
|
import { AdministratorCommissioning } from '@matter/main/clusters/administrator-commissioning';
|
|
52
51
|
import { EcosystemInformation } from '@matter/main/clusters/ecosystem-information';
|
|
53
|
-
import { AccessControl } from '@matter/main/clusters/access-control';
|
|
54
52
|
import { CommissionerControl } from '@matter/main/clusters/commissioner-control';
|
|
55
|
-
import {
|
|
53
|
+
import { DishwasherAlarm } from '@matter/main/clusters/dishwasher-alarm';
|
|
54
|
+
import { DishwasherMode } from '@matter/main/clusters/dishwasher-mode';
|
|
55
|
+
import { LaundryDryerControls } from '@matter/main/clusters/laundry-dryer-controls';
|
|
56
|
+
import { LaundryWasherControls } from '@matter/main/clusters/laundry-washer-controls';
|
|
57
|
+
import { LaundryWasherMode } from '@matter/main/clusters/laundry-washer-mode';
|
|
58
|
+
import { MicrowaveOvenControl } from '@matter/main/clusters/microwave-oven-control';
|
|
59
|
+
import { MicrowaveOvenMode } from '@matter/main/clusters/microwave-oven-mode';
|
|
60
|
+
import { OperationalState } from '@matter/main/clusters/operational-state';
|
|
61
|
+
import { OvenCavityOperationalState } from '@matter/main/clusters/oven-cavity-operational-state';
|
|
62
|
+
import { OvenMode } from '@matter/main/clusters/oven-mode';
|
|
63
|
+
import { RefrigeratorAlarm } from '@matter/main/clusters/refrigerator-alarm';
|
|
64
|
+
import { RefrigeratorAndTemperatureControlledCabinetMode } from '@matter/main/clusters/refrigerator-and-temperature-controlled-cabinet-mode';
|
|
65
|
+
import { ServiceArea } from '@matter/main/clusters/service-area';
|
|
66
|
+
import { TemperatureControl } from '@matter/main/clusters/temperature-control';
|
|
56
67
|
export var DeviceClasses;
|
|
57
68
|
(function (DeviceClasses) {
|
|
58
69
|
DeviceClasses["Node"] = "Node";
|
|
59
|
-
DeviceClasses["Utility"] = "Utility";
|
|
60
70
|
DeviceClasses["App"] = "App";
|
|
71
|
+
DeviceClasses["Utility"] = "Utility";
|
|
61
72
|
DeviceClasses["Simple"] = "Simple";
|
|
62
73
|
DeviceClasses["Dynamic"] = "Dynamic";
|
|
63
74
|
DeviceClasses["Client"] = "Client";
|
|
64
75
|
DeviceClasses["Server"] = "Server";
|
|
65
76
|
DeviceClasses["Composed"] = "Composed";
|
|
66
|
-
DeviceClasses["
|
|
67
|
-
DeviceClasses["EZInitiator"] = "EZ-Initiator";
|
|
68
|
-
DeviceClasses["EZTarget"] = "EZ-Target";
|
|
77
|
+
DeviceClasses["Duplicate"] = "Duplicate";
|
|
69
78
|
DeviceClasses["BridgedPowerSourceInfo"] = "BridgedPowerSourceInfo";
|
|
70
79
|
})(DeviceClasses || (DeviceClasses = {}));
|
|
71
|
-
export const DeviceTypeDefinition = ({ name, code, deviceClass,
|
|
80
|
+
export const DeviceTypeDefinition = ({ name, code, deviceClass, revision, requiredServerClusters = [], optionalServerClusters = [], requiredClientClusters = [], optionalClientClusters = [], }) => ({
|
|
72
81
|
name,
|
|
73
82
|
code: DeviceTypeId(code),
|
|
74
83
|
deviceClass,
|
|
75
|
-
superSet,
|
|
76
84
|
revision,
|
|
77
85
|
requiredServerClusters,
|
|
78
86
|
optionalServerClusters,
|
|
79
87
|
requiredClientClusters,
|
|
80
88
|
optionalClientClusters,
|
|
81
|
-
unknown,
|
|
82
89
|
});
|
|
83
90
|
export const powerSource = DeviceTypeDefinition({
|
|
84
91
|
name: 'MA-powerSource',
|
|
@@ -161,7 +168,7 @@ export const dimmableOutlet = DeviceTypeDefinition({
|
|
|
161
168
|
optionalServerClusters: [],
|
|
162
169
|
});
|
|
163
170
|
export const onOffMountedSwitch = DeviceTypeDefinition({
|
|
164
|
-
name: 'MA-
|
|
171
|
+
name: 'MA-onoffmountedswitch',
|
|
165
172
|
code: 0x010f,
|
|
166
173
|
deviceClass: DeviceClasses.Simple,
|
|
167
174
|
revision: 1,
|
|
@@ -169,7 +176,7 @@ export const onOffMountedSwitch = DeviceTypeDefinition({
|
|
|
169
176
|
optionalServerClusters: [LevelControl.Cluster.id],
|
|
170
177
|
});
|
|
171
178
|
export const dimmableMountedSwitch = DeviceTypeDefinition({
|
|
172
|
-
name: 'MA-
|
|
179
|
+
name: 'MA-dimmablemountedswitch',
|
|
173
180
|
code: 0x0110,
|
|
174
181
|
deviceClass: DeviceClasses.Simple,
|
|
175
182
|
revision: 1,
|
|
@@ -182,7 +189,7 @@ export const pumpDevice = DeviceTypeDefinition({
|
|
|
182
189
|
deviceClass: DeviceClasses.Simple,
|
|
183
190
|
revision: 3,
|
|
184
191
|
requiredServerClusters: [OnOff.Cluster.id, PumpConfigurationAndControl.Cluster.id, Identify.Cluster.id],
|
|
185
|
-
optionalServerClusters: [LevelControl.Cluster.id, Groups.Cluster.id,
|
|
192
|
+
optionalServerClusters: [LevelControl.Cluster.id, Groups.Cluster.id, TemperatureMeasurement.Cluster.id, PressureMeasurement.Cluster.id, FlowMeasurement.Cluster.id],
|
|
186
193
|
});
|
|
187
194
|
export const waterValve = DeviceTypeDefinition({
|
|
188
195
|
name: 'MA-waterValve',
|
|
@@ -198,7 +205,7 @@ export const onOffSwitch = DeviceTypeDefinition({
|
|
|
198
205
|
deviceClass: DeviceClasses.Simple,
|
|
199
206
|
revision: 3,
|
|
200
207
|
requiredServerClusters: [Identify.Cluster.id, OnOff.Cluster.id],
|
|
201
|
-
optionalServerClusters: [Groups.Cluster.id
|
|
208
|
+
optionalServerClusters: [Groups.Cluster.id],
|
|
202
209
|
});
|
|
203
210
|
export const dimmableSwitch = DeviceTypeDefinition({
|
|
204
211
|
name: 'MA-dimmableswitch',
|
|
@@ -206,7 +213,7 @@ export const dimmableSwitch = DeviceTypeDefinition({
|
|
|
206
213
|
deviceClass: DeviceClasses.Simple,
|
|
207
214
|
revision: 3,
|
|
208
215
|
requiredServerClusters: [Identify.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
|
|
209
|
-
optionalServerClusters: [Groups.Cluster.id
|
|
216
|
+
optionalServerClusters: [Groups.Cluster.id],
|
|
210
217
|
});
|
|
211
218
|
export const colorTemperatureSwitch = DeviceTypeDefinition({
|
|
212
219
|
name: 'MA-colortemperatureswitch',
|
|
@@ -214,7 +221,7 @@ export const colorTemperatureSwitch = DeviceTypeDefinition({
|
|
|
214
221
|
deviceClass: DeviceClasses.Simple,
|
|
215
222
|
revision: 3,
|
|
216
223
|
requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
|
|
217
|
-
optionalServerClusters: [Groups.Cluster.id
|
|
224
|
+
optionalServerClusters: [Groups.Cluster.id],
|
|
218
225
|
});
|
|
219
226
|
export const genericSwitch = DeviceTypeDefinition({
|
|
220
227
|
name: 'MA-genericswitch',
|
|
@@ -333,7 +340,7 @@ export const doorLockDevice = DeviceTypeDefinition({
|
|
|
333
340
|
code: 0xa,
|
|
334
341
|
deviceClass: DeviceClasses.Simple,
|
|
335
342
|
revision: 3,
|
|
336
|
-
requiredServerClusters: [Identify.Cluster.id, DoorLock.Cluster.id
|
|
343
|
+
requiredServerClusters: [Identify.Cluster.id, DoorLock.Cluster.id],
|
|
337
344
|
optionalServerClusters: [],
|
|
338
345
|
});
|
|
339
346
|
export const coverDevice = DeviceTypeDefinition({
|
|
@@ -375,7 +382,7 @@ export const modeSelect = DeviceTypeDefinition({
|
|
|
375
382
|
revision: 1,
|
|
376
383
|
requiredServerClusters: [ModeSelect.Cluster.id],
|
|
377
384
|
});
|
|
378
|
-
export const
|
|
385
|
+
export const aggregator = DeviceTypeDefinition({
|
|
379
386
|
name: 'MA-aggregator',
|
|
380
387
|
code: 0x000e,
|
|
381
388
|
deviceClass: DeviceClasses.Dynamic,
|
|
@@ -383,7 +390,7 @@ export const bridge = DeviceTypeDefinition({
|
|
|
383
390
|
requiredServerClusters: [],
|
|
384
391
|
optionalServerClusters: [Actions.Cluster.id, Identify.Cluster.id, CommissionerControl.Cluster.id],
|
|
385
392
|
});
|
|
386
|
-
export const
|
|
393
|
+
export const bridge = aggregator;
|
|
387
394
|
export const roboticVacuumCleaner = DeviceTypeDefinition({
|
|
388
395
|
name: 'MA-roboticvacuumcleaner',
|
|
389
396
|
code: 0x74,
|
|
@@ -392,11 +399,105 @@ export const roboticVacuumCleaner = DeviceTypeDefinition({
|
|
|
392
399
|
requiredServerClusters: [Identify.Cluster.id, RvcRunMode.Cluster.id, RvcOperationalState.Cluster.id],
|
|
393
400
|
optionalServerClusters: [RvcCleanMode.Cluster.id, ServiceArea.Cluster.id],
|
|
394
401
|
});
|
|
402
|
+
export const laundryWasher = DeviceTypeDefinition({
|
|
403
|
+
name: 'MA-laundrywasher',
|
|
404
|
+
code: 0x73,
|
|
405
|
+
deviceClass: DeviceClasses.Simple,
|
|
406
|
+
revision: 1,
|
|
407
|
+
requiredServerClusters: [OperationalState.Cluster.id],
|
|
408
|
+
optionalServerClusters: [Identify.Cluster.id, LaundryWasherMode.Cluster.id, OnOff.Cluster.id, LaundryWasherControls.Cluster.id, TemperatureControl.Cluster.id],
|
|
409
|
+
});
|
|
410
|
+
export const refrigerator = DeviceTypeDefinition({
|
|
411
|
+
name: 'MA-refrigerator',
|
|
412
|
+
code: 0x70,
|
|
413
|
+
deviceClass: DeviceClasses.Simple,
|
|
414
|
+
revision: 2,
|
|
415
|
+
requiredServerClusters: [Identify.Cluster.id, RefrigeratorAndTemperatureControlledCabinetMode.Cluster.id, RefrigeratorAlarm.Cluster.id],
|
|
416
|
+
optionalServerClusters: [],
|
|
417
|
+
});
|
|
395
418
|
export const airConditioner = DeviceTypeDefinition({
|
|
396
419
|
name: 'MA-airConditioner',
|
|
397
420
|
code: 0x72,
|
|
398
421
|
deviceClass: DeviceClasses.Simple,
|
|
399
422
|
revision: 2,
|
|
400
423
|
requiredServerClusters: [Identify.Cluster.id, OnOff.Cluster.id, Thermostat.Cluster.id],
|
|
401
|
-
optionalServerClusters: [
|
|
424
|
+
optionalServerClusters: [
|
|
425
|
+
Groups.Cluster.id,
|
|
426
|
+
FanControl.Cluster.id,
|
|
427
|
+
ThermostatUserInterfaceConfiguration.Cluster.id,
|
|
428
|
+
TemperatureMeasurement.Cluster.id,
|
|
429
|
+
RelativeHumidityMeasurement.Cluster.id,
|
|
430
|
+
],
|
|
431
|
+
});
|
|
432
|
+
export const temperatureControlledCabinetCooler = DeviceTypeDefinition({
|
|
433
|
+
name: 'MA-temperaturecontrolledcabinetcooler',
|
|
434
|
+
code: 0x71,
|
|
435
|
+
deviceClass: DeviceClasses.Simple,
|
|
436
|
+
revision: 3,
|
|
437
|
+
requiredServerClusters: [TemperatureControl.Cluster.id, RefrigeratorAndTemperatureControlledCabinetMode.Cluster.id],
|
|
438
|
+
optionalServerClusters: [TemperatureMeasurement.Cluster.id],
|
|
439
|
+
});
|
|
440
|
+
export const temperatureControlledCabinetHeater = DeviceTypeDefinition({
|
|
441
|
+
name: 'MA-temperaturecontrolledcabinetheater',
|
|
442
|
+
code: 0x71,
|
|
443
|
+
deviceClass: DeviceClasses.Simple,
|
|
444
|
+
revision: 3,
|
|
445
|
+
requiredServerClusters: [TemperatureControl.Cluster.id, OvenMode.Cluster.id, OvenCavityOperationalState.Cluster.id],
|
|
446
|
+
optionalServerClusters: [TemperatureMeasurement.Cluster.id],
|
|
447
|
+
});
|
|
448
|
+
export const dishwasher = DeviceTypeDefinition({
|
|
449
|
+
name: 'MA-dishwasher',
|
|
450
|
+
code: 0x75,
|
|
451
|
+
deviceClass: DeviceClasses.Simple,
|
|
452
|
+
revision: 1,
|
|
453
|
+
requiredServerClusters: [OperationalState.Cluster.id],
|
|
454
|
+
optionalServerClusters: [Identify.Cluster.id, OnOff.Cluster.id, TemperatureControl.Cluster.id, DishwasherMode.Cluster.id, DishwasherAlarm.Cluster.id],
|
|
455
|
+
});
|
|
456
|
+
export const laundryDryer = DeviceTypeDefinition({
|
|
457
|
+
name: 'MA-laundrydryer',
|
|
458
|
+
code: 0x7c,
|
|
459
|
+
deviceClass: DeviceClasses.Simple,
|
|
460
|
+
revision: 1,
|
|
461
|
+
requiredServerClusters: [OperationalState.Cluster.id],
|
|
462
|
+
optionalServerClusters: [Identify.Cluster.id, LaundryWasherMode.Cluster.id, OnOff.Cluster.id, LaundryDryerControls.Cluster.id, TemperatureControl.Cluster.id],
|
|
463
|
+
});
|
|
464
|
+
export const cookSurface = DeviceTypeDefinition({
|
|
465
|
+
name: 'MA-cooksurface',
|
|
466
|
+
code: 0x77,
|
|
467
|
+
deviceClass: DeviceClasses.Simple,
|
|
468
|
+
revision: 1,
|
|
469
|
+
requiredServerClusters: [TemperatureControl.Cluster.id, TemperatureMeasurement.Cluster.id],
|
|
470
|
+
optionalServerClusters: [OnOff.Cluster.id],
|
|
471
|
+
});
|
|
472
|
+
export const cooktop = DeviceTypeDefinition({
|
|
473
|
+
name: 'MA-cooktop',
|
|
474
|
+
code: 0x78,
|
|
475
|
+
deviceClass: DeviceClasses.Simple,
|
|
476
|
+
revision: 1,
|
|
477
|
+
requiredServerClusters: [OnOff.Cluster.id],
|
|
478
|
+
optionalServerClusters: [Identify.Cluster.id],
|
|
479
|
+
});
|
|
480
|
+
export const oven = DeviceTypeDefinition({
|
|
481
|
+
name: 'MA-oven',
|
|
482
|
+
code: 0x7b,
|
|
483
|
+
deviceClass: DeviceClasses.Simple,
|
|
484
|
+
revision: 2,
|
|
485
|
+
requiredServerClusters: [Identify.Cluster.id],
|
|
486
|
+
optionalServerClusters: [],
|
|
487
|
+
});
|
|
488
|
+
export const extractorHood = DeviceTypeDefinition({
|
|
489
|
+
name: 'MA-extractorhood',
|
|
490
|
+
code: 0x7a,
|
|
491
|
+
deviceClass: DeviceClasses.Simple,
|
|
492
|
+
revision: 1,
|
|
493
|
+
requiredServerClusters: [FanControl.Cluster.id],
|
|
494
|
+
optionalServerClusters: [Identify.Cluster.id, HepaFilterMonitoring.Cluster.id, ActivatedCarbonFilterMonitoring.Cluster.id],
|
|
495
|
+
});
|
|
496
|
+
export const microwaveOven = DeviceTypeDefinition({
|
|
497
|
+
name: 'MA-microwaveoven',
|
|
498
|
+
code: 0x79,
|
|
499
|
+
deviceClass: DeviceClasses.Simple,
|
|
500
|
+
revision: 1,
|
|
501
|
+
requiredServerClusters: [OperationalState.Cluster.id, MicrowaveOvenMode.Cluster.id, MicrowaveOvenControl.Cluster.id],
|
|
502
|
+
optionalServerClusters: [Identify.Cluster.id, FanControl.Cluster.id],
|
|
402
503
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AnsiLogger, BLUE, CYAN, YELLOW, db, debugStringify, er, hk, or, zb } from './logger/export.js';
|
|
2
2
|
import { bridgedNode } from './matterbridgeDeviceTypes.js';
|
|
3
3
|
import { isValidNumber, isValidObject } from './utils/export.js';
|
|
4
|
-
import {
|
|
4
|
+
import { MatterbridgeServer, MatterbridgeServerDevice, MatterbridgeIdentifyServer, MatterbridgeOnOffServer, MatterbridgeLevelControlServer, MatterbridgeColorControlServer, MatterbridgeWindowCoveringServer, MatterbridgeThermostatServer, MatterbridgeFanControlServer, MatterbridgeDoorLockServer, MatterbridgeModeSelectServer, MatterbridgeValveConfigurationAndControlServer, MatterbridgeSmokeCoAlarmServer, MatterbridgeBooleanStateConfigurationServer, MatterbridgeSwitchServer, } from './matterbridgeBehaviors.js';
|
|
5
5
|
import { addClusterServers, addFixedLabel, addOptionalClusterServers, addRequiredClusterServers, addUserLabel, capitalizeFirstLetter, createUniqueId, getBehavior, getBehaviourTypesFromClusterClientIds, getBehaviourTypesFromClusterServerIds, getDefaultFlowMeasurementClusterServer, getDefaultIlluminanceMeasurementClusterServer, getDefaultPressureMeasurementClusterServer, getDefaultRelativeHumidityMeasurementClusterServer, getDefaultTemperatureMeasurementClusterServer, getDefaultOccupancySensingClusterServer, lowercaseFirstLetter, updateAttribute, getClusterId, getAttributeId, setAttribute, getAttribute, checkNotLatinCharacters, generateUniqueId, subscribeAttribute, } from './matterbridgeEndpointHelpers.js';
|
|
6
6
|
import { Endpoint, Lifecycle, MutableEndpoint, NamedHandler, SupportedBehaviors, VendorId } from '@matter/main';
|
|
7
|
-
import {
|
|
7
|
+
import { getClusterNameById, MeasurementType } from '@matter/main/types';
|
|
8
8
|
import { Descriptor } from '@matter/main/clusters/descriptor';
|
|
9
9
|
import { PowerSource } from '@matter/main/clusters/power-source';
|
|
10
10
|
import { BridgedDeviceBasicInformation } from '@matter/main/clusters/bridged-device-basic-information';
|
|
@@ -26,8 +26,6 @@ import { ElectricalPowerMeasurement } from '@matter/main/clusters/electrical-pow
|
|
|
26
26
|
import { ElectricalEnergyMeasurement } from '@matter/main/clusters/electrical-energy-measurement';
|
|
27
27
|
import { AirQuality } from '@matter/main/clusters/air-quality';
|
|
28
28
|
import { ConcentrationMeasurement } from '@matter/main/clusters/concentration-measurement';
|
|
29
|
-
import { RvcRunMode } from '@matter/main/clusters/rvc-run-mode';
|
|
30
|
-
import { RvcOperationalState } from '@matter/main/clusters/rvc-operational-state';
|
|
31
29
|
import { OccupancySensing } from '@matter/main/clusters/occupancy-sensing';
|
|
32
30
|
import { DescriptorServer } from '@matter/main/behaviors/descriptor';
|
|
33
31
|
import { PowerSourceServer } from '@matter/main/behaviors/power-source';
|
|
@@ -57,9 +55,10 @@ import { Pm25ConcentrationMeasurementServer } from '@matter/main/behaviors/pm25-
|
|
|
57
55
|
import { Pm10ConcentrationMeasurementServer } from '@matter/main/behaviors/pm10-concentration-measurement';
|
|
58
56
|
import { RadonConcentrationMeasurementServer } from '@matter/main/behaviors/radon-concentration-measurement';
|
|
59
57
|
import { TotalVolatileOrganicCompoundsConcentrationMeasurementServer } from '@matter/main/behaviors/total-volatile-organic-compounds-concentration-measurement';
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
58
|
+
import { FanControlServer } from '@matter/main/behaviors/fan-control';
|
|
59
|
+
import { ResourceMonitoring } from '@matter/main/clusters/resource-monitoring';
|
|
60
|
+
import { HepaFilterMonitoringServer } from '@matter/main/behaviors/hepa-filter-monitoring';
|
|
61
|
+
import { ActivatedCarbonFilterMonitoringServer } from '@matter/main/behaviors/activated-carbon-filter-monitoring';
|
|
63
62
|
export class MatterbridgeEndpoint extends Endpoint {
|
|
64
63
|
static bridgeMode = '';
|
|
65
64
|
static logLevel = "info";
|
|
@@ -139,7 +138,7 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
139
138
|
this.log = new AnsiLogger({ logName: options.uniqueStorageKey ?? 'MatterbridgeEndpoint', logTimestampFormat: 4, logLevel: debug === true ? "debug" : MatterbridgeEndpoint.logLevel });
|
|
140
139
|
this.log.debug(`${YELLOW}new${db} MatterbridgeEndpoint: ${zb}${'0x' + firstDefinition.code.toString(16).padStart(4, '0')}${db}-${zb}${firstDefinition.name}${db} ` +
|
|
141
140
|
`id: ${CYAN}${options.uniqueStorageKey}${db} number: ${CYAN}${options.endpointId}${db} taglist: ${CYAN}${options.tagList ? debugStringify(options.tagList) : 'undefined'}${db}`);
|
|
142
|
-
this.behaviors.require(
|
|
141
|
+
this.behaviors.require(MatterbridgeServer, { deviceCommand: new MatterbridgeServerDevice(this.log, this.commandHandler, undefined) });
|
|
143
142
|
}
|
|
144
143
|
static async loadInstance(definition, options = {}, debug = false) {
|
|
145
144
|
return new MatterbridgeEndpoint(definition, options, debug);
|
|
@@ -524,7 +523,7 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
524
523
|
return this;
|
|
525
524
|
}
|
|
526
525
|
createOnOffClusterServer(onOff = false) {
|
|
527
|
-
this.behaviors.require(MatterbridgeOnOffServer
|
|
526
|
+
this.behaviors.require(MatterbridgeOnOffServer, {
|
|
528
527
|
onOff,
|
|
529
528
|
});
|
|
530
529
|
return this;
|
|
@@ -535,6 +534,12 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
535
534
|
});
|
|
536
535
|
return this;
|
|
537
536
|
}
|
|
537
|
+
createOffOnlyOnOffClusterServer(onOff = false) {
|
|
538
|
+
this.behaviors.require(MatterbridgeOnOffServer.with(OnOff.Feature.OffOnly), {
|
|
539
|
+
onOff,
|
|
540
|
+
});
|
|
541
|
+
return this;
|
|
542
|
+
}
|
|
538
543
|
createDefaultLevelControlClusterServer(currentLevel = 254, minLevel = 1, maxLevel = 254, onLevel = null, startUpCurrentLevel = null) {
|
|
539
544
|
this.behaviors.require(MatterbridgeLevelControlServer.with(LevelControl.Feature.OnOff, LevelControl.Feature.Lighting), {
|
|
540
545
|
currentLevel,
|
|
@@ -550,6 +555,17 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
550
555
|
});
|
|
551
556
|
return this;
|
|
552
557
|
}
|
|
558
|
+
createLevelControlClusterServer(currentLevel = 254, onLevel = null) {
|
|
559
|
+
this.behaviors.require(MatterbridgeLevelControlServer, {
|
|
560
|
+
currentLevel,
|
|
561
|
+
onLevel,
|
|
562
|
+
options: {
|
|
563
|
+
executeIfOff: false,
|
|
564
|
+
coupleColorTempToLevel: false,
|
|
565
|
+
},
|
|
566
|
+
});
|
|
567
|
+
return this;
|
|
568
|
+
}
|
|
553
569
|
createDefaultColorControlClusterServer(currentX = 0, currentY = 0, currentHue = 0, currentSaturation = 0, colorTemperatureMireds = 500, colorTempPhysicalMinMireds = 147, colorTempPhysicalMaxMireds = 500) {
|
|
554
570
|
this.behaviors.require(MatterbridgeColorControlServer.with(ColorControl.Feature.Xy, ColorControl.Feature.HueSaturation, ColorControl.Feature.ColorTemperature), {
|
|
555
571
|
colorMode: ColorControl.ColorMode.CurrentHueAndCurrentSaturation,
|
|
@@ -756,6 +772,37 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
756
772
|
});
|
|
757
773
|
return this;
|
|
758
774
|
}
|
|
775
|
+
createBaseFanControlClusterServer(fanMode = FanControl.FanMode.Off) {
|
|
776
|
+
this.behaviors.require(FanControlServer, {
|
|
777
|
+
fanMode,
|
|
778
|
+
fanModeSequence: FanControl.FanModeSequence.OffLowMedHigh,
|
|
779
|
+
percentSetting: 0,
|
|
780
|
+
percentCurrent: 0,
|
|
781
|
+
});
|
|
782
|
+
return this;
|
|
783
|
+
}
|
|
784
|
+
createDefaultHepaFilterMonitoringClusterServer(changeIndication = ResourceMonitoring.ChangeIndication.Ok, inPlaceIndicator = undefined, lastChangedTime = undefined) {
|
|
785
|
+
this.behaviors.require(HepaFilterMonitoringServer.with(ResourceMonitoring.Feature.Condition, ResourceMonitoring.Feature.ReplacementProductList), {
|
|
786
|
+
condition: 100,
|
|
787
|
+
degradationDirection: ResourceMonitoring.DegradationDirection.Down,
|
|
788
|
+
changeIndication,
|
|
789
|
+
inPlaceIndicator,
|
|
790
|
+
lastChangedTime,
|
|
791
|
+
replacementProductList: [],
|
|
792
|
+
});
|
|
793
|
+
return this;
|
|
794
|
+
}
|
|
795
|
+
createDefaultActivatedCarbonFilterMonitoringClusterServer(changeIndication = ResourceMonitoring.ChangeIndication.Ok, inPlaceIndicator = undefined, lastChangedTime = undefined) {
|
|
796
|
+
this.behaviors.require(ActivatedCarbonFilterMonitoringServer.with(ResourceMonitoring.Feature.Condition, ResourceMonitoring.Feature.ReplacementProductList), {
|
|
797
|
+
condition: 100,
|
|
798
|
+
degradationDirection: ResourceMonitoring.DegradationDirection.Down,
|
|
799
|
+
changeIndication,
|
|
800
|
+
inPlaceIndicator,
|
|
801
|
+
lastChangedTime,
|
|
802
|
+
replacementProductList: [],
|
|
803
|
+
});
|
|
804
|
+
return this;
|
|
805
|
+
}
|
|
759
806
|
createDefaultDoorLockClusterServer(lockState = DoorLock.LockState.Locked, lockType = DoorLock.LockType.DeadBolt) {
|
|
760
807
|
this.behaviors.require(MatterbridgeDoorLockServer.enable({ events: { doorLockAlarm: true, lockOperation: true, lockOperationError: true } }), {
|
|
761
808
|
lockState,
|
|
@@ -1156,43 +1203,4 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
1156
1203
|
});
|
|
1157
1204
|
return this;
|
|
1158
1205
|
}
|
|
1159
|
-
createDefaultRvcRunModeClusterServer() {
|
|
1160
|
-
this.behaviors.require(RvcRunModeServer, {
|
|
1161
|
-
supportedModes: [
|
|
1162
|
-
{ label: 'Idle', mode: 1, modeTags: [{ value: RvcRunMode.ModeTag.Idle }] },
|
|
1163
|
-
{ label: 'Cleaning', mode: 2, modeTags: [{ value: RvcRunMode.ModeTag.Cleaning }] },
|
|
1164
|
-
],
|
|
1165
|
-
currentMode: 1,
|
|
1166
|
-
});
|
|
1167
|
-
return this;
|
|
1168
|
-
}
|
|
1169
|
-
createDefaultRvcOperationalStateClusterServer() {
|
|
1170
|
-
this.behaviors.require(RvcOperationalStateServer, {
|
|
1171
|
-
phaseList: [],
|
|
1172
|
-
currentPhase: null,
|
|
1173
|
-
operationalStateList: [
|
|
1174
|
-
{ operationalStateId: RvcOperationalState.OperationalState.Stopped, operationalStateLabel: 'Stopped' },
|
|
1175
|
-
{ operationalStateId: RvcOperationalState.OperationalState.Running, operationalStateLabel: 'Running' },
|
|
1176
|
-
{ operationalStateId: RvcOperationalState.OperationalState.Paused, operationalStateLabel: 'Paused' },
|
|
1177
|
-
{ operationalStateId: RvcOperationalState.OperationalState.Error, operationalStateLabel: 'Error' },
|
|
1178
|
-
{ operationalStateId: RvcOperationalState.OperationalState.SeekingCharger, operationalStateLabel: 'SeekingCharger' },
|
|
1179
|
-
{ operationalStateId: RvcOperationalState.OperationalState.Charging, operationalStateLabel: 'Charging' },
|
|
1180
|
-
{ operationalStateId: RvcOperationalState.OperationalState.Docked, operationalStateLabel: 'Docked' },
|
|
1181
|
-
],
|
|
1182
|
-
operationalState: RvcOperationalState.OperationalState.Stopped,
|
|
1183
|
-
operationalError: { errorStateId: RvcOperationalState.ErrorState.NoError, errorStateLabel: 'No Error' },
|
|
1184
|
-
});
|
|
1185
|
-
return this;
|
|
1186
|
-
}
|
|
1187
|
-
createDefaultRvcCleanModeClusterServer() {
|
|
1188
|
-
this.behaviors.require(RvcCleanModeServer, {
|
|
1189
|
-
supportedModes: [
|
|
1190
|
-
{ label: 'Idle', mode: 1, modeTags: [] },
|
|
1191
|
-
{ label: 'Cleaning', mode: 2, modeTags: [] },
|
|
1192
|
-
{ label: 'SpotCleaning', mode: 3, modeTags: [] },
|
|
1193
|
-
],
|
|
1194
|
-
currentMode: 1,
|
|
1195
|
-
});
|
|
1196
|
-
return this;
|
|
1197
|
-
}
|
|
1198
1206
|
}
|
|
@@ -115,8 +115,8 @@ export class MatterbridgePlatform {
|
|
|
115
115
|
if (device.deviceName)
|
|
116
116
|
this._registeredEndpointsByName.delete(device.deviceName);
|
|
117
117
|
}
|
|
118
|
-
async unregisterAllDevices() {
|
|
119
|
-
await this.matterbridge.removeAllBridgedEndpoints(this.name);
|
|
118
|
+
async unregisterAllDevices(delay = 0) {
|
|
119
|
+
await this.matterbridge.removeAllBridgedEndpoints(this.name, delay);
|
|
120
120
|
this._registeredEndpoints.clear();
|
|
121
121
|
this._registeredEndpointsByName.clear();
|
|
122
122
|
}
|
package/dist/pluginManager.js
CHANGED
|
@@ -226,7 +226,7 @@ export class PluginManager {
|
|
|
226
226
|
if (!packageJson.author)
|
|
227
227
|
this.log.warn(`Plugin ${plg}${plugin.name}${wr} has no author in package.json`);
|
|
228
228
|
if (!packageJson.homepage)
|
|
229
|
-
this.log.
|
|
229
|
+
this.log.info(`Plugin ${plg}${plugin.name}${nf} has no homepage in package.json`);
|
|
230
230
|
if (!packageJson.type || packageJson.type !== 'module')
|
|
231
231
|
this.log.error(`Plugin ${plg}${plugin.name}${er} is not a module`);
|
|
232
232
|
if (!packageJson.main)
|
|
@@ -748,7 +748,13 @@ export class PluginManager {
|
|
|
748
748
|
return schema;
|
|
749
749
|
}
|
|
750
750
|
catch (err) {
|
|
751
|
-
|
|
751
|
+
const nodeErr = err;
|
|
752
|
+
if (nodeErr.code === 'ENOENT') {
|
|
753
|
+
this.log.debug(`Schema file ${schemaFile} for plugin ${plg}${plugin.name}${db} not found. Loading default schema.`);
|
|
754
|
+
}
|
|
755
|
+
else {
|
|
756
|
+
this.log.debug(`Schema file ${schemaFile} for plugin ${plg}${plugin.name}${db} not found. Loading default schema. Error: ${err instanceof Error ? err.message + '\n' + err.stack : err}`);
|
|
757
|
+
}
|
|
752
758
|
return this.getDefaultSchema(plugin);
|
|
753
759
|
}
|
|
754
760
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "./static/css/main.ea7910e9.css",
|
|
4
|
-
"main.js": "./static/js/main.
|
|
4
|
+
"main.js": "./static/js/main.eb438c68.js",
|
|
5
5
|
"static/js/453.d855a71b.chunk.js": "./static/js/453.d855a71b.chunk.js",
|
|
6
6
|
"static/media/roboto-latin-700-normal.woff2": "./static/media/roboto-latin-700-normal.c4d6cab43bec89049809.woff2",
|
|
7
7
|
"static/media/roboto-latin-500-normal.woff2": "./static/media/roboto-latin-500-normal.599f66a60bdf974e578e.woff2",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
"static/media/roboto-greek-ext-300-normal.woff": "./static/media/roboto-greek-ext-300-normal.60729cafbded24073dfb.woff",
|
|
78
78
|
"index.html": "./index.html",
|
|
79
79
|
"main.ea7910e9.css.map": "./static/css/main.ea7910e9.css.map",
|
|
80
|
-
"main.
|
|
80
|
+
"main.eb438c68.js.map": "./static/js/main.eb438c68.js.map",
|
|
81
81
|
"453.d855a71b.chunk.js.map": "./static/js/453.d855a71b.chunk.js.map"
|
|
82
82
|
},
|
|
83
83
|
"entrypoints": [
|
|
84
84
|
"static/css/main.ea7910e9.css",
|
|
85
|
-
"static/js/main.
|
|
85
|
+
"static/js/main.eb438c68.js"
|
|
86
86
|
]
|
|
87
87
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.eb438c68.js"></script><link href="./static/css/main.ea7910e9.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|