matterbridge-zigbee2mqtt 3.0.3-dev-20251211-d87d63c → 3.0.3-dev-20251211-b4188c4

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/README.md CHANGED
@@ -23,43 +23,25 @@ No cloud: all is local and fast.
23
23
 
24
24
  Interested in super fast and autonomous **[automations for zigbee2mqtt](https://github.com/Luligu/zigbee2mqtt-automations)**? Try this: https://github.com/Luligu/zigbee2mqtt-automations.
25
25
 
26
- If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-zigbee2mqtt and sponsoring it.
26
+ If you like this project and find it useful, please consider giving it a star on [GitHub](https://github.com/Luligu/matterbridge-zigbee2mqtt) and sponsoring it.
27
27
 
28
- <a href="https://www.buymeacoffee.com/luligugithub">
29
- <img src="bmc-button.svg" alt="Buy me a coffee" width="120">
30
- </a>
28
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
31
29
 
32
30
  ## Introduction
33
31
 
34
32
  Matterbridge enables non-Matter devices (Zigbee devices) to integrate with the Matter communication protocol. Bridges allow platforms that use other protocol standards to interoperate with the Matter ecosystem by integrating a Matter server into, or between, existing smart gateways, controllers, and hubs. Many commercial smart gateways provide a built-in Matter bridge that translates Matter to Zigbee or other protocols, making it possible for other ecosystems to communicate with them.
35
33
 
36
- The Matterbridge zigbee2mqtt plugin acts as a Matter Bridge, exposing all Zigbee devices and groups from [Zigbee2MQTT](https://github.com/Koenkk/zigbee2mqtt/blob/master/README.md) as Matter devices to third-party Matter controllers like Apple Home, Google Home, Amazon Alexa, and SmartThings, all while remaining local on the user's network. This allows fast, secure, and cloud-free control of Zigbee2MQTT-connected Zigbee devices from all major voice assistants as well as other third-party Matter clients.
34
+ The Matterbridge zigbee2mqtt plugin acts as a Matter Bridge, exposing all Zigbee devices, groups and scenes from [Zigbee2MQTT](https://github.com/Koenkk/zigbee2mqtt/blob/master/README.md) as Matter devices to third-party Matter controllers like Apple Home, Google Home, Amazon Alexa, and SmartThings, all while remaining local on the user's network. This allows fast, secure, and cloud-free control of Zigbee2MQTT-connected Zigbee devices from all major voice assistants as well as other third-party Matter clients.
37
35
 
38
36
  ## Prerequisites
39
37
 
40
38
  ### Matterbridge
41
39
 
42
- Follow these steps to install or update Matterbridge if it is not already installed and up to date:
43
-
44
- on Windows:
45
-
46
- ```
47
- npm install -g matterbridge --omit=dev
48
- ```
49
-
50
- on Linux and macOS (you need the necessary permissions):
51
-
52
- ```
53
- sudo npm install -g matterbridge --omit=dev
54
- ```
55
-
56
- See the complete guidelines on [Matterbridge](https://github.com/Luligu/matterbridge/blob/main/README.md) for more information.
40
+ See the guidelines on [Matterbridge](https://matterbridge.io/README.html) for more information.
57
41
 
58
42
  ### Zigbee2mqtt
59
43
 
60
- A fully working installation of zigbee2MQTT is required.
61
-
62
- See the guidelines on [zigbee2mqtt](https://github.com/Koenkk/zigbee2mqtt/blob/master/README.md) for more information.
44
+ See the guidelines on [zigbee2mqtt](https://www.zigbee2mqtt.io/) for more information.
63
45
 
64
46
  ## How to install the plugin
65
47
 
@@ -300,6 +282,68 @@ If one of your devices is not supported out of the box, open an issue and we wil
300
282
 
301
283
  ![See the screenshot here](https://github.com/Luligu/matterbridge-zigbee2mqtt/blob/main/screenshot/Smart%20button.png)
302
284
 
285
+ ## Unix socket (Linux only)
286
+
287
+ ### Create the directory for the socket
288
+
289
+ ```bash
290
+ # Create the directory for the Unix socket if it doesn't exist
291
+ sudo mkdir -p /var/run/mosquitto
292
+
293
+ # Make sure the mosquitto user can access the socket
294
+ sudo chown mosquitto:mosquitto /var/run/mosquitto
295
+
296
+ # Allow group users (e.g. matterbridge) to access the socket
297
+ sudo chmod 750 /var/run/mosquitto
298
+
299
+ # Optional: Add your user to the mosquitto group to access the socket without sudo
300
+ # sudo usermod -aG mosquitto $USER
301
+
302
+ # If matterbridge runs like user matterbridge, add the matterbridge user to the mosquitto group to access the socket without sudo
303
+ # sudo usermod -aG mosquitto matterbridge
304
+ ```
305
+
306
+ Log out and back in after running usermod -aG for the group changes to take effect.
307
+
308
+ ```bash
309
+ # Check the appropriate permissions for the directory
310
+ sudo -u mosquitto ls -ld /var/run/mosquitto
311
+ sudo -u mosquitto ls -l /var/run/mosquitto/mqtt.sock
312
+ ```
313
+
314
+ ### Configure mosquitto to use Unix socket
315
+
316
+ Add this to your mosquitto.conf
317
+
318
+ ```
319
+ # Unix socket listener
320
+ listener 0 /var/run/mosquitto/mqtt.sock
321
+ protocol mqtt
322
+ allow_anonymous false
323
+ ```
324
+
325
+ Restart mosquitto.
326
+
327
+ ```bash
328
+ sudo systemctl restart mosquitto
329
+ ```
330
+
331
+ ### Configure docker to use Unix socket
332
+
333
+ Add the unix socket volume for each service using it (i.e. mosquitto, zigbee2mqtt and matterbridge).
334
+
335
+ ```
336
+ volumes:
337
+ # Share the same run directory (anonymous volume)
338
+ - /var/run/mosquitto
339
+ ```
340
+
341
+ Docker does NOT bind the host directory /var/run/mosquitto.
342
+
343
+ That internal volume lives inside Docker’s own storage, not on your host filesystem.
344
+
345
+ Because of this, there is no need to create /var/run/mosquitto on the host.
346
+
303
347
  # Known issues
304
348
 
305
349
  For general controller issues check the Matterbridge Known issues section
package/dist/module.js CHANGED
@@ -97,7 +97,7 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
97
97
  this.z2m.setLogDebug(config.debug);
98
98
  this.z2m.setDataPath(path.join(matterbridge.matterbridgePluginDirectory, 'matterbridge-zigbee2mqtt'));
99
99
  if (isValidString(this.mqttHost) && isValidNumber(this.mqttPort, 1, 65535)) {
100
- this.log.info(`Connecting to MQTT broker: ${this.mqttHost + ':' + this.mqttPort.toString()}`);
100
+ this.log.info(`Connecting to MQTT broker: ${this.z2m.getUrl()}`);
101
101
  this.z2m.start();
102
102
  }
103
103
  else {
@@ -17,12 +17,12 @@
17
17
  "ui:widget": "hidden"
18
18
  },
19
19
  "host": {
20
- "description": "MQTT server host (IP address or hostname with mqtt:// or mqtts:// prefix) or unix://<SOCKET_PATH> for Unix socket on Linux (e.g. unix:///var/run/mqtt.sock). For secure connections, use the mqtts:// prefix and ensure your certificates are configured. If you use a hostname, make sure that the hostname is resolvable by the system running matterbridge.",
20
+ "description": "MQTT server host (IP address or hostname with mqtt:// or mqtts:// prefix) or unix://<SOCKET_PATH> for Unix socket on Linux (e.g. unix:///var/run/mosquitto/mqtt.sock). For secure connections, use the mqtts:// prefix and ensure your certificates are configured. If you use a hostname, make sure that the hostname is resolvable by the system running matterbridge.",
21
21
  "type": "string",
22
22
  "default": "mqtt://localhost"
23
23
  },
24
24
  "port": {
25
- "description": "MQTT server port (i.e. 1883 for mqtt:// and 8883 for mqtts://).",
25
+ "description": "MQTT server port (i.e. 1883 for mqtt:// and 8883 for mqtts://). For Unix socket, this value is ignored.",
26
26
  "type": "number",
27
27
  "default": 1883
28
28
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-zigbee2mqtt",
3
- "version": "3.0.3-dev-20251211-d87d63c",
3
+ "version": "3.0.3-dev-20251211-b4188c4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-zigbee2mqtt",
9
- "version": "3.0.3-dev-20251211-d87d63c",
9
+ "version": "3.0.3-dev-20251211-b4188c4",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "moment": "2.30.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-zigbee2mqtt",
3
- "version": "3.0.3-dev-20251211-d87d63c",
3
+ "version": "3.0.3-dev-20251211-b4188c4",
4
4
  "description": "Matterbridge zigbee2mqtt plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",