matterbridge-example-camera 1.0.0-dev-20261020-51dc08f → 1.0.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
@@ -30,51 +30,57 @@ If you like this project and find it useful, please consider giving it a star on
30
30
 
31
31
  <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
32
32
 
33
- ## [1.0.0] - Dev branch
33
+ ## [1.0.0] - 2026-10-23
34
34
 
35
35
  ### Breaking changes
36
36
 
37
- - [matterbridge]: Require matterbridge v.3.10.15 with matter v.1.6.0.
37
+ - [matterbridge]: Require matterbridge v.3.11.0 with matter v.1.6.1.
38
+ - [node]: Drop Node.js 20 support, matching matterbridge v.3.11.0. Supported versions are Node.js 22.13, 24 and 26.
38
39
  - [camera]: Use the matterbridge camera stack (`matterbridge/devices/camera`) and remove the local copy in `src/behaviors` and `src/devices` with its tests.
39
40
  - [config]: Pass the media options to the devices as `weriftOfferOptions` instead of the `MATTERBRIDGE_CAMERA_*` environment variables. The test audio is now a generated tone, and a `webcam`/`rtsp`/`microphone` generator without a source injects no track instead of falling back to the test source.
40
41
  - [config]: Default `videoGenerator` and `audioGenerator` to `test`, so live view and snapshots work out of the box (requires ffmpeg).
41
42
 
42
43
  ### Added
43
44
 
45
+ - [tls]: Add separate Matterbridge TLS Certificate Management and TLS Client Management servers on the Root Node, with explicit placeholder overrides for all commands. They do not implement TLS management or provide usable protocol responses yet.
44
46
  - [ffmpeg]: Add the `autoInstallFfmpeg` option (Docker only, enabled by default) and the `installFfmpeg` button, as in matterbridge-camera and matterbridge-webcam.
45
47
  - [timeSync]: Add `MatterbridgeTimeSynchronizationServer`, a Time Synchronization server backed by the host clock, and use it in `addRootNodeCamera`.
46
48
  - [devcontainer]: Add [`Dev Container`](.devcontainer/README.md) v.2.2.0 with dual Node and Bun runtime support.
47
49
  - [agents]: Add a [`shared setup`](.agents/README.md) for all agents: OpenAI Codex, Claude Code, GitHub Copilot and Google Gemini / Antigravity.
48
50
  - [agents]: Add [`commit message instructions`](.github/commit-message-instructions.md) v.1.0.0 for the VS Code Copilot "Generate Commit Message" button (Conventional Commits).
49
- - [scripts]: Add `scripts/bun-bundle.mjs` for Bun JavaScript and declaration bundles with workspace, production, watch and dry-run support.
51
+ - [agents]: Add the Copilot `Matterbridge` custom agent (`.github/agents/matterbridge.agent.md`) that works without subagents.
50
52
 
51
53
  ### Changed
52
54
 
55
+ - [package]: Run `checkDependencies` and `updateDependencies` with `npx npm-check-updates@latest`.
53
56
  - [package]: Update the `package.json` description to "Matterbridge example camera plugin".
54
57
  - [test]: Migrate tests from `matterbridge/vitest-utils` to the unified `matterbridge/test-utils`.
55
- - [workflows]: Build and test against the matterbridge `dev` branch (`automator.workflow`).
56
58
  - [webrtc]: Close the WebRTC sessions of the plugin devices on shutdown with `closeWebRtcSessions`.
57
59
  - [rootNode]: Set the first TimeZone entry with a ValidAt of 0 (the Matter epoch) as required, and allow 2 TimeZone and DSTOffset entries.
58
60
  - [chip]: Keep only the generic composition, conformance and default warnings tests in `chipTests.json`: the camera clusters are tested in matterbridge.
59
61
  - [styleguide]: Update [`STYLEGUIDE.md`](STYLEGUIDE.md) to v.1.1.0: align it with the lint and format config and add the Commit Messages and Changelog sections.
60
- - [vscode]: Update `.vscode/settings.json` to v.1.0.15: configure commit message instructions, exclude templates from Vitest discovery and refine terminal command approvals.
61
- - [agents]: Update `.antigravity/settings.json` to v.1.0.5: allow read-only Git commands.
62
+ - [vscode]: Update `.vscode/settings.json` to v.1.0.16: configure commit message instructions, exclude templates from Vitest discovery and refine terminal command approvals.
63
+ - [vscode]: Add Bundle, Minify, Obfuscate, Pack and Docker install tasks to `.vscode/tasks.json`.
64
+ - [agents]: Update `.claude/settings.json` to v.1.0.9, `.antigravity/settings.json` to v.1.0.6 and `.codex/rules/default.rules` to v.1.0.7.
65
+ - [agents]: Remove the repository-specific `localAgents.md` with its outdated Matter Specs section.
62
66
  - [gitignore]: Update `.gitignore` to v.1.0.5: ignore `tmp/`, `.DS_Store` and Windows `Zone.Identifier` files.
63
- - [lint]: Update `.oxlintrc.json` and `.oxfmtrc.json` to v.1.1.0: align shared ignore patterns.
64
- - [vitest]: Replace `vite.config.ts` with `vitest.config.ts` v.2.0.8 and update test and coverage exclusions.
67
+ - [lint]: Update `.oxlintrc.json` and `.oxfmtrc.json` to v.1.2.0: align shared ignore patterns.
68
+ - [vitest]: Replace `vite.config.ts` with `vitest.config.ts` v.2.0.9 and update test and coverage exclusions.
65
69
  - [scripts]: Update `scripts/clean.mjs` and `scripts/deep-clean.mjs` to v.2.0.0: log removed paths, add dry-run support and expose importable entry points.
66
70
  - [scripts]: Update release, download, Git status, Git sync, prepublish, pruning, workflow cleanup and version helpers to v.2.0.0 with CLI previews and importable entry points.
71
+ - [scripts]: Update `scripts/deep-clean.mjs` and `scripts/prepublish-clean.mjs` to v.2.1.0: also remove `tmp/` and `bun.lock`.
67
72
  - [package]: Remove unsupported npm flags from `bun link` in `softReset:bun`.
68
73
  - [package]: Upgrade package.
69
74
  - [package]: Bump `node-ansi-logger` to v.3.3.1.
70
75
  - [package]: Bump `node-persist-manager` to v.2.1.1.
71
- - [package]: Bump `oxfmt` to v.0.71.0.
72
- - [package]: Bump `oxlint` to v.1.86.0.
73
- - [package]: Bump `oxlint-tsgolint` to v.7.0.2003.
74
- - [package]: Bump `vitest` to v.5.0.3.
75
- - [package]: Bump `@vitest/coverage-v8` to v.5.0.3.
76
- - [package]: Bump `@types/node` to v.26.6.4.
76
+ - [package]: Bump `oxfmt` to v.0.74.0.
77
+ - [package]: Bump `oxlint` to v.1.89.0.
78
+ - [package]: Bump `oxlint-tsgolint` to v.7.0.2004.
79
+ - [package]: Bump `vitest` to v.5.0.5.
80
+ - [package]: Bump `@vitest/coverage-v8` to v.5.0.5.
81
+ - [package]: Bump `@types/node` to v.26.6.5.
77
82
  - [package]: Bump `typescript` to v.7.0.2.
83
+ - [package]: Remove the `werift` dependency: the camera stack now comes from matterbridge.
78
84
  - [camera]: Remove the temporary `ObjectSchema.injectField` workaround now that Matterbridge includes the upstream matter.js fix for optional nested struct fields.
79
85
 
80
86
  <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
package/README.md CHANGED
@@ -34,11 +34,12 @@ Thanks to [Ludovic BOUÉ](https://github.com/lboue) for his contributions to thi
34
34
  - `src/module.ts` will create all device types for easy testing;
35
35
  - the device types and the WebRTC stack come from matterbridge (`matterbridge/devices/camera`), see the [Matterbridge cameras](https://matterbridge.io/Camera.html) guide;
36
36
  - `src/rootNode.ts` adds the Root Node clusters a Camera requires (Power Source, Time Synchronization, TLS Certificate Management and TLS Client Management) to a `mode: 'server'` Camera;
37
- - `src/timeSynchronizationServer.ts` is the Time Synchronization server used there, with the TimeSyncClient, NtpClient and TimeZone features. It reports the host clock (MillisecondsGranularity) and implements SetTrustedTimeSource, SetDefaultNTP, SetTimeZone and SetDSTOffset with their validation and events; SetUTCTime is refused with TimeNotAccepted since the host clock is kept. The TLS clusters are still the empty matter.js servers.
37
+ - `src/timeSynchronizationServer.ts` is the Time Synchronization server used there, with the TimeSyncClient, NtpClient and TimeZone features. It reports the host clock (MillisecondsGranularity) and implements SetTrustedTimeSource, SetDefaultNTP, SetTimeZone and SetDSTOffset with their validation and events; SetUTCTime is refused with TimeNotAccepted since the host clock is kept.
38
+ - `src/tlsCertificateManagementServer.ts` and `src/tlsClientManagementServer.ts` provide the Matterbridge TLS server subclasses used on the Root Node. All commands have explicit placeholder overrides: response commands return empty typed response objects, and void commands do nothing. They do not implement TLS management or provide usable protocol responses yet.
38
39
 
39
40
  ## Requirements
40
41
 
41
- Requires Matterbridge `3.10.15` or later.
42
+ Requires Matterbridge `3.11.0` or later.
42
43
 
43
44
  Requires [`ffmpeg`](https://ffmpeg.org/) to be installed on the host or in the container. The resolver checks the system command and common installation directories on Linux, macOS, and Windows.
44
45
 
package/dist/module.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { inspect } from 'node:util';
2
- import { MatterbridgeDynamicPlatform } from 'matterbridge';
2
+ import { getSemtag, MatterbridgeDynamicPlatform } from 'matterbridge';
3
3
  import { hasFfmpeg, installFfmpeg, MatterbridgeBindingServer } from 'matterbridge/behaviors';
4
4
  import { AudioDoorbell, Camera, Chime, closeWebRtcSessions, Doorbell, FloodlightCamera, Intercom, SnapshotCamera, VideoDoorbell, } from 'matterbridge/devices/camera';
5
5
  import { RESET } from 'matterbridge/logger';
6
- import { UINT16_MAX, UINT32_MAX } from 'matterbridge/matter';
6
+ import { CommonNumberTag, UINT16_MAX, UINT32_MAX } from 'matterbridge/matter';
7
7
  import { ChimeClient } from 'matterbridge/matter/behaviors';
8
8
  import { Identify, Chime as ChimeCluster, PowerSource } from 'matterbridge/matter/clusters';
9
9
  import { isDocker, isValidNumber, parseVersionString } from 'matterbridge/utils';
@@ -18,8 +18,8 @@ export class ExampleMatterbridgeCameraPlatform extends MatterbridgeDynamicPlatfo
18
18
  constructor(matterbridge, log, config) {
19
19
  super(matterbridge, log, config);
20
20
  this.config = config;
21
- if (typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.10.15')) {
22
- throw new Error(`This plugin requires Matterbridge version >= "3.10.15". Please update Matterbridge to the latest version in the frontend.`);
21
+ if (typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.11.0')) {
22
+ throw new Error(`This plugin requires Matterbridge version >= "3.11.0". Please update Matterbridge to the latest version in the frontend.`);
23
23
  }
24
24
  this.log.info(`Initializing platform ${this.config.name}...`);
25
25
  this.config.whiteList ??= [];
@@ -137,17 +137,29 @@ export class ExampleMatterbridgeCameraPlatform extends MatterbridgeDynamicPlatfo
137
137
  ],
138
138
  selectedChime: 0,
139
139
  enabled: true,
140
+ tagList: [getSemtag(CommonNumberTag.One, 'Server Chime')],
140
141
  mode: 'server',
141
142
  });
142
143
  await this.addDevice(serverChime);
143
144
  serverChime.subscribeAttribute(ChimeCluster, 'enabled', (newValue, oldValue) => {
144
145
  this.log.info(`Server Chime enabled attribute changed from ${oldValue} to ${newValue}`);
145
146
  });
146
- const serverDoorbell = new Doorbell('Server Doorbell', 'SERVER-DOORBELL-001', { mode: 'server' });
147
+ const serverDoorbell = new Doorbell('Server Doorbell', 'SERVER-DOORBELL-001', {
148
+ tagList: [getSemtag(CommonNumberTag.One, 'Server Doorbell')],
149
+ mode: 'server',
150
+ });
147
151
  await this.addDevice(serverDoorbell);
148
- const serverIntercom1 = new Intercom('Server Intercom 1', 'SERVER-INTERCOM1-001', { mode: 'server', weriftOfferOptions: { ...this.weriftOfferOptions } });
152
+ const serverIntercom1 = new Intercom('Server Intercom 1', 'SERVER-INTERCOM1-001', {
153
+ tagList: [getSemtag(CommonNumberTag.One, 'Server Intercom 1')],
154
+ mode: 'server',
155
+ weriftOfferOptions: { ...this.weriftOfferOptions },
156
+ });
149
157
  await this.addDevice(serverIntercom1);
150
- const serverIntercom2 = new Intercom('Server Intercom 2', 'SERVER-INTERCOM2-001', { mode: 'server', weriftOfferOptions: { ...this.weriftOfferOptions } });
158
+ const serverIntercom2 = new Intercom('Server Intercom 2', 'SERVER-INTERCOM2-001', {
159
+ tagList: [getSemtag(CommonNumberTag.Two, 'Server Intercom 2')],
160
+ mode: 'server',
161
+ weriftOfferOptions: { ...this.weriftOfferOptions },
162
+ });
151
163
  await this.addDevice(serverIntercom2);
152
164
  this.log.info(`Platform ${this.config.name} started successfully`);
153
165
  }
package/dist/rootNode.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import { MatterbridgePowerSourceServer } from 'matterbridge/behaviors';
2
- import { TlsCertificateManagementServer, TlsClientManagementServer } from 'matterbridge/matter/behaviors';
3
2
  import { PowerSource, TimeSynchronization } from 'matterbridge/matter/clusters';
4
3
  import { MATTER_EPOCH_US, MatterbridgeTimeSynchronizationServer } from './timeSynchronizationServer.js';
4
+ import { MatterbridgeTlsCertificateManagementServer } from './tlsCertificateManagementServer.js';
5
+ import { MatterbridgeTlsClientManagementServer } from './tlsClientManagementServer.js';
5
6
  export async function addRootNodeCamera(device) {
6
7
  if (!device.serverNode) {
7
8
  throw new Error(`addRootNodeCamera requires device.serverNode to be set: register the device with mode: 'server' before calling this helper.`);
@@ -28,13 +29,13 @@ export async function addRootNodeCamera(device) {
28
29
  timeZoneListMaxSize: 2,
29
30
  dstOffsetListMaxSize: 2,
30
31
  });
31
- root.behaviors.require(TlsCertificateManagementServer, {
32
+ root.behaviors.require(MatterbridgeTlsCertificateManagementServer, {
32
33
  maxRootCertificates: 5,
33
34
  provisionedRootCertificates: [],
34
35
  maxClientCertificates: 5,
35
36
  provisionedClientCertificates: [],
36
37
  });
37
- root.behaviors.require(TlsClientManagementServer, {
38
+ root.behaviors.require(MatterbridgeTlsClientManagementServer, {
38
39
  maxProvisioned: 5,
39
40
  provisionedEndpoints: [],
40
41
  });
@@ -0,0 +1,25 @@
1
+ import { TlsCertificateManagementServer } from 'matterbridge/matter/behaviors';
2
+ import { TlsCertificateManagement } from 'matterbridge/matter/clusters';
3
+ export class MatterbridgeTlsCertificateManagementServer extends TlsCertificateManagementServer {
4
+ provisionRootCertificate(_request) {
5
+ return new TlsCertificateManagement.ProvisionRootCertificateResponse();
6
+ }
7
+ findRootCertificate(_request) {
8
+ return new TlsCertificateManagement.FindRootCertificateResponse();
9
+ }
10
+ lookupRootCertificate(_request) {
11
+ return new TlsCertificateManagement.LookupRootCertificateResponse();
12
+ }
13
+ removeRootCertificate(_request) { }
14
+ clientCsr(_request) {
15
+ return new TlsCertificateManagement.ClientCsrResponse();
16
+ }
17
+ provisionClientCertificate(_request) { }
18
+ findClientCertificate(_request) {
19
+ return new TlsCertificateManagement.FindClientCertificateResponse();
20
+ }
21
+ lookupClientCertificate(_request) {
22
+ return new TlsCertificateManagement.LookupClientCertificateResponse();
23
+ }
24
+ removeClientCertificate(_request) { }
25
+ }
@@ -0,0 +1,11 @@
1
+ import { TlsClientManagementServer } from 'matterbridge/matter/behaviors';
2
+ import { TlsClientManagement } from 'matterbridge/matter/clusters';
3
+ export class MatterbridgeTlsClientManagementServer extends TlsClientManagementServer {
4
+ provisionEndpoint(_request) {
5
+ return new TlsClientManagement.ProvisionEndpointResponse();
6
+ }
7
+ findEndpoint(_request) {
8
+ return new TlsClientManagement.FindEndpointResponse();
9
+ }
10
+ removeEndpoint(_request) { }
11
+ }
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "matterbridge-example-camera",
3
- "version": "1.0.0-dev-20261020-51dc08f",
3
+ "version": "1.0.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-example-camera",
9
- "version": "1.0.0-dev-20261020-51dc08f",
9
+ "version": "1.0.0",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "node-ansi-logger": "3.3.1",
13
13
  "node-persist-manager": "2.1.1"
14
14
  },
15
15
  "engines": {
16
- "node": ">=20.19.0 <21.0.0 || >=22.13.0 <23.0.0 || >=24.0.0 <25.0.0 || >=26.0.0 <27.0.0"
16
+ "node": ">=22.13.0 <23.0.0 || >=24.0.0 <25.0.0 || >=26.0.0 <27.0.0"
17
17
  },
18
18
  "funding": {
19
19
  "type": "buymeacoffee",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-example-camera",
3
- "version": "1.0.0-dev-20261020-51dc08f",
3
+ "version": "1.0.0",
4
4
  "description": "Matterbridge example camera plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
@@ -54,7 +54,7 @@
54
54
  }
55
55
  },
56
56
  "engines": {
57
- "node": ">=20.19.0 <21.0.0 || >=22.13.0 <23.0.0 || >=24.0.0 <25.0.0 || >=26.0.0 <27.0.0"
57
+ "node": ">=22.13.0 <23.0.0 || >=24.0.0 <25.0.0 || >=26.0.0 <27.0.0"
58
58
  },
59
59
  "files": [
60
60
  "assets",