matterbridge-example-camera 0.0.7-dev-20260722-863cc7e → 0.0.7-dev-20260723-3d59764

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
@@ -34,7 +34,12 @@ If you like this project and find it useful, please consider giving it a star on
34
34
 
35
35
  - [platform]: Add log of config.
36
36
  - [platform]: Add animation interval in 10 phases.
37
- - [doorbell]: Add use of cluster client Chime of Server Doorbell in the animation. It needs the Server Doorbell and Server Chime to be paired and a binding in Matter Server dashboard from Server Doorbell Chime client cluster to Server Chime Chime server cluster: [bindings](screenshots/bindings.png)
37
+ - [doorbell]: Add use of cluster client Chime of Server Doorbell in the animation. It needs the Server Doorbell and Server Chime to be paired and a binding in Matter Server dashboard from Server Doorbell Chime client cluster to Server Chime Chime server cluster: [bindings](screenshots/bindings.png).
38
+ - [chip-test]: Add full shell script to run the chip tests.
39
+
40
+ ### Fixed
41
+
42
+ - [chime]: Fix behavior when enabled is false. All chip tests pass.
38
43
 
39
44
  <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
40
45
 
package/README.md CHANGED
@@ -235,14 +235,32 @@ WebRTC media tracks transport encoded H.264 or Opus frames in RTP packets; they
235
235
 
236
236
  ## Chip tests
237
237
 
238
- ```bash
239
- docker rm matterbridge-chip-test-hub -f && docker pull luligu/matterbridge:chip-test && docker run -dit --network matterbridge --restart always --stop-timeout 60 --name matterbridge-chip-test-hub -p 8283:8283 -v "C:/Users/your-user/GitHub/matterbridge-example-camera/temp:/tmp/matter_testing/logs" luligu/matterbridge:chip-test
240
- docker logs -f matterbridge-chip-test-hub --tail 1000
238
+ ### Create and run the container (Linux, macOS, and Windows)
239
+
240
+ Run the `luligu/matterbridge:chip-test` docker image, add the plugin, restart and open a shell in the container:
241
+
242
+ - frontend on port 8585
243
+ - plugin mapped to .
244
+ - container test logs directory mapped on ./temp directory
245
+
246
+ ```shell
247
+ docker rm matterbridge-chip-test-hub -f && docker pull luligu/matterbridge:chip-test && docker run -dit --network matterbridge --restart always --stop-timeout 60 --name matterbridge-chip-test-hub -p 8585:8283 -v "$(pwd)/temp:/tmp/matter_testing/logs" -v "$(pwd):/root/Matterbridge/matterbridge-example-camera" luligu/matterbridge:chip-test
248
+ docker exec -it matterbridge-chip-test-hub matterbridge --add matterbridge-example-camera
249
+ docker restart matterbridge-chip-test-hub
241
250
  docker exec -it matterbridge-chip-test-hub bash
242
251
  ```
243
252
 
253
+ Stop the container and softRest (needed if running on macOS or Windows)
254
+
255
+ ```shell
256
+ docker stop matterbridge-chip-test-hub
257
+ npm run softReset
258
+ ```
259
+
260
+ ### Inside the container
261
+
244
262
  ```bash
245
- # Generic device composition and conformance
263
+ # Generic device composition and conformance ✅ (one test fails for a known matter.js bug)
246
264
  python3 src/python_testing/TC_DeviceBasicComposition.py
247
265
  python3 src/python_testing/TC_DeviceConformance.py --bool-arg allow_provisional:true
248
266
  python3 src/python_testing/TC_DefaultWarnings.py --bool-arg pixit_allow_default_vendor_id:true
@@ -250,11 +268,11 @@ python3 src/python_testing/TC_DefaultWarnings.py --bool-arg pixit_allow_default_
250
268
  # Doorbell mandatory Switch server
251
269
  python3 src/python_testing/TC_SWTCH.py
252
270
 
253
- # Chime cluster
254
- python3 src/python_testing/TC_CHIME_2_2.py
255
- python3 src/python_testing/TC_CHIME_2_3.py
256
- python3 src/python_testing/TC_CHIME_2_5.py
257
- python3 src/python_testing/TC_CHIME_2_6.py
271
+ # Chime cluster ✅
272
+ python3 src/python_testing/TC_CHIME_2_2.py --endpoint 2
273
+ python3 src/python_testing/TC_CHIME_2_3.py --endpoint 2
274
+ python3 src/python_testing/TC_CHIME_2_5.py --endpoint 2
275
+ python3 src/python_testing/TC_CHIME_2_6.py --endpoint 2
258
276
 
259
277
  # Camera AV Stream Management
260
278
  python3 src/python_testing/TC_AVSM_2_1.py
@@ -5,12 +5,16 @@ const ChimeServerBase = ChimeServer.enable({ events: { chimeStartedPlaying: true
5
5
  export class MatterbridgeChimeServer extends ChimeServerBase {
6
6
  async playChimeSound(request) {
7
7
  const device = this.endpoint.stateOf(MatterbridgeServer);
8
+ if (!this.state.enabled) {
9
+ device.log.debug(`MatterbridgeChimeServer: playChimeSound called but chime is disabled (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
10
+ return;
11
+ }
8
12
  const chimeId = request.chimeId ?? this.state.selectedChime;
9
13
  if (!this.state.installedChimeSounds.some((chimeSound) => chimeSound.chimeId === chimeId)) {
10
- throw new StatusResponseError(`Chime sound ${chimeId} is not present in installedChimeSounds`, Status.NotFound);
14
+ throw new StatusResponseError(`MatterbridgeChimeServer: chime sound ${chimeId} is not present in installedChimeSounds (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`, Status.NotFound);
11
15
  }
12
- device.log.info(`Playing chime sound ${chimeId} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
13
- device.log.debug(`MatterbridgeChimeServer: playChimeSound called with chimeId ${chimeId}`);
16
+ device.log.info(`MatterbridgeChimeServer: playing chime sound ${chimeId} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
17
+ device.log.debug(`MatterbridgeChimeServer: playChimeSound called with chimeId ${chimeId} (endpoint ${this.endpoint.maybeId}.${this.endpoint.maybeNumber})`);
14
18
  this.events.chimeStartedPlaying.emit({ chimeId }, this.context);
15
19
  }
16
20
  }
package/dist/module.js CHANGED
@@ -118,10 +118,10 @@ export class ExampleMatterbridgeCameraPlatform extends MatterbridgeDynamicPlatfo
118
118
  this.log.info(`Configuring platform ${this.config.name}...`);
119
119
  const exampleChime = this.getDeviceById('Chime-CHIME-001');
120
120
  await exampleChime?.setCluster(PowerSource, { batChargeLevel: PowerSource.BatChargeLevel.Ok, batPercentRemaining: 150, batQuantity: 2, batReplacementDescription: 'AA' }, exampleChime.log);
121
- await exampleChime?.setAttribute(ChimeCluster, 'enabled', true, exampleChime.log);
121
+ await exampleChime?.setCluster(ChimeCluster, { enabled: true, selectedChime: 0 }, exampleChime.log);
122
122
  const serverChime = this.getDeviceById('ServerChime-SERVER-CHIME-001');
123
123
  await serverChime?.setCluster(PowerSource, { batChargeLevel: PowerSource.BatChargeLevel.Ok, batPercentRemaining: 150, batVoltage: 2900, batReplacementNeeded: false }, serverChime.log);
124
- await serverChime?.setAttribute(ChimeCluster, 'enabled', true, serverChime.log);
124
+ await serverChime?.setCluster(ChimeCluster, { enabled: true, selectedChime: 0 }, serverChime.log);
125
125
  if (this.config.animationInterval > 0) {
126
126
  clearInterval(this.animationInterval);
127
127
  this.animationInterval = setInterval(() => void this.animationHandler(), this.config.animationInterval * 1000);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "matterbridge-example-camera",
3
- "version": "0.0.7-dev-20260722-863cc7e",
3
+ "version": "0.0.7-dev-20260723-3d59764",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-example-camera",
9
- "version": "0.0.7-dev-20260722-863cc7e",
9
+ "version": "0.0.7-dev-20260723-3d59764",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "node-ansi-logger": "3.3.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-example-camera",
3
- "version": "0.0.7-dev-20260722-863cc7e",
3
+ "version": "0.0.7-dev-20260723-3d59764",
4
4
  "description": "Matterbridge camera example plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",