matterbridge-zigbee2mqtt 2.1.19 → 2.2.0

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
@@ -4,7 +4,24 @@ If you like this project and find it useful, please consider giving it a star on
4
4
 
5
5
  All notable changes to this project will be documented in this file.
6
6
 
7
- ## [2.1.19] - 2024-30-01
7
+ ## [2.2.0] - 2024-10-10
8
+
9
+ ### Added
10
+
11
+ - [groups]: Refactor the group to support also covers.
12
+
13
+ ### Changed
14
+
15
+ - [matterbridge]: Removed EveHistory energy measurement in favor of Matter 1.3 ElectricalPowerMeasurement and ElectricalEnergyMeasurement (supported by Home Assistant from version 2024.10).
16
+ - [matterbridge]: Updated to new child endpoints MatterbridgeDevice methods.
17
+ - [entity]: Code optimization.
18
+ - [package]: Updated dependencies.
19
+
20
+ <a href="https://www.buymeacoffee.com/luligugithub">
21
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
22
+ </a>
23
+
24
+ ## [2.1.19] - 2024-10-01
8
25
 
9
26
  ### Changed
10
27
 
package/README.md CHANGED
@@ -45,9 +45,13 @@ A fully working installation of zigbee2MQTT is required.
45
45
 
46
46
  See the guidelines on [zigbee2mqtt](https://github.com/Koenkk/zigbee2mqtt/blob/master/README.md) for more information.
47
47
 
48
- ## How to install
48
+ ## How to install the plugin
49
49
 
50
- ### If you want to use the plugin
50
+ ### With the frontend (preferred method)
51
+
52
+ Just open the frontend, select the matterbridge-zigbee2mqtt plugin and click on install. If you are using Matterbridge with Docker (I suggest you do it), all plugins are already loaded in the container so you just need to select and add it.
53
+
54
+ ### Without the frontend
51
55
 
52
56
  On windows:
53
57
 
@@ -68,10 +72,10 @@ matterbridge -add matterbridge-zigbee2mqtt
68
72
  Then start Matterbridge
69
73
 
70
74
  ```
71
- matterbridge -bridge
75
+ matterbridge
72
76
  ```
73
77
 
74
- ### If you want to contribute to the plugin
78
+ ## If you want to contribute to the plugin
75
79
 
76
80
  On windows:
77
81
 
package/dist/entity.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * @file entity.ts
5
5
  * @author Luca Liguori
6
6
  * @date 2023-12-29
7
- * @version 2.1.1
7
+ * @version 3.0.1
8
8
  *
9
9
  * Copyright 2023, 2024 Luca Liguori.
10
10
  *
@@ -20,7 +20,7 @@
20
20
  * See the License for the specific language governing permissions and
21
21
  * limitations under the License. *
22
22
  */
23
- import { DeviceTypeDefinition, MatterbridgeDevice, ClusterId, Endpoint, AtLeastOne, AttributeInitialValues } from 'matterbridge';
23
+ import { DeviceTypeDefinition, MatterbridgeDevice, ClusterId, Endpoint, AtLeastOne } from 'matterbridge';
24
24
  import { AnsiLogger } from 'matterbridge/logger';
25
25
  import EventEmitter from 'events';
26
26
  import { ZigbeePlatform } from './platform.js';
@@ -44,8 +44,14 @@ export declare class ZigbeeEntity extends EventEmitter {
44
44
  private lastSeen;
45
45
  protected ignoreFeatures: string[];
46
46
  protected transition: boolean;
47
+ protected propertyMap: Map<string, {
48
+ name: string;
49
+ type: string;
50
+ endpoint: string;
51
+ action?: string;
52
+ }>;
47
53
  constructor(platform: ZigbeePlatform, entity: BridgeDevice | BridgeGroup);
48
- protected updateAttributeIfChanged(endpoint: Endpoint, endpointName: string | undefined, clusterId: number, attributeName: string, value: PayloadValue, lookup?: string[]): void;
54
+ protected updateAttributeIfChanged(rootEndpoint: Endpoint, endpointName: string | undefined, clusterId: number, attributeName: string, value: PayloadValue, lookup?: string[]): void;
49
55
  protected publishCommand(command: string, entityName: string, payload: Payload): void;
50
56
  }
51
57
  export declare class ZigbeeGroup extends ZigbeeEntity {
@@ -70,32 +76,6 @@ export declare class BridgedBaseDevice extends MatterbridgeDevice {
70
76
  isRouter: boolean;
71
77
  noUpdate: boolean;
72
78
  constructor(entity: ZigbeeEntity, definition: AtLeastOne<DeviceTypeDefinition>, includeServerList?: ClusterId[], includeClientList?: ClusterId[]);
73
- /**
74
- * Adds BridgedDeviceBasicInformationCluster
75
- *
76
- * @protected
77
- * @param deviceName Name of the device
78
- * @param deviceSerial Serial of the device
79
- */
80
- protected addBridgedDeviceBasicInformationCluster(deviceName: string, vendorName: string, productName: string, deviceSerial: string): void;
81
- /**
82
- * Adds mandatory clusters to the device
83
- *
84
- * @protected
85
- * @param includeServerList List of clusters to include
86
- * @param attributeInitialValues Optional object with initial attribute values for automatically added clusters
87
- */
88
- protected addDeviceClusterServer(includeServerList?: ClusterId[], attributeInitialValues?: Record<ClusterId, AttributeInitialValues<any>>): void;
89
- /**
90
- * Adds mandatory client clusters to the device
91
- *
92
- * @protected
93
- * @param includeClientList List of clusters to include
94
- * @param attributeInitialValues Optional object with initial attribute values for automatically added clusters
95
- */
96
- protected addDeviceClusterClient(includeClientList?: ClusterId[], attributeInitialValues?: Record<ClusterId, AttributeInitialValues<any>>): void;
97
- addDeviceTypeAndClusterServer(deviceType: DeviceTypeDefinition, serverList: ClusterId[]): void;
98
- addChildDeviceTypeAndClusterServer(endpointName: string, deviceType: DeviceTypeDefinition, includeServerList: ClusterId[]): Endpoint;
99
79
  configure(): void;
100
80
  }
101
81
  //# sourceMappingURL=entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAEL,oBAAoB,EACpB,kBAAkB,EAiBlB,SAAS,EAMT,QAAQ,EACR,UAAU,EAIV,sBAAsB,EAWvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,UAAU,EAA2F,MAAM,qBAAqB,CAAC;AAI1I,OAAO,YAAY,MAAM,QAAQ,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1D,qBAAa,YAA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