matterbridge 3.1.0-dev-20250627-94e7f6e → 3.1.1-dev-20250629-f14b886

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
@@ -8,23 +8,34 @@ If you like this project and find it useful, please consider giving it a star on
8
8
  <img src="bmc-button.svg" alt="Buy me a coffee" width="120">
9
9
  </a>
10
10
 
11
- ## [3.1.0] - 2025-06-27
11
+ ## [3.1.1] - 2025-07-??
12
12
 
13
- ### Breaking Changes
13
+ ### Added
14
+
15
+ ### Changed
16
+
17
+ - [package]: Updated dependencies.
18
+
19
+ <a href="https://www.buymeacoffee.com/luligugithub">
20
+ <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
21
+ </a>
22
+
23
+ ## [3.1.0] - 2025-06-28
14
24
 
15
25
  ### Added
16
26
 
17
- - [DevContainer]: Added support for the **Matterbridge Dev Container** with an optimized named volume for `node_modules`.
27
+ - [DevContainer]: Added support for the [**Matterbridge Dev Container**](https://github.com/Luligu/matterbridge/blob/dev/README-DEV.md#matterbridge-dev-container) with an optimized named volume for `node_modules`.
28
+ - [DevContainer]: Added support for the [**Matterbridge Plugin Dev Container**](https://github.com/Luligu/matterbridge/blob/dev/README-DEV.md#matterbridge-plugin-dev-container) with an optimized named volume for `matterbridge` and `node_modules`.
18
29
  - [GitHub]: Added GitHub issue templates for bug reports and feature requests.
19
- - [Systemd]: Added a systemd service file for Matterbridge in the systemd directory.
30
+ - [Systemd]: Added a systemd service example file for Matterbridge in the systemd directory.
20
31
  - [ESLint]: Refactored ESLint configuration for TypeScript and improved plugin integration.
21
32
  - [ESLint]: Added the plugins `eslint-plugin-promise`, `eslint-plugin-jsdoc`, and `@vitest/eslint-plugin`.
22
- - [Vitest]: Added Vitest for TypeScript project testing. It will replace Jest, which does not work correctly with ESM module mocks.
33
+ - [Vitest]: Added `Vitest` for TypeScript project testing. It will replace Jest, which does not work correctly with ESM module mocks.
23
34
  - [JSDoc]: Added missing JSDoc comments, including `@param` and `@returns` tags.
24
- - [MatterbridgeEndpoint]: Add MatterbridgeEndpoint mode='server'. It allows to advertise a single device like an autonomous device with its server node to be paired.
25
- - [MatterbridgeEndpoint]: Add MatterbridgeEndpoint mode='matter'. It allows to add a single device to the Matterbridge server node next to the aggregator. The device is not bridged.
35
+ - [MatterbridgeEndpoint]: Add MatterbridgeEndpoint mode='server'. It allows to advertise a single device like an autonomous device with its server node to be paired. The device is not bridged (alpha stage).
36
+ - [MatterbridgeEndpoint]: Add MatterbridgeEndpoint mode='matter'. It allows to add a single device to the Matterbridge server node next to the aggregator. The device is not bridged (alpha stage).
26
37
  - [storage]: Improved error handling of corrupted storage.
27
- - [test]: Improved test units on Matterbridge classes.
38
+ - [test]: Improved test units on Matterbridge classes (coverage 91%).
28
39
 
29
40
  ### Changed
30
41
 
@@ -32,9 +43,7 @@ If you like this project and find it useful, please consider giving it a star on
32
43
  - [package]: Updated dependencies.
33
44
  - [storage]: Bumped `node-storage-manager` to 2.0.0.
34
45
  - [logger]: Bumped `node-ansi-logger` to 3.1.1.
35
- - [matter.js]: Updated to 0.15.0-alpha.0-20250625-c7634df96, 0.15.0-alpha.0-20250626-fc3a84ce9, and bumped to 0.15.0.
36
-
37
- ### Fixed
46
+ - [matter.js]: Bumped `matter.js` to 0.15.0 (https://github.com/project-chip/matter.js/discussions/2203). Great job matter.js!
38
47
 
39
48
  <a href="https://www.buymeacoffee.com/luligugithub">
40
49
  <img src="bmc-button.svg" alt="Buy me a coffee" width="80">
package/README-DEV.md CHANGED
@@ -28,7 +28,7 @@ The Matterbridge Plugin Template has an already configured Jest / Vitest test un
28
28
 
29
29
  It also has a workflow configured to run on push and pull request that build, lint and test the plugin on node 20, 22 and 24 with ubuntu, macOS and windows.
30
30
 
31
- ## Dev Container
31
+ ## Matterbridge Dev Container
32
32
 
33
33
  Using a Dev Container provides a fully isolated, reproducible, and pre-configured development environment. This ensures that all contributors have the same tools, extensions, and dependencies, eliminating "works on my machine" issues. It also makes onboarding new developers fast and hassle-free, as everything needed is set up automatically.
34
34
 
@@ -36,7 +36,19 @@ For improved efficiency, the setup uses named Docker volumes for `node_modules`.
36
36
 
37
37
  To start the Dev Container, simply open the project folder in [Visual Studio Code](https://code.visualstudio.com/) and, if prompted, click "Reopen in Container". Alternatively, use the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`), search for "Dev Containers: Reopen in Container", and select it. VS Code will automatically build and start the containerized environment for you.
38
38
 
39
- > **Note:** The first time you use the Dev Container, it may take a while to download all the required Docker images and set up the environment. Subsequent starts will be much faster.
39
+ > **Note:** The first time you use the Dev Container, it may take a while to download all the required Docker images and set up the environment. Subsequent starts will be as as fast as from the local folder.
40
+
41
+ Since Dev Container doesn't run in network mode 'host', it is not possible to pair Mattebridge running inside the Dev Container.
42
+
43
+ ## Matterbridge Plugin Dev Container
44
+
45
+ Using a Dev Container provides a fully isolated, reproducible, and pre-configured development environment. This ensures that all contributors have the same tools, extensions, and dependencies, eliminating "works on my machine" issues. It also makes onboarding new developers fast and hassle-free, as everything needed is set up automatically.
46
+
47
+ For improved efficiency, the setup uses named Docker volumes for `matterbridge` and `node_modules`. This means that the dev of matterbridge and the plugin dependencies are installed only once and persist across container rebuilds, making installs and rebuilds much faster than with bind mounts or ephemeral volumes.
48
+
49
+ To start the Dev Container, simply open the project folder in [Visual Studio Code](https://code.visualstudio.com/) and, if prompted, click "Reopen in Container". Alternatively, use the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`), search for "Dev Containers: Reopen in Container", and select it. VS Code will automatically build and start the containerized environment for you.
50
+
51
+ > **Note:** The first time you use the Dev Container, it may take a while to download all the required Docker images and set up the environment. Subsequent starts will be as fast as from the local folder.
40
52
 
41
53
  Since Dev Container doesn't run in network mode 'host', it is not possible to pair Mattebridge running inside the Dev Container.
42
54
 
@@ -1152,7 +1152,7 @@ export class Matterbridge extends EventEmitter {
1152
1152
  }
1153
1153
  }
1154
1154
  async createDeviceServerNode(plugin, device) {
1155
- if (device.mode === 'server' && !device.serverNode && device.deviceType && device.deviceName && device.vendorId && device.productId && device.vendorName && device.productName) {
1155
+ if (device.mode === 'server' && !device.serverNode && device.deviceType && device.deviceName && device.vendorId && device.vendorName && device.productId && device.productName) {
1156
1156
  this.log.debug(`Creating device ${plg}${plugin.name}${db}:${dev}${device.deviceName}${db} server node...`);
1157
1157
  device.serverContext = await this.createServerNodeContext(device.deviceName.replace(/[ .]/g, ''), device.deviceName, DeviceTypeId(device.deviceType), device.vendorId, device.vendorName, device.productId, device.productName);
1158
1158
  device.serverNode = await this.createServerNode(device.serverContext, this.port ? this.port++ : undefined, this.passcode ? this.passcode++ : undefined, this.discriminator ? this.discriminator++ : undefined);
@@ -1229,7 +1229,7 @@ export class Matterbridge extends EventEmitter {
1229
1229
  for (const device of this.devices.array()) {
1230
1230
  if (device.mode === 'server' && device.serverNode) {
1231
1231
  this.log.debug(`Starting server node for device ${dev}${device.deviceName}${db} in server mode...`);
1232
- await this.startServerNode(device.serverNode);
1232
+ this.startServerNode(device.serverNode);
1233
1233
  }
1234
1234
  }
1235
1235
  this.configureTimeout = setTimeout(async () => {
@@ -1342,8 +1342,8 @@ export class Matterbridge extends EventEmitter {
1342
1342
  }
1343
1343
  for (const device of this.devices.array()) {
1344
1344
  if (device.mode === 'server' && device.serverNode) {
1345
- this.log.debug(`***Starting server node for device ${plg}${device.deviceName}${db} in server mode...`);
1346
- await this.startServerNode(device.serverNode);
1345
+ this.log.debug(`Starting server node for device ${dev}${device.deviceName}${db} in server mode...`);
1346
+ this.startServerNode(device.serverNode);
1347
1347
  }
1348
1348
  }
1349
1349
  this.emit('childbridge_started');
@@ -1725,10 +1725,17 @@ export class Matterbridge extends EventEmitter {
1725
1725
  try {
1726
1726
  this.log.debug(`Creating endpoint ${dev}${device.deviceName}${db} for AccessoryPlatform plugin ${plg}${plugin.name}${db} server node`);
1727
1727
  if (plugin.serverNode) {
1728
- this.log.error(`The plugin ${plg}${plugin.name}${er} has already added a device. Only one device is allowed per AccessoryPlatform plugin.`);
1729
- return;
1728
+ if (device.mode === 'matter') {
1729
+ await plugin.serverNode.add(device);
1730
+ }
1731
+ else {
1732
+ this.log.error(`The plugin ${plg}${plugin.name}${er} has already added a device. Only one device is allowed per AccessoryPlatform plugin.`);
1733
+ return;
1734
+ }
1735
+ }
1736
+ else {
1737
+ await this.createAccessoryPlugin(plugin, device);
1730
1738
  }
1731
- await this.createAccessoryPlugin(plugin, device);
1732
1739
  }
1733
1740
  catch (error) {
1734
1741
  const errorMessage = error instanceof Error ? error.message : error;
@@ -155,7 +155,7 @@ export class MatterbridgeEndpoint extends Endpoint {
155
155
  else
156
156
  this.deviceTypes.set(firstDefinition.code, firstDefinition);
157
157
  this.log = new AnsiLogger({ logName: options.uniqueStorageKey ?? 'MatterbridgeEndpoint', logTimestampFormat: 4, logLevel: debug === true ? "debug" : MatterbridgeEndpoint.logLevel });
158
- this.log.debug(`${YELLOW}new${db} MatterbridgeEndpoint: ${zb}${'0x' + firstDefinition.code.toString(16).padStart(4, '0')}${db}-${zb}${firstDefinition.name}${db} id: ${CYAN}${options.uniqueStorageKey}${db} number: ${CYAN}${options.endpointId}${db} taglist: ${CYAN}${options.tagList ? debugStringify(options.tagList) : 'undefined'}${db}`);
158
+ this.log.debug(`${YELLOW}new${db} MatterbridgeEndpoint: ${zb}${'0x' + firstDefinition.code.toString(16).padStart(4, '0')}${db}-${zb}${firstDefinition.name}${db} mode: ${CYAN}${this.mode}${db} id: ${CYAN}${optionsV8.id}${db} number: ${CYAN}${optionsV8.number}${db} taglist: ${CYAN}${options.tagList ? debugStringify(options.tagList) : 'undefined'}${db}`);
159
159
  this.behaviors.require(MatterbridgeServer, { log: this.log, commandHandler: this.commandHandler });
160
160
  }
161
161
  static async loadInstance(definition, options = {}, debug = false) {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge",
3
- "version": "3.1.0-dev-20250627-94e7f6e",
3
+ "version": "3.1.1-dev-20250629-f14b886",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge",
9
- "version": "3.1.0-dev-20250627-94e7f6e",
9
+ "version": "3.1.1-dev-20250629-f14b886",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@matter/main": "0.15.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge",
3
- "version": "3.1.0-dev-20250627-94e7f6e",
3
+ "version": "3.1.1-dev-20250629-f14b886",
4
4
  "description": "Matterbridge plugin manager for Matter",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",