matterbridge-zigbee2mqtt 2.0.5 → 2.0.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/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [2.0.7] - 2024-04-11
6
+
7
+ ### Added
8
+ - [config.featureBlackList] z2m features with name in the list will be ignored (e.g. device_temperature) (https://github.com/nitaybz).
9
+ - [config.switchList] Device with friendly name in the list will be exposed like switch.
10
+ - [config.lightList] Device with friendly name in the list will be exposed like light.
11
+ - [config.outletList] Devices with friendly name in the list will be exposed like outlet.
12
+
13
+ ### Fixed
14
+
15
+ - [payload]: Fixed the case when z2m sends null or undefined in the payload (https://github.com/khaidakin).
16
+
17
+ ## [2.0.6] - 2024-04-09
18
+
19
+ ### Added
20
+ - [electrical] Added support for voltage current power energy (right now they show up only in Home Assistant)
21
+ - [multiendpoint]: Added the support for electrical measurements and temperature (thanks https://github.com/khaidakin).
22
+
23
+ ### Changed
24
+ - [discovery]: Refactored the zigbee2mqtt discovery: now multi endpoints devices (mostly DIY devices) are supported.
25
+
5
26
  ## [2.0.5] - 2024-04-01
6
27
 
7
28
  ### Added
package/README.md CHANGED
@@ -11,16 +11,32 @@
11
11
 
12
12
  ---
13
13
 
14
- Matterbridge zigbee2mqtt is production-level plugin that expose all zigbee2mqtt devices and groups to Matter.
14
+ Matterbridge zigbee2mqtt is a matterbridge production-level plugin that expose all zigbee2mqtt devices and groups to Matter.
15
+
16
+ No hub or dedicated hardware needed.
15
17
 
16
18
  ## Prerequisites
17
19
 
18
20
  ### Matterbridge
19
21
 
20
- See the guidelines on [Matterbridge](https://github.com/Luligu/matterbridge/blob/main/README.md) for more information.
22
+ Follow these steps to install or update Matterbridge if it is not already installed and up to date:
23
+
24
+ on Windows:
25
+ ```
26
+ npm install -g matterbridge
27
+ ```
28
+
29
+ on Linux (you need the necessary permissions):
30
+ ```
31
+ sudo npm install -g matterbridge
32
+ ```
33
+
34
+ See the complete guidelines on [Matterbridge](https://github.com/Luligu/matterbridge/blob/main/README.md) for more information.
21
35
 
22
36
  ### Zigbee2mqtt
23
37
 
38
+ A fully working installation of zigbee2MQTT is required.
39
+
24
40
  See the guidelines on [zigbee2mqtt](https://github.com/Koenkk/zigbee2mqtt/blob/master/README.md) for more information.
25
41
 
26
42
  ## How to install
@@ -41,6 +57,10 @@ sudo npm install -g matterbridge-zigbee2mqtt
41
57
  matterbridge -add matterbridge-zigbee2mqtt
42
58
  ```
43
59
 
60
+ Then start Matterbridge
61
+ ```
62
+ matterbridge -bridge
63
+ ```
44
64
 
45
65
  ### If you want to contribute to the plugin
46
66
 
@@ -64,6 +84,11 @@ npm run build
64
84
  matterbridge -add ./
65
85
  ```
66
86
 
87
+ Then start Matterbridge
88
+ ```
89
+ matterbridge -bridge
90
+ ```
91
+
67
92
  # Config file
68
93
 
69
94
  If needed you can configure the mqtt host, port, topic, username and password.
@@ -87,7 +112,11 @@ These are the default vules:
87
112
  "username": "",
88
113
  "password": "",
89
114
  "whiteList": [],
90
- "blackList": []
115
+ "blackList": [],
116
+ "switchList": [],
117
+ "lightList": [],
118
+ "outletList": [],
119
+ "featureBlackList": []
91
120
  }
92
121
  ```
93
122
 
@@ -105,10 +134,32 @@ cd ~/.matterbridge
105
134
  nano matterbridge-zigbee2mqtt.config.json
106
135
  ```
107
136
 
137
+ # Frequently Asked Questions
138
+
139
+ ## What is supported?
140
+
141
+ Out of the box, this plugin supports all possible conversion from zigbee2mqtt to Matter 1.1.
142
+
143
+ The latest release also supports all clusters in the multi endpoints devices (e.g. DIY devices or the double channel switches/dimmers).
144
+
145
+ Since the Matter support in the available ecosystems (controllers) is very limited and, when available, only covers Matter 1.1 specifications, some z2m devices cannot be exposed properly or cannot be exposed at all.
146
+
147
+ We discoverd that Matter support in Home Assistant is instead advanced and includes some clusters not supported by other ecosystems. These clusters like EveHistory have been added so with HA you can see Voltage, Current, Consumption and TotalConsumption (screenshot https://github.com/Luligu/matterbridge/blob/main/screenshot/Screenshot%20HA%20sm-dc-power-m.png).
148
+ ## Unsupported devices
149
+
150
+ If one of your devices is not supported out of the box, open an issue and we will try to support it if possible.
151
+
108
152
  # Known issues
109
153
 
110
154
  ## Conversion issues between zigbee2MQTT and Matter ecosystems
111
155
 
112
- ### action
113
- The action feature of zigbee is translated in a Matter momentary Switch but due to a bug in matter.js the events are not trasmitted to the controller.
156
+ ### action (scene buttons)
157
+ The action feature of z2m is translated in a Matter momentary Switch but due to a bug in matter.js the events are not trasmitted to the controller. These devices (like the Aqara WXKG11LM) show up, but they cannot always send the actions (events) to the controller. The fix has already been merged to matter.js. It will be available in the next matter.js release.
158
+
159
+ ## Apple Home issues
160
+
161
+ ### DoorLock
162
+ The DoorLock cluster in the Home app takes a while to get online. The Home app shows no response for 1 or 2 seconds but then the accessory goes online.
163
+
164
+ ## Home Assistant issues (Matter Server for HA is still in Beta)
114
165
 
package/TODO.md ADDED
@@ -0,0 +1,3 @@
1
+ - Done! All clusters in child endpoint
2
+ - All command handlers with child endpoints support
3
+
package/dist/entity.d.ts CHANGED
@@ -21,14 +21,14 @@
21
21
  * limitations under the License. *
22
22
  */
23
23
  /// <reference types="node" resolution-mode="require"/>
24
- import { DeviceTypeDefinition, MatterbridgeDevice, ClusterId, AtLeastOne, EndpointNumber } from 'matterbridge';
24
+ import { DeviceTypeDefinition, MatterbridgeDevice, ClusterId, Endpoint, AtLeastOne, EndpointNumber } from 'matterbridge';
25
25
  import { AnsiLogger } from 'node-ansi-logger';
26
26
  import { ZigbeePlatform } from './platform.js';
27
27
  import { BridgeDevice, BridgeGroup } from './zigbee2mqttTypes.js';
28
28
  import { Payload } from './payloadTypes.js';
29
29
  import EventEmitter from 'events';
30
30
  export declare class ZigbeeEntity extends EventEmitter {
31
- protected log: AnsiLogger;
31
+ log: AnsiLogger;
32
32
  protected platform: ZigbeePlatform;
33
33
  device: BridgeDevice | undefined;
34
34
  group: BridgeGroup | undefined;
@@ -38,7 +38,9 @@ export declare class ZigbeeEntity extends EventEmitter {
38
38
  protected en: string;
39
39
  protected ien: string;
40
40
  bridgedDevice: BridgedBaseDevice | undefined;
41
+ eidn: string;
41
42
  constructor(platform: ZigbeePlatform, entity: BridgeDevice | BridgeGroup);
43
+ protected updateAttributeIfChanged(endpoint: Endpoint, endpointName: string | undefined, clusterId: number, attributeName: string, value: any): void;
42
44
  protected publishCommand(command: string, entityName: string, payload: Payload): void;
43
45
  }
44
46
  export declare class ZigbeeGroup extends ZigbeeEntity {
@@ -48,6 +50,7 @@ export declare class ZigbeeDevice extends ZigbeeEntity {
48
50
  constructor(platform: ZigbeePlatform, device: BridgeDevice);
49
51
  }
50
52
  export declare class BridgedBaseDevice extends MatterbridgeDevice {
53
+ log: AnsiLogger;
51
54
  hasEndpoints: boolean;
52
55
  isRouter: boolean;
53
56
  noUpdate: boolean;
@@ -76,9 +79,9 @@ export declare class BridgedBaseDevice extends MatterbridgeDevice {
76
79
  * @param includeClientList List of clusters to include
77
80
  */
78
81
  protected addDeviceClusterClient(includeClientList?: ClusterId[]): void;
79
- addDeviceTypeAndClusterServer(deviceType: DeviceTypeDefinition, serverList: ClusterId[]): void;
80
- addChildDeviceTypeAndClusterServer(endpointName: string, state: string, deviceType: DeviceTypeDefinition, includeServerList: ClusterId[]): void;
81
- getChildStatePayload(endpointNumber: EndpointNumber | undefined, command: string): Payload;
82
+ addDeviceTypeAndClusterServer(deviceType: DeviceTypeDefinition | undefined, serverList: ClusterId[]): void;
83
+ addChildDeviceTypeAndClusterServer(endpointName: string, state: string, deviceType: DeviceTypeDefinition | undefined, includeServerList: ClusterId[]): Endpoint;
84
+ getChildPayload(endpointNumber: EndpointNumber | undefined, key: string, value: string): Payload;
82
85
  configure(): void;
83
86
  }
84
87
  //# sourceMappingURL=entity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../src/entity.ts"],"names":[],"mappings":"AAAA;;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