matterbridge 1.6.3 → 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 CHANGED
@@ -14,6 +14,15 @@ If you want to run Matterbridge in Home Assistant please use the official add-on
14
14
 
15
15
  Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord group: https://discord.gg/QX58CDe6hd.
16
16
 
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>
17
26
 
18
27
  ## [1.6.3] - 2024-11-27
19
28
 
@@ -26,6 +35,10 @@ Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord
26
35
  - [matter.js]: Temporary fix the crash of matter.js on close when using command line parameters.
27
36
  - [matter.js]: Update to matter.js 0.11.6.
28
37
 
38
+ <a href="https://www.buymeacoffee.com/luligugithub">
39
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
40
+ </a>
41
+
29
42
  ## [1.6.2] - 2024-11-25
30
43
 
31
44
  ### Added
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
- - NodeAnsiLogger class.
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 `matter-node.js` or `matter.js` 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".
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
- ## Guidelines on the migration to matter.js V8
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
- More informations will be added soon.
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/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 { Identity, AtLeastOne } from '@matter/main';
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';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACpD,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;AAWhD,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"}
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;AAIzD,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;AAChD;;;;;;;EAOE;AAEF,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,O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C,mBAAmB,EAAE,mBAAmB,EAAE,SAAS,EAAE,OAAO;IAMzG;;;;OAIG;IACH,SAAS,CAAC,yBAAyB,CAAC,gBAAgB,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO;IAWpF;;;;;OAKG;IACH,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAO;IAM9E,OAAO,CAAC,eAAe,CAuCrB;IAEF;;;OAGG;cACa,wBAAwB,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAgC3E;;;;;OAKG;cACa,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAqFpF;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IAuCtB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAU9B;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAU9B;;;;OAIG;IACG,kBAAkB,CAAC,IAAI,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAytBpD;;;;OAIG;IACH,SAAS,CAAC,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;IA2DtE;;;;;OAKG;IACU,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,SAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAsEtG;;;;;OAKG;IACU,aAAa;IAa1B;;;;;OAKG;IACI,uBAAuB,IAAI,OAAO;CAI1C"}
@@ -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
@@ -2882,6 +2882,9 @@ export class Matterbridge extends EventEmitter {
2882
2882
  this.log.debug('The frontend sent /api/devices');
2883
2883
  const data = [];
2884
2884
  this.devices.forEach(async (device) => {
2885
+ const pluginName = device.plugin ?? 'Unknown';
2886
+ if (this.edge)
2887
+ device = EndpointServer.forEndpoint(device);
2885
2888
  let name = device.getClusterServer(BasicInformationCluster)?.attributes.nodeLabel?.getLocal();
2886
2889
  if (!name)
2887
2890
  name = device.getClusterServer(BridgedDeviceBasicInformationCluster)?.attributes.nodeLabel?.getLocal() ?? 'Unknown';
@@ -2893,7 +2896,7 @@ export class Matterbridge extends EventEmitter {
2893
2896
  uniqueId = device.getClusterServer(BridgedDeviceBasicInformationCluster)?.attributes.uniqueId?.getLocal() ?? 'Unknown';
2894
2897
  const cluster = this.getClusterTextFromDevice(device);
2895
2898
  data.push({
2896
- pluginName: device.plugin ?? 'Unknown',
2899
+ pluginName,
2897
2900
  type: device.name + ' (0x' + device.deviceType.toString(16).padStart(4, '0') + ')',
2898
2901
  endpoint: device.number,
2899
2902
  name,
@@ -2916,7 +2919,10 @@ export class Matterbridge extends EventEmitter {
2916
2919
  }
2917
2920
  const data = [];
2918
2921
  this.devices.forEach(async (device) => {
2919
- if (device.plugin === selectedPluginName && device.number === selectedDeviceEndpoint) {
2922
+ const pluginName = device.plugin;
2923
+ if (this.edge)
2924
+ device = EndpointServer.forEndpoint(device);
2925
+ if (pluginName === selectedPluginName && device.number === selectedDeviceEndpoint) {
2920
2926
  const clusterServers = device.getAllClusterServers();
2921
2927
  clusterServers.forEach((clusterServer) => {
2922
2928
  Object.entries(clusterServer.attributes).forEach(([key, value]) => {
@@ -2931,7 +2937,7 @@ export class Matterbridge extends EventEmitter {
2931
2937
  attributeValue = value.getLocal().toString();
2932
2938
  }
2933
2939
  catch (error) {
2934
- attributeValue = 'Unavailable';
2940
+ attributeValue = 'Fabric-Scoped';
2935
2941
  this.log.debug(`GetLocal value ${error} in clusterServer: ${clusterServer.name}(${clusterServer.id}) attribute: ${key}(${value.id})`);
2936
2942
  // console.log(error);
2937
2943
  }
@@ -2946,7 +2952,8 @@ export class Matterbridge extends EventEmitter {
2946
2952
  });
2947
2953
  });
2948
2954
  device.getChildEndpoints().forEach((childEndpoint) => {
2949
- const name = childEndpoint.uniqueStorageKey;
2955
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2956
+ const name = this.edge ? childEndpoint.endpoint?.id : childEndpoint.uniqueStorageKey;
2950
2957
  const clusterServers = childEndpoint.getAllClusterServers();
2951
2958
  clusterServers.forEach((clusterServer) => {
2952
2959
  Object.entries(clusterServer.attributes).forEach(([key, value]) => {
@@ -3402,26 +3409,36 @@ export class Matterbridge extends EventEmitter {
3402
3409
  * @returns {string} The attributes description of the cluster servers in the device.
3403
3410
  */
3404
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
+ };
3405
3422
  const stringifyFixedLabel = (endpoint) => {
3406
- const labelList = endpoint.getClusterServer(FixedLabelCluster)?.getLabelListAttribute();
3423
+ const labelList = endpoint.getClusterServer(FixedLabelCluster)?.attributes.labelList.getLocal();
3407
3424
  if (!labelList)
3408
3425
  return;
3409
3426
  const composed = labelList.find((entry) => entry.label === 'composed');
3410
3427
  if (composed)
3411
3428
  return 'Composed: ' + composed.value;
3412
3429
  else
3413
- return ''; // 'FixedLabel: ' + labelList.map((entry) => entry.label + ': ' + entry.value).join(' ');
3430
+ return '';
3414
3431
  };
3415
3432
  let attributes = '';
3416
- // this.log.debug(`getClusterTextFromDevice: ${device.name}`);
3433
+ // this.log.debug(`***getClusterTextFromDevice: ${device.deviceName} (${device.name})`);
3417
3434
  const clusterServers = device.getAllClusterServers();
3418
3435
  clusterServers.forEach((clusterServer) => {
3419
3436
  try {
3420
- // this.log.debug(`***--clusterServer: ${clusterServer.id} (${clusterServer.name})`);
3437
+ // this.log.debug(`**--clusterServer: ${clusterServer.id} (${clusterServer.name})`);
3421
3438
  if (clusterServer.name === 'OnOff')
3422
- attributes += `OnOff: ${clusterServer.getOnOffAttribute()} `;
3439
+ attributes += `OnOff: ${clusterServer.attributes.onOff.getLocal()} `;
3423
3440
  if (clusterServer.name === 'Switch')
3424
- attributes += `Position: ${clusterServer.getCurrentPositionAttribute()} `;
3441
+ attributes += `Position: ${clusterServer.attributes.currentPosition.getLocal()} `;
3425
3442
  if (clusterServer.name === 'WindowCovering')
3426
3443
  attributes += `Cover position: ${clusterServer.attributes.currentPositionLiftPercent100ths.getLocal() / 100}% `;
3427
3444
  if (clusterServer.name === 'DoorLock')
@@ -3429,48 +3446,52 @@ export class Matterbridge extends EventEmitter {
3429
3446
  if (clusterServer.name === 'Thermostat')
3430
3447
  attributes += `Temperature: ${clusterServer.attributes.localTemperature.getLocal() / 100}°C `;
3431
3448
  if (clusterServer.name === 'LevelControl')
3432
- attributes += `Level: ${clusterServer.getCurrentLevelAttribute()}% `;
3433
- if (clusterServer.name === 'ColorControl' && clusterServer.isAttributeSupportedByName('currentX'))
3434
- attributes += `X: ${Math.round(clusterServer.getCurrentXAttribute())} Y: ${Math.round(clusterServer.getCurrentYAttribute())} `;
3435
- if (clusterServer.name === 'ColorControl' && clusterServer.isAttributeSupportedByName('currentHue'))
3436
- attributes += `Hue: ${Math.round(clusterServer.getCurrentHueAttribute())} Saturation: ${Math.round(clusterServer.getCurrentSaturationAttribute())}% `;
3437
- if (clusterServer.name === 'ColorControl' && clusterServer.isAttributeSupportedByName('colorTemperatureMireds'))
3438
- attributes += `ColorTemp: ${Math.round(clusterServer.getColorTemperatureMiredsAttribute())} `;
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())} `;
3439
3456
  if (clusterServer.name === 'BooleanState')
3440
- attributes += `Contact: ${clusterServer.getStateValueAttribute()} `;
3441
- if (clusterServer.name === 'BooleanStateConfiguration' && clusterServer.isAttributeSupportedByName('alarmsActive'))
3442
- attributes += `Active alarms: ${stringify(clusterServer.getAlarmsActiveAttribute())} `;
3443
- if (clusterServer.name === 'SmokeCoAlarm' && clusterServer.isAttributeSupportedByName('smokeState'))
3444
- attributes += `Smoke: ${clusterServer.getSmokeStateAttribute()} `;
3445
- if (clusterServer.name === 'SmokeCoAlarm' && clusterServer.isAttributeSupportedByName('coState'))
3446
- attributes += `Co: ${clusterServer.getCoStateAttribute()} `;
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()} `;
3447
3464
  if (clusterServer.name === 'FanControl')
3448
- attributes += `Mode: ${clusterServer.getFanModeAttribute()} Speed: ${clusterServer.getPercentCurrentAttribute()} `;
3449
- if (clusterServer.name === 'FanControl' && clusterServer.isAttributeSupportedByName('speedCurrent'))
3450
- attributes += `MultiSpeed: ${clusterServer.getSpeedCurrentAttribute()} `;
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()} `;
3451
3468
  if (clusterServer.name === 'OccupancySensing')
3452
- attributes += `Occupancy: ${clusterServer.getOccupancyAttribute().occupied} `;
3469
+ attributes += `Occupancy: ${clusterServer.attributes.occupancy.getLocal().occupied} `;
3453
3470
  if (clusterServer.name === 'IlluminanceMeasurement')
3454
- attributes += `Illuminance: ${clusterServer.getMeasuredValueAttribute()} `;
3471
+ attributes += `Illuminance: ${clusterServer.attributes.measuredValue.getLocal()} `;
3455
3472
  if (clusterServer.name === 'AirQuality')
3456
- attributes += `Air quality: ${clusterServer.getAirQualityAttribute()} `;
3473
+ attributes += `Air quality: ${clusterServer.attributes.airQuality.getLocal()} `;
3457
3474
  if (clusterServer.name === 'TvocMeasurement')
3458
- attributes += `Voc: ${clusterServer.getMeasuredValueAttribute()} `;
3475
+ attributes += `Voc: ${clusterServer.attributes.measuredValue.getLocal()} `;
3459
3476
  if (clusterServer.name === 'TemperatureMeasurement')
3460
- attributes += `Temperature: ${clusterServer.getMeasuredValueAttribute() / 100}°C `;
3477
+ attributes += `Temperature: ${clusterServer.attributes.measuredValue.getLocal() / 100}°C `;
3461
3478
  if (clusterServer.name === 'RelativeHumidityMeasurement')
3462
- attributes += `Humidity: ${clusterServer.getMeasuredValueAttribute() / 100}% `;
3479
+ attributes += `Humidity: ${clusterServer.attributes.measuredValue.getLocal() / 100}% `;
3463
3480
  if (clusterServer.name === 'PressureMeasurement')
3464
- attributes += `Pressure: ${clusterServer.getMeasuredValueAttribute()} `;
3481
+ attributes += `Pressure: ${clusterServer.attributes.measuredValue.getLocal()} `;
3465
3482
  if (clusterServer.name === 'FlowMeasurement')
3466
- attributes += `Flow: ${clusterServer.getMeasuredValueAttribute()} `;
3483
+ attributes += `Flow: ${clusterServer.attributes.measuredValue.getLocal()} `;
3467
3484
  if (clusterServer.name === 'FixedLabel')
3468
3485
  attributes += `${stringifyFixedLabel(device)} `;
3486
+ if (clusterServer.name === 'UserLabel')
3487
+ attributes += `${stringifyUserLabel(device)} `;
3488
+ // this.log.debug(`*--clusterServer: ${clusterServer.id} (${clusterServer.name})`);
3469
3489
  }
3470
3490
  catch (error) {
3471
3491
  this.log.error(`getClusterTextFromDevice with ${clusterServer.name} error: ${error}`);
3472
3492
  }
3473
3493
  });
3494
+ // this.log.debug(`*getClusterTextFromDevice: ${device.deviceName} (${device.name})`);
3474
3495
  return attributes;
3475
3496
  }
3476
3497
  /**