matterbridge 3.1.1-dev-20250701-9281629 → 3.1.1-dev-20250703-80c685d

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
@@ -12,7 +12,8 @@ If you like this project and find it useful, please consider giving it a star on
12
12
 
13
13
  ### Development Breaking Changes
14
14
 
15
- - [devices]: The single devices (i.e. Rvc, Evse etc...) are only exported from matterbridge/devices. Please update your imports to use the new export path. Refer to the [documentation](README-DEV.md) for details on imports.
15
+ - [devices]: The single devices (i.e. Rvc, Evse etc...) are only exported from `matterbridge/devices`. Please update your imports to use the new export path. Refer to the [documentation](README-DEV.md) for details on imports.
16
+ - [MatterbridgeEndpoint]: Added the mode property: `server` will make the device indipendent from its plugin. It has its own server node: QRCode, Fabrics and Sessions are visible in the Devices section of the Home page. This a workaround for the Rvc Apple issue. So the Rvc (like any other device) can be paired directly to the controller and is a native Matter device and is not bridged.
16
17
 
17
18
  ### Added
18
19
 
package/dist/frontend.js CHANGED
@@ -566,6 +566,8 @@ export class Frontend {
566
566
  return false;
567
567
  if (device.hasClusterServer(BridgedDeviceBasicInformation.Cluster.id))
568
568
  return device.getAttribute(BridgedDeviceBasicInformation.Cluster.id, 'reachable');
569
+ if (device.mode === 'server' && device.serverNode && device.serverNode.state.basicInformation.reachable !== undefined)
570
+ return device.serverNode.state.basicInformation.reachable;
569
571
  if (this.matterbridge.bridgeMode === 'childbridge')
570
572
  return true;
571
573
  return false;
@@ -592,6 +594,17 @@ export class Frontend {
592
594
  return powerSource(child);
593
595
  }
594
596
  }
597
+ getMatterDataFromDevice(device) {
598
+ if (device.mode === 'server' && device.serverNode && device.serverContext) {
599
+ return {
600
+ commissioned: device.serverNode.state.commissioning.commissioned,
601
+ qrPairingCode: device.serverNode.state.commissioning.pairingCodes.qrPairingCode,
602
+ manualPairingCode: device.serverNode.state.commissioning.pairingCodes.manualPairingCode,
603
+ fabricInformations: this.matterbridge.sanitizeFabricInformations(Object.values(device.serverNode.state.commissioning.fabrics)),
604
+ sessionInformations: this.matterbridge.sanitizeSessionInformation(Object.values(device.serverNode.state.sessions.sessions)),
605
+ };
606
+ }
607
+ }
595
608
  getClusterTextFromDevice(device) {
596
609
  if (!device.lifecycle.isReady || device.construction.status !== Lifecycle.Status.Active)
597
610
  return '';
@@ -766,12 +779,11 @@ export class Frontend {
766
779
  }
767
780
  async getDevices(pluginName) {
768
781
  const devices = [];
769
- this.matterbridge.devices.forEach(async (device) => {
782
+ for (const device of this.matterbridge.devices.array()) {
770
783
  if (pluginName && pluginName !== device.plugin)
771
- return;
784
+ continue;
772
785
  if (!device.plugin || !device.deviceType || !device.name || !device.deviceName || !device.serialNumber || !device.uniqueId || !device.lifecycle.isReady)
773
- return;
774
- const cluster = this.getClusterTextFromDevice(device);
786
+ continue;
775
787
  devices.push({
776
788
  pluginName: device.plugin,
777
789
  type: device.name + ' (0x' + device.deviceType.toString(16).padStart(4, '0') + ')',
@@ -783,9 +795,10 @@ export class Frontend {
783
795
  uniqueId: device.uniqueId,
784
796
  reachable: this.getReachability(device),
785
797
  powerSource: this.getPowerSource(device),
786
- cluster: cluster,
798
+ matter: this.getMatterDataFromDevice(device),
799
+ cluster: this.getClusterTextFromDevice(device),
787
800
  });
788
- });
801
+ }
789
802
  return devices;
790
803
  }
791
804
  getClusters(pluginName, endpointNumber) {
@@ -1849,8 +1849,8 @@ export class Matterbridge extends EventEmitter {
1849
1849
  };
1850
1850
  });
1851
1851
  }
1852
- sanitizeSessionInformation(session) {
1853
- return session
1852
+ sanitizeSessionInformation(sessions) {
1853
+ return sessions
1854
1854
  .filter((session) => session.isPeerActive)
1855
1855
  .map((session) => {
1856
1856
  return {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "files": {
3
3
  "main.css": "./static/css/main.944b63c3.css",
4
- "main.js": "./static/js/main.42525fab.js",
4
+ "main.js": "./static/js/main.1d25e0d8.js",
5
5
  "static/js/453.d855a71b.chunk.js": "./static/js/453.d855a71b.chunk.js",
6
6
  "static/media/roboto-latin-700-normal.woff2": "./static/media/roboto-latin-700-normal.c4d6cab43bec89049809.woff2",
7
7
  "static/media/roboto-latin-500-normal.woff2": "./static/media/roboto-latin-500-normal.599f66a60bdf974e578e.woff2",
@@ -77,11 +77,11 @@
77
77
  "static/media/roboto-greek-ext-300-normal.woff": "./static/media/roboto-greek-ext-300-normal.60729cafbded24073dfb.woff",
78
78
  "index.html": "./index.html",
79
79
  "main.944b63c3.css.map": "./static/css/main.944b63c3.css.map",
80
- "main.42525fab.js.map": "./static/js/main.42525fab.js.map",
80
+ "main.1d25e0d8.js.map": "./static/js/main.1d25e0d8.js.map",
81
81
  "453.d855a71b.chunk.js.map": "./static/js/453.d855a71b.chunk.js.map"
82
82
  },
83
83
  "entrypoints": [
84
84
  "static/css/main.944b63c3.css",
85
- "static/js/main.42525fab.js"
85
+ "static/js/main.1d25e0d8.js"
86
86
  ]
87
87
  }
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.42525fab.js"></script><link href="./static/css/main.944b63c3.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.1d25e0d8.js"></script><link href="./static/css/main.944b63c3.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>