matterbridge 1.6.3-dev.1 → 1.6.4
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 +14 -5
- package/README-DEV.md +12 -7
- package/dist/cli.js +0 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -8
- package/dist/index.js.map +1 -1
- package/dist/matterbridge.d.ts.map +1 -1
- package/dist/matterbridge.js +58 -57
- package/dist/matterbridge.js.map +1 -1
- package/dist/matterbridgeBehaviors.d.ts +4 -0
- package/dist/matterbridgeBehaviors.d.ts.map +1 -1
- package/dist/matterbridgeBehaviors.js +56 -39
- package/dist/matterbridgeBehaviors.js.map +1 -1
- package/dist/matterbridgeDevice.d.ts +11 -19
- package/dist/matterbridgeDevice.d.ts.map +1 -1
- package/dist/matterbridgeDevice.js +10 -1
- package/dist/matterbridgeDevice.js.map +1 -1
- package/dist/matterbridgeEdge.js +12 -12
- package/dist/matterbridgeEdge.js.map +1 -1
- package/dist/matterbridgeEndpoint.d.ts +943 -11
- package/dist/matterbridgeEndpoint.d.ts.map +1 -1
- package/dist/matterbridgeEndpoint.js +109 -29
- package/dist/matterbridgeEndpoint.js.map +1 -1
- package/npm-shrinkwrap.json +61 -61
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -10,15 +10,19 @@ The Home Assistant Community Add-ons and plugins are not verified to work with M
|
|
|
10
10
|
|
|
11
11
|
If you want to run Matterbridge in Home Assistant please use the official add-on https://github.com/Luligu/matterbridge-home-assistant-addon that also has Ingress and side panel.
|
|
12
12
|
|
|
13
|
-
### New Apple firmware v. 18.x
|
|
14
|
-
|
|
15
|
-
Please read this: https://github.com/Luligu/matterbridge/discussions/135
|
|
16
|
-
|
|
17
13
|
### Discord
|
|
18
14
|
|
|
19
15
|
Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord group: https://discord.gg/QX58CDe6hd.
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
## [1.6.4] - 2024-11-29
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- [matter.js]: Update to matter.js 0.11.7.
|
|
22
|
+
|
|
23
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
24
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
25
|
+
</a>
|
|
22
26
|
|
|
23
27
|
## [1.6.3] - 2024-11-27
|
|
24
28
|
|
|
@@ -29,6 +33,11 @@ Feel free to join (the link is now permanent)!
|
|
|
29
33
|
### Fixed
|
|
30
34
|
|
|
31
35
|
- [matter.js]: Temporary fix the crash of matter.js on close when using command line parameters.
|
|
36
|
+
- [matter.js]: Update to matter.js 0.11.6.
|
|
37
|
+
|
|
38
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
39
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
40
|
+
</a>
|
|
32
41
|
|
|
33
42
|
## [1.6.2] - 2024-11-25
|
|
34
43
|
|
package/README-DEV.md
CHANGED
|
@@ -23,6 +23,10 @@ Matterbridge exports from:
|
|
|
23
23
|
- Matterbridge and all Matterbridge related classes.
|
|
24
24
|
- All relevant matter-node.js or matter.js clusters, classes and functions.
|
|
25
25
|
|
|
26
|
+
"matterbridge/matter"
|
|
27
|
+
|
|
28
|
+
- All relevant matter.js new api only exports (in beta).
|
|
29
|
+
|
|
26
30
|
"matterbridge/cluster"
|
|
27
31
|
|
|
28
32
|
- All clusters not present in matter.js or modified.
|
|
@@ -33,15 +37,15 @@ Matterbridge exports from:
|
|
|
33
37
|
|
|
34
38
|
"matterbridge/logger"
|
|
35
39
|
|
|
36
|
-
-
|
|
40
|
+
- AnsiLogger class.
|
|
37
41
|
|
|
38
42
|
"matterbridge/storage"
|
|
39
43
|
|
|
40
|
-
- NodeStorage classes.
|
|
44
|
+
- NodeStorageManager and NodeStorage classes.
|
|
41
45
|
|
|
42
46
|
# \***\*\*\*\*\***
|
|
43
47
|
|
|
44
|
-
A plugin must never install or import from
|
|
48
|
+
A plugin must never install or import from `@matter` or `@project-chip` directly (neither as a dependency, devDependency, nor peerDependency), as this leads to a second instance of `matter.js`, causing instability and unpredictable errors such as "The only instance is Endpoint".
|
|
45
49
|
|
|
46
50
|
Additionally, when Matterbridge updates the `matter.js` version, it should be consistent across all plugins.
|
|
47
51
|
|
|
@@ -61,15 +65,16 @@ Matterbridge must be linked to the plugin in development only.
|
|
|
61
65
|
|
|
62
66
|
# \***\*\*\*\*\***
|
|
63
67
|
|
|
64
|
-
In the next releases I will remove the duplicated exports so please update your plugins.
|
|
65
|
-
|
|
66
68
|
I added some error messages when a plugin has wrong imports or configurations and the plugin will be disabled to prevent instability and crashes.
|
|
67
69
|
|
|
68
|
-
##
|
|
70
|
+
## Migration to matter.js V8
|
|
69
71
|
|
|
70
72
|
I'm working with matter.js team to define the strategy for the migration of Matterbridge to the new API.
|
|
71
73
|
|
|
72
|
-
|
|
74
|
+
- First phase: crete MatterbridgeEdge class: completed 90%
|
|
75
|
+
- Second phase: create MatterbridgeEndpoint and MatterbridgeBehaviors classes: completed 90%
|
|
76
|
+
- Third phase: modifiy all plugins to support both normal and edge mode of Matterbridge: completed 80%
|
|
77
|
+
- Fourth phase: remove all old api code from Matterbridge and all plugins...
|
|
73
78
|
|
|
74
79
|
## How to create your plugin
|
|
75
80
|
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
* See the License for the specific language governing permissions and
|
|
21
21
|
* limitations under the License. *
|
|
22
22
|
*/
|
|
23
|
-
export
|
|
23
|
+
export type Identity<T> = T;
|
|
24
|
+
export type AtLeastOne<T> = ArrayMinLength<T, 1>;
|
|
25
|
+
type BuildArrayMinLength<T, N extends number, Current extends T[]> = Current['length'] extends N ? [...Current, ...T[]] : BuildArrayMinLength<T, N, [...Current, T]>;
|
|
26
|
+
export type ArrayMinLength<T, N extends number> = BuildArrayMinLength<T, N, []>;
|
|
24
27
|
export * from '@matter/main/clusters';
|
|
25
28
|
export * from '@matter/main/types';
|
|
26
29
|
export { SemanticNamespace, ClosureTag, CompassDirectionTag, CompassLocationTag, DirectionTag, ElectricalMeasurementTag, LaundryTag, LevelTag, LocationTag, NumberTag, PositionTag, PowerSourceTag, RefrigeratorTag, RoomAirConditionerTag, SwitchesTag, } from '@matter/node';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC;AAE5B,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEjD,KAAK,mBAAmB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,OAAO,SAAS,CAAC,EAAE,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AAErK,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAIhF,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,WAAW,GACZ,MAAM,cAAc,CAAC;AAGtB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAGhD,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,20 +22,14 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { Matterbridge } from './matterbridge.js';
|
|
24
24
|
import { MatterbridgeEdge } from './matterbridgeEdge.js';
|
|
25
|
+
// @matter
|
|
26
|
+
// export { Identity, AtLeastOne } from '@matter/main';
|
|
25
27
|
export * from '@matter/main/clusters';
|
|
26
28
|
export * from '@matter/main/types';
|
|
27
29
|
export { SemanticNamespace, ClosureTag, CompassDirectionTag, CompassLocationTag, DirectionTag, ElectricalMeasurementTag, LaundryTag, LevelTag, LocationTag, NumberTag, PositionTag, PowerSourceTag, RefrigeratorTag, RoomAirConditionerTag, SwitchesTag, } from '@matter/node';
|
|
28
30
|
// @project-chip
|
|
29
31
|
export * from '@project-chip/matter.js/device';
|
|
30
32
|
export * from '@project-chip/matter.js/cluster';
|
|
31
|
-
/*
|
|
32
|
-
export * from '@project-chip/matter.js/cluster';
|
|
33
|
-
export * from '@project-chip/matter.js/log';
|
|
34
|
-
export * from '@project-chip/matter.js/datatype';
|
|
35
|
-
export * from '@project-chip/matter.js/util';
|
|
36
|
-
export * from '@project-chip/matter.js/schema';
|
|
37
|
-
export * from '@project-chip/matter.js/tlv';
|
|
38
|
-
*/
|
|
39
33
|
// Matterbridge
|
|
40
34
|
export * from './matterbridge.js';
|
|
41
35
|
export * from './matterbridgeTypes.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAUzD,UAAU;AACV,uDAAuD;AACvD,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,gBAAgB;AAChB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAEhD,eAAe;AACf,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AAEjD,MAAM,GAAG,GAAG,YAAY,CAAC;AACzB,MAAM,EAAE,GAAG,gBAAgB,CAAC;AAC5B,MAAM,EAAE,GAAG,cAAc,CAAC;AAE1B,KAAK,UAAU,IAAI;IACjB,sCAAsC;IACtC,IAAI,OAAO,CAAC,IAA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U,aAAa;IAa1B;;;;;OAKG;IACI,uBAAuB,IAAI,OAAO;CAI1C"}
|
package/dist/matterbridge.js
CHANGED
|
@@ -44,8 +44,8 @@ import { PluginManager } from './pluginManager.js';
|
|
|
44
44
|
import { DeviceManager } from './deviceManager.js';
|
|
45
45
|
import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
|
|
46
46
|
// @matter
|
|
47
|
-
import { DeviceTypeId, Logger, LogLevel as MatterLogLevel, LogFormat as MatterLogFormat, VendorId, StorageManager } from '@matter/main';
|
|
48
|
-
import { BasicInformationCluster, BridgedDeviceBasicInformation, BridgedDeviceBasicInformationCluster, FixedLabelCluster, GeneralCommissioning, PowerSourceCluster, SwitchCluster, ThreadNetworkDiagnosticsCluster } from '@matter/main/clusters';
|
|
47
|
+
import { DeviceTypeId, Logger, LogLevel as MatterLogLevel, LogFormat as MatterLogFormat, VendorId, StorageManager, EndpointServer } from '@matter/main';
|
|
48
|
+
import { BasicInformationCluster, BridgedDeviceBasicInformation, BridgedDeviceBasicInformationCluster, FixedLabelCluster, GeneralCommissioning, PowerSourceCluster, SwitchCluster, ThreadNetworkDiagnosticsCluster, UserLabelCluster, } from '@matter/main/clusters';
|
|
49
49
|
import { getClusterNameById, ManualPairingCodeCodec, QrCodeSchema } from '@matter/main/types';
|
|
50
50
|
import { StorageBackendDisk, StorageBackendJsonFile } from '@matter/nodejs';
|
|
51
51
|
// @project-chip
|
|
@@ -503,8 +503,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
503
503
|
this.log.info(` └─ endpoint ${RED}${device.endpoint}${nf} ${typ}${device.endpointName}${nf} ${debugStringify(device.clusterServersId)}`);
|
|
504
504
|
}
|
|
505
505
|
});
|
|
506
|
-
await this.cleanup('Exiting...');
|
|
507
|
-
process.exit(0);
|
|
508
506
|
this.emit('shutdown');
|
|
509
507
|
return;
|
|
510
508
|
}
|
|
@@ -515,48 +513,36 @@ export class Matterbridge extends EventEmitter {
|
|
|
515
513
|
this.log.info(`${plg}${plugin.name}${nf} storage log`);
|
|
516
514
|
await plugin.nodeContext?.logStorage();
|
|
517
515
|
}
|
|
518
|
-
await this.cleanup('Exiting...');
|
|
519
|
-
process.exit(0);
|
|
520
516
|
this.emit('shutdown');
|
|
521
517
|
return;
|
|
522
518
|
}
|
|
523
519
|
if (hasParameter('loginterfaces')) {
|
|
524
520
|
this.log.info(`${plg}Matterbridge${nf} network interfaces log`);
|
|
525
521
|
logInterfaces();
|
|
526
|
-
await this.cleanup('Exiting...');
|
|
527
|
-
process.exit(0);
|
|
528
522
|
this.emit('shutdown');
|
|
529
523
|
return;
|
|
530
524
|
}
|
|
531
525
|
if (getParameter('add')) {
|
|
532
526
|
this.log.debug(`Adding plugin ${getParameter('add')}`);
|
|
533
527
|
await this.plugins.add(getParameter('add'));
|
|
534
|
-
await this.cleanup('Exiting...');
|
|
535
|
-
process.exit(0);
|
|
536
528
|
this.emit('shutdown');
|
|
537
529
|
return;
|
|
538
530
|
}
|
|
539
531
|
if (getParameter('remove')) {
|
|
540
532
|
this.log.debug(`Removing plugin ${getParameter('remove')}`);
|
|
541
533
|
await this.plugins.remove(getParameter('remove'));
|
|
542
|
-
await this.cleanup('Exiting...');
|
|
543
|
-
process.exit(0);
|
|
544
534
|
this.emit('shutdown');
|
|
545
535
|
return;
|
|
546
536
|
}
|
|
547
537
|
if (getParameter('enable')) {
|
|
548
538
|
this.log.debug(`Enabling plugin ${getParameter('enable')}`);
|
|
549
539
|
await this.plugins.enable(getParameter('enable'));
|
|
550
|
-
await this.cleanup('Exiting...');
|
|
551
|
-
process.exit(0);
|
|
552
540
|
this.emit('shutdown');
|
|
553
541
|
return;
|
|
554
542
|
}
|
|
555
543
|
if (getParameter('disable')) {
|
|
556
544
|
this.log.debug(`Disabling plugin ${getParameter('disable')}`);
|
|
557
545
|
await this.plugins.disable(getParameter('disable'));
|
|
558
|
-
await this.cleanup('Exiting...');
|
|
559
|
-
process.exit(0);
|
|
560
546
|
this.emit('shutdown');
|
|
561
547
|
return;
|
|
562
548
|
}
|
|
@@ -580,8 +566,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
580
566
|
this.nodeStorage = undefined;
|
|
581
567
|
this.plugins.clear();
|
|
582
568
|
this.devices.clear();
|
|
583
|
-
await this.cleanup('Exiting...');
|
|
584
|
-
process.exit(0);
|
|
585
569
|
this.emit('shutdown');
|
|
586
570
|
return;
|
|
587
571
|
}
|
|
@@ -598,8 +582,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
598
582
|
await this.matterbridgeContext?.clearAll();
|
|
599
583
|
await this.stopMatterStorage();
|
|
600
584
|
this.log.info('Reset done! Remove the device from the controller.');
|
|
601
|
-
await this.cleanup('Exiting...');
|
|
602
|
-
process.exit(0);
|
|
603
585
|
this.emit('shutdown');
|
|
604
586
|
return;
|
|
605
587
|
}
|
|
@@ -619,8 +601,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
619
601
|
this.log.warn(`Plugin ${plg}${getParameter('reset')}${wr} not registerd in matterbridge`);
|
|
620
602
|
}
|
|
621
603
|
await this.stopMatterStorage();
|
|
622
|
-
await this.cleanup('Exiting...');
|
|
623
|
-
process.exit(0);
|
|
624
604
|
this.emit('shutdown');
|
|
625
605
|
return;
|
|
626
606
|
}
|
|
@@ -2902,6 +2882,9 @@ export class Matterbridge extends EventEmitter {
|
|
|
2902
2882
|
this.log.debug('The frontend sent /api/devices');
|
|
2903
2883
|
const data = [];
|
|
2904
2884
|
this.devices.forEach(async (device) => {
|
|
2885
|
+
const pluginName = device.plugin ?? 'Unknown';
|
|
2886
|
+
if (this.edge)
|
|
2887
|
+
device = EndpointServer.forEndpoint(device);
|
|
2905
2888
|
let name = device.getClusterServer(BasicInformationCluster)?.attributes.nodeLabel?.getLocal();
|
|
2906
2889
|
if (!name)
|
|
2907
2890
|
name = device.getClusterServer(BridgedDeviceBasicInformationCluster)?.attributes.nodeLabel?.getLocal() ?? 'Unknown';
|
|
@@ -2913,7 +2896,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2913
2896
|
uniqueId = device.getClusterServer(BridgedDeviceBasicInformationCluster)?.attributes.uniqueId?.getLocal() ?? 'Unknown';
|
|
2914
2897
|
const cluster = this.getClusterTextFromDevice(device);
|
|
2915
2898
|
data.push({
|
|
2916
|
-
pluginName
|
|
2899
|
+
pluginName,
|
|
2917
2900
|
type: device.name + ' (0x' + device.deviceType.toString(16).padStart(4, '0') + ')',
|
|
2918
2901
|
endpoint: device.number,
|
|
2919
2902
|
name,
|
|
@@ -2936,7 +2919,10 @@ export class Matterbridge extends EventEmitter {
|
|
|
2936
2919
|
}
|
|
2937
2920
|
const data = [];
|
|
2938
2921
|
this.devices.forEach(async (device) => {
|
|
2939
|
-
|
|
2922
|
+
const pluginName = device.plugin;
|
|
2923
|
+
if (this.edge)
|
|
2924
|
+
device = EndpointServer.forEndpoint(device);
|
|
2925
|
+
if (pluginName === selectedPluginName && device.number === selectedDeviceEndpoint) {
|
|
2940
2926
|
const clusterServers = device.getAllClusterServers();
|
|
2941
2927
|
clusterServers.forEach((clusterServer) => {
|
|
2942
2928
|
Object.entries(clusterServer.attributes).forEach(([key, value]) => {
|
|
@@ -2951,7 +2937,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2951
2937
|
attributeValue = value.getLocal().toString();
|
|
2952
2938
|
}
|
|
2953
2939
|
catch (error) {
|
|
2954
|
-
attributeValue = '
|
|
2940
|
+
attributeValue = 'Fabric-Scoped';
|
|
2955
2941
|
this.log.debug(`GetLocal value ${error} in clusterServer: ${clusterServer.name}(${clusterServer.id}) attribute: ${key}(${value.id})`);
|
|
2956
2942
|
// console.log(error);
|
|
2957
2943
|
}
|
|
@@ -2966,7 +2952,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
2966
2952
|
});
|
|
2967
2953
|
});
|
|
2968
2954
|
device.getChildEndpoints().forEach((childEndpoint) => {
|
|
2969
|
-
|
|
2955
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2956
|
+
const name = this.edge ? childEndpoint.endpoint?.id : childEndpoint.uniqueStorageKey;
|
|
2970
2957
|
const clusterServers = childEndpoint.getAllClusterServers();
|
|
2971
2958
|
clusterServers.forEach((clusterServer) => {
|
|
2972
2959
|
Object.entries(clusterServer.attributes).forEach(([key, value]) => {
|
|
@@ -3422,26 +3409,36 @@ export class Matterbridge extends EventEmitter {
|
|
|
3422
3409
|
* @returns {string} The attributes description of the cluster servers in the device.
|
|
3423
3410
|
*/
|
|
3424
3411
|
getClusterTextFromDevice(device) {
|
|
3412
|
+
const stringifyUserLabel = (endpoint) => {
|
|
3413
|
+
const labelList = endpoint.getClusterServer(UserLabelCluster)?.attributes.labelList.getLocal();
|
|
3414
|
+
if (!labelList)
|
|
3415
|
+
return;
|
|
3416
|
+
const composed = labelList.find((entry) => entry.label === 'composed');
|
|
3417
|
+
if (composed)
|
|
3418
|
+
return 'Composed: ' + composed.value;
|
|
3419
|
+
else
|
|
3420
|
+
return '';
|
|
3421
|
+
};
|
|
3425
3422
|
const stringifyFixedLabel = (endpoint) => {
|
|
3426
|
-
const labelList = endpoint.getClusterServer(FixedLabelCluster)?.
|
|
3423
|
+
const labelList = endpoint.getClusterServer(FixedLabelCluster)?.attributes.labelList.getLocal();
|
|
3427
3424
|
if (!labelList)
|
|
3428
3425
|
return;
|
|
3429
3426
|
const composed = labelList.find((entry) => entry.label === 'composed');
|
|
3430
3427
|
if (composed)
|
|
3431
3428
|
return 'Composed: ' + composed.value;
|
|
3432
3429
|
else
|
|
3433
|
-
return '';
|
|
3430
|
+
return '';
|
|
3434
3431
|
};
|
|
3435
3432
|
let attributes = '';
|
|
3436
|
-
// this.log.debug(
|
|
3433
|
+
// this.log.debug(`***getClusterTextFromDevice: ${device.deviceName} (${device.name})`);
|
|
3437
3434
|
const clusterServers = device.getAllClusterServers();
|
|
3438
3435
|
clusterServers.forEach((clusterServer) => {
|
|
3439
3436
|
try {
|
|
3440
|
-
// this.log.debug(
|
|
3437
|
+
// this.log.debug(`**--clusterServer: ${clusterServer.id} (${clusterServer.name})`);
|
|
3441
3438
|
if (clusterServer.name === 'OnOff')
|
|
3442
|
-
attributes += `OnOff: ${clusterServer.
|
|
3439
|
+
attributes += `OnOff: ${clusterServer.attributes.onOff.getLocal()} `;
|
|
3443
3440
|
if (clusterServer.name === 'Switch')
|
|
3444
|
-
attributes += `Position: ${clusterServer.
|
|
3441
|
+
attributes += `Position: ${clusterServer.attributes.currentPosition.getLocal()} `;
|
|
3445
3442
|
if (clusterServer.name === 'WindowCovering')
|
|
3446
3443
|
attributes += `Cover position: ${clusterServer.attributes.currentPositionLiftPercent100ths.getLocal() / 100}% `;
|
|
3447
3444
|
if (clusterServer.name === 'DoorLock')
|
|
@@ -3449,48 +3446,52 @@ export class Matterbridge extends EventEmitter {
|
|
|
3449
3446
|
if (clusterServer.name === 'Thermostat')
|
|
3450
3447
|
attributes += `Temperature: ${clusterServer.attributes.localTemperature.getLocal() / 100}°C `;
|
|
3451
3448
|
if (clusterServer.name === 'LevelControl')
|
|
3452
|
-
attributes += `Level: ${clusterServer.
|
|
3453
|
-
if (clusterServer.name === 'ColorControl' && clusterServer.
|
|
3454
|
-
attributes += `X: ${Math.round(clusterServer.
|
|
3455
|
-
if (clusterServer.name === 'ColorControl' && clusterServer.
|
|
3456
|
-
attributes += `Hue: ${Math.round(clusterServer.
|
|
3457
|
-
if (clusterServer.name === 'ColorControl' && clusterServer.
|
|
3458
|
-
attributes += `ColorTemp: ${Math.round(clusterServer.
|
|
3449
|
+
attributes += `Level: ${clusterServer.attributes.currentLevel.getLocal()}% `;
|
|
3450
|
+
if (clusterServer.name === 'ColorControl' && clusterServer.attributes.currentX)
|
|
3451
|
+
attributes += `X: ${Math.round(clusterServer.attributes.currentX.getLocal())} Y: ${Math.round(clusterServer.attributes.currentY.getLocal())} `;
|
|
3452
|
+
if (clusterServer.name === 'ColorControl' && clusterServer.attributes.currentHue)
|
|
3453
|
+
attributes += `Hue: ${Math.round(clusterServer.attributes.currentHue.getLocal())} Saturation: ${Math.round(clusterServer.attributes.currentSaturation.getLocal())}% `;
|
|
3454
|
+
if (clusterServer.name === 'ColorControl' && clusterServer.attributes.colorTemperatureMireds)
|
|
3455
|
+
attributes += `ColorTemp: ${Math.round(clusterServer.attributes.colorTemperatureMireds.getLocal())} `;
|
|
3459
3456
|
if (clusterServer.name === 'BooleanState')
|
|
3460
|
-
attributes += `Contact: ${clusterServer.
|
|
3461
|
-
if (clusterServer.name === 'BooleanStateConfiguration' && clusterServer.
|
|
3462
|
-
attributes += `Active alarms: ${stringify(clusterServer.
|
|
3463
|
-
if (clusterServer.name === 'SmokeCoAlarm' && clusterServer.
|
|
3464
|
-
attributes += `Smoke: ${clusterServer.
|
|
3465
|
-
if (clusterServer.name === 'SmokeCoAlarm' && clusterServer.
|
|
3466
|
-
attributes += `Co: ${clusterServer.
|
|
3457
|
+
attributes += `Contact: ${clusterServer.attributes.stateValue.getLocal()} `;
|
|
3458
|
+
if (clusterServer.name === 'BooleanStateConfiguration' && clusterServer.attributes.alarmsActive)
|
|
3459
|
+
attributes += `Active alarms: ${stringify(clusterServer.attributes.alarmsActive.getLocal())} `;
|
|
3460
|
+
if (clusterServer.name === 'SmokeCoAlarm' && clusterServer.attributes.smokeState)
|
|
3461
|
+
attributes += `Smoke: ${clusterServer.attributes.smokeState.getLocal()} `;
|
|
3462
|
+
if (clusterServer.name === 'SmokeCoAlarm' && clusterServer.attributes.coState)
|
|
3463
|
+
attributes += `Co: ${clusterServer.attributes.coState.getLocal()} `;
|
|
3467
3464
|
if (clusterServer.name === 'FanControl')
|
|
3468
|
-
attributes += `Mode: ${clusterServer.
|
|
3469
|
-
if (clusterServer.name === 'FanControl' && clusterServer.
|
|
3470
|
-
attributes += `MultiSpeed: ${clusterServer.
|
|
3465
|
+
attributes += `Mode: ${clusterServer.attributes.fanMode.getLocal()} Speed: ${clusterServer.attributes.percentCurrent.getLocal()} `;
|
|
3466
|
+
if (clusterServer.name === 'FanControl' && clusterServer.attributes.speedCurrent)
|
|
3467
|
+
attributes += `MultiSpeed: ${clusterServer.attributes.speedCurrent.getLocal()} `;
|
|
3471
3468
|
if (clusterServer.name === 'OccupancySensing')
|
|
3472
|
-
attributes += `Occupancy: ${clusterServer.
|
|
3469
|
+
attributes += `Occupancy: ${clusterServer.attributes.occupancy.getLocal().occupied} `;
|
|
3473
3470
|
if (clusterServer.name === 'IlluminanceMeasurement')
|
|
3474
|
-
attributes += `Illuminance: ${clusterServer.
|
|
3471
|
+
attributes += `Illuminance: ${clusterServer.attributes.measuredValue.getLocal()} `;
|
|
3475
3472
|
if (clusterServer.name === 'AirQuality')
|
|
3476
|
-
attributes += `Air quality: ${clusterServer.
|
|
3473
|
+
attributes += `Air quality: ${clusterServer.attributes.airQuality.getLocal()} `;
|
|
3477
3474
|
if (clusterServer.name === 'TvocMeasurement')
|
|
3478
|
-
attributes += `Voc: ${clusterServer.
|
|
3475
|
+
attributes += `Voc: ${clusterServer.attributes.measuredValue.getLocal()} `;
|
|
3479
3476
|
if (clusterServer.name === 'TemperatureMeasurement')
|
|
3480
|
-
attributes += `Temperature: ${clusterServer.
|
|
3477
|
+
attributes += `Temperature: ${clusterServer.attributes.measuredValue.getLocal() / 100}°C `;
|
|
3481
3478
|
if (clusterServer.name === 'RelativeHumidityMeasurement')
|
|
3482
|
-
attributes += `Humidity: ${clusterServer.
|
|
3479
|
+
attributes += `Humidity: ${clusterServer.attributes.measuredValue.getLocal() / 100}% `;
|
|
3483
3480
|
if (clusterServer.name === 'PressureMeasurement')
|
|
3484
|
-
attributes += `Pressure: ${clusterServer.
|
|
3481
|
+
attributes += `Pressure: ${clusterServer.attributes.measuredValue.getLocal()} `;
|
|
3485
3482
|
if (clusterServer.name === 'FlowMeasurement')
|
|
3486
|
-
attributes += `Flow: ${clusterServer.
|
|
3483
|
+
attributes += `Flow: ${clusterServer.attributes.measuredValue.getLocal()} `;
|
|
3487
3484
|
if (clusterServer.name === 'FixedLabel')
|
|
3488
3485
|
attributes += `${stringifyFixedLabel(device)} `;
|
|
3486
|
+
if (clusterServer.name === 'UserLabel')
|
|
3487
|
+
attributes += `${stringifyUserLabel(device)} `;
|
|
3488
|
+
// this.log.debug(`*--clusterServer: ${clusterServer.id} (${clusterServer.name})`);
|
|
3489
3489
|
}
|
|
3490
3490
|
catch (error) {
|
|
3491
3491
|
this.log.error(`getClusterTextFromDevice with ${clusterServer.name} error: ${error}`);
|
|
3492
3492
|
}
|
|
3493
3493
|
});
|
|
3494
|
+
// this.log.debug(`*getClusterTextFromDevice: ${device.deviceName} (${device.name})`);
|
|
3494
3495
|
return attributes;
|
|
3495
3496
|
}
|
|
3496
3497
|
/**
|