@matterbridge/core 3.11.3-dev-20261109-ca46ffb → 3.11.3-dev-20261113-b22242c

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.
@@ -1,6 +1,3 @@
1
- import { mkdir, writeFile } from 'node:fs/promises';
2
- import path from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
1
  import { AnsiLogger, MAGENTA } from 'node-ansi-logger';
5
2
  import { hasFfmpeg, redactSource, runFfmpeg } from './ffmpeg.js';
6
3
  const MAX_BYTES = 64000;
@@ -126,19 +123,3 @@ async function grab(src, width, height, q) {
126
123
  });
127
124
  });
128
125
  }
129
- if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
130
- const src = process.argv[2] ?? 'Surface Camera Front';
131
- const outputDir = path.join(process.cwd(), 'temp');
132
- await mkdir(outputDir, { recursive: true });
133
- const resolutions = [
134
- { width: 640, height: 480 },
135
- { width: 1280, height: 720 },
136
- { width: 1920, height: 1080 },
137
- ];
138
- for (const { width, height } of resolutions) {
139
- const result = await captureSnapshot({ src, width, height });
140
- const outputFile = path.join(outputDir, `snapshot-${width}x${height}.jpeg`);
141
- await writeFile(outputFile, result.data);
142
- log.info(`Saved snapshot to ${outputFile} (${result.byteLength}B, ${result.width}x${result.height}, quality=${result.quality}, downgraded=${result.downgraded})`);
143
- }
144
- }
@@ -6,7 +6,7 @@ export const ClosureControlDefinition = ClusterElement({
6
6
  classification: 'application',
7
7
  }, AttributeElement({ name: 'ClusterRevision', id: 0xfffd, type: 'ClusterRevision', default: 1 }), AttributeElement({ name: 'FeatureMap', id: 0xfffc, type: 'FeatureMap' }, FieldElement({ name: 'PS', conformance: 'O.a+', constraint: '0', title: 'Positioning' }), FieldElement({ name: 'LT', conformance: 'O.a+', constraint: '1', title: 'MotionLatching' }), FieldElement({ name: 'IS', conformance: 'O', constraint: '2', title: 'Instantaneous' }), FieldElement({ name: 'SP', conformance: '[PS & !IS]', constraint: '3', title: 'Speed' }), FieldElement({ name: 'VT', conformance: '[PS]', constraint: '4', title: 'Ventilation' }), FieldElement({ name: 'PD', conformance: '[PS]', constraint: '5', title: 'Pedestrian' }), FieldElement({ name: 'CL', conformance: '[PS]', constraint: '6', title: 'Calibration' }), FieldElement({ name: 'PT', conformance: 'O', constraint: '7', title: 'Protection' }), FieldElement({ name: 'MO', conformance: 'O', constraint: '8', title: 'ManuallyOperable' })), AttributeElement({ name: 'CountdownTime', id: 0x0000, type: 'elapsed-s', access: 'R V', conformance: '[PS & !IS]', constraint: 'max 259200', default: null, quality: 'X Q' }), AttributeElement({ name: 'MainState', id: 0x0001, type: 'MainStateEnum', access: 'R V', conformance: 'M', constraint: 'desc' }), AttributeElement({ name: 'CurrentErrorList', id: 0x0002, type: 'list', access: 'R V', conformance: 'M', constraint: 'max 10[all]', default: [] }, FieldElement({ name: 'entry', type: 'ClosureErrorEnum' })), AttributeElement({ name: 'OverallCurrentState', id: 0x0003, type: 'OverallCurrentStateStruct', access: 'R V', conformance: 'M', default: null, quality: 'X' }), AttributeElement({ name: 'OverallTargetState', id: 0x0004, type: 'OverallTargetStateStruct', access: 'R V', conformance: 'M', default: null, quality: 'X' }), AttributeElement({ name: 'LatchControlModes', id: 0x0005, type: 'LatchControlModesBitmap', access: 'R V', conformance: 'LT', quality: 'F' }), CommandElement({ name: 'Stop', id: 0x0000, access: 'O', conformance: '!IS', direction: 'request', response: 'status' }), CommandElement({ name: 'MoveTo', id: 0x0001, access: 'O T', conformance: 'M', direction: 'request', response: 'status' }, FieldElement({ name: 'Position', id: 0x0, type: 'TargetPositionEnum', conformance: 'O.a+' }), FieldElement({ name: 'Latch', id: 0x1, type: 'bool', conformance: 'O.a+' }), FieldElement({ name: 'Speed', id: 0x2, type: 'ThreeLevelAutoEnum', conformance: 'O.a+', default: 0 })), CommandElement({ name: 'Calibrate', id: 0x0002, access: 'M T', conformance: 'CL', direction: 'request', response: 'status' }), EventElement({ name: 'OperationalError', id: 0x0000, access: 'V', conformance: 'M', priority: 'critical' }, FieldElement({ name: 'ErrorState', id: 0x0, type: 'list', conformance: 'M', constraint: '1 to 10[all]' }, FieldElement({ name: 'entry', type: 'ClosureErrorEnum' }))), EventElement({ name: 'MovementCompleted', id: 0x0001, access: 'V', conformance: '!IS', priority: 'info' }), EventElement({ name: 'EngageStateChanged', id: 0x0002, access: 'V', conformance: 'MO', priority: 'info' }, FieldElement({ name: 'EngageValue', id: 0x0, type: 'bool', conformance: 'M' })), EventElement({ name: 'SecureStateChanged', id: 0x0003, access: 'V', conformance: 'M', priority: 'info' }, FieldElement({ name: 'SecureValue', id: 0x0, type: 'bool', conformance: 'M' })), DatatypeElement({ name: 'ClosureErrorEnum', type: 'enum8' }, FieldElement({ name: 'PhysicallyBlocked', id: 0x0, conformance: 'M' }), FieldElement({ name: 'BlockedBySensor', id: 0x1, conformance: 'M' }), FieldElement({ name: 'TemperatureLimited', id: 0x2, conformance: 'M' }), FieldElement({ name: 'MaintenanceRequired', id: 0x3, conformance: 'M' }), FieldElement({ name: 'InternalInterference', id: 0x4, conformance: 'M' })), DatatypeElement({ name: 'CurrentPositionEnum', type: 'enum8' }, FieldElement({ name: 'FullyClosed', id: 0x0, conformance: 'M' }), FieldElement({ name: 'FullyOpened', id: 0x1, conformance: 'M' }), FieldElement({ name: 'PartiallyOpened', id: 0x2, conformance: 'M' }), FieldElement({ name: 'OpenedForPedestrian', id: 0x3, conformance: 'PD' }), FieldElement({ name: 'OpenedForVentilation', id: 0x4, conformance: 'VT' }), FieldElement({ name: 'OpenedAtSignature', id: 0x5, conformance: 'M' })), DatatypeElement({ name: 'MainStateEnum', type: 'enum8' }, FieldElement({ name: 'Stopped', id: 0x0, conformance: 'M' }), FieldElement({ name: 'Moving', id: 0x1, conformance: 'M' }), FieldElement({ name: 'WaitingForMotion', id: 0x2, conformance: 'M' }), FieldElement({ name: 'Error', id: 0x3, conformance: 'M' }), FieldElement({ name: 'Calibrating', id: 0x4, conformance: 'CL' }), FieldElement({ name: 'Protected', id: 0x5, conformance: 'PT' }), FieldElement({ name: 'Disengaged', id: 0x6, conformance: 'MO' }), FieldElement({ name: 'SetupRequired', id: 0x7, conformance: 'M' })), DatatypeElement({ name: 'TargetPositionEnum', type: 'enum8' }, FieldElement({ name: 'MoveToFullyClosed', id: 0x0, conformance: 'M' }), FieldElement({ name: 'MoveToFullyOpen', id: 0x1, conformance: 'M' }), FieldElement({ name: 'MoveToPedestrianPosition', id: 0x2, conformance: 'PD' }), FieldElement({ name: 'MoveToVentilationPosition', id: 0x3, conformance: 'VT' }), FieldElement({ name: 'MoveToSignaturePosition', id: 0x4, conformance: 'M' })), DatatypeElement({ name: 'LatchControlModesBitmap', type: 'map8' }, FieldElement({ name: 'RemoteLatching', constraint: '0' }), FieldElement({ name: 'RemoteUnlatching', constraint: '1' })), DatatypeElement({ name: 'OverallCurrentStateStruct', type: 'struct' }, FieldElement({ name: 'Position', id: 0x0, type: 'CurrentPositionEnum', conformance: 'PS', default: null, quality: 'X' }), FieldElement({ name: 'Latch', id: 0x1, type: 'bool', conformance: 'LT', default: null, quality: 'X' }), FieldElement({ name: 'Speed', id: 0x2, type: 'ThreeLevelAutoEnum', conformance: 'SP' }), FieldElement({ name: 'SecureState', id: 0x3, type: 'bool', conformance: 'M', default: null, quality: 'X' })), DatatypeElement({ name: 'OverallTargetStateStruct', type: 'struct' }, FieldElement({ name: 'Position', id: 0x0, type: 'TargetPositionEnum', conformance: 'PS', default: null, quality: 'X' }), FieldElement({ name: 'Latch', id: 0x1, type: 'bool', conformance: 'LT', default: null, quality: 'X' }), FieldElement({ name: 'Speed', id: 0x2, type: 'ThreeLevelAutoEnum', conformance: 'SP' })));
8
8
  export const ClosureControlModel = new ClusterModel(ClosureControlDefinition);
9
- if (!MatterDefinition.children.some((child) => child.id === ClosureControlDefinition.id)) {
9
+ if (!MatterDefinition.children.some((child) => 'tag' in child && child.tag === 'cluster' && child.id === ClosureControlDefinition.id)) {
10
10
  MatterDefinition.children.push(ClosureControlDefinition);
11
11
  }
12
12
  if (Matter.clusters(ClosureControlModel.id) === undefined) {
@@ -6,7 +6,7 @@ export const ClosureDimensionDefinition = ClusterElement({
6
6
  classification: 'application',
7
7
  }, AttributeElement({ name: 'ClusterRevision', id: 0xfffd, type: 'ClusterRevision', default: 1 }), AttributeElement({ name: 'FeatureMap', id: 0xfffc, type: 'FeatureMap' }, FieldElement({ name: 'PS', conformance: 'O', constraint: '0', title: 'Positioning' }), FieldElement({ name: 'LT', conformance: 'O', constraint: '1', title: 'MotionLatching' }), FieldElement({ name: 'UT', conformance: '[PS]', constraint: '2', title: 'Unit' }), FieldElement({ name: 'LM', conformance: '[PS]', constraint: '3', title: 'Limitation' }), FieldElement({ name: 'SP', conformance: '[PS]', constraint: '4', title: 'Speed' }), FieldElement({ name: 'TR', conformance: '[PS]', constraint: '5', title: 'Translation' }), FieldElement({ name: 'RO', conformance: '[PS]', constraint: '6', title: 'Rotation' }), FieldElement({ name: 'MD', conformance: '[PS]', constraint: '7', title: 'Modulation' })), AttributeElement({ name: 'CurrentState', id: 0x0000, type: 'DimensionStateStruct', access: 'R V', conformance: 'M', default: null, quality: 'X' }), AttributeElement({ name: 'TargetState', id: 0x0001, type: 'DimensionStateStruct', access: 'R V', conformance: 'M', default: null, quality: 'X' }), AttributeElement({ name: 'Resolution', id: 0x0002, type: 'percent100ths', access: 'R V', conformance: 'PS', default: 1, quality: 'F' }), AttributeElement({ name: 'StepValue', id: 0x0003, type: 'percent100ths', access: 'R V', conformance: 'PS', default: 1, quality: 'F' }), AttributeElement({ name: 'Unit', id: 0x0004, type: 'ClosureUnitEnum', access: 'R V', conformance: 'UT', quality: 'F' }), AttributeElement({ name: 'UnitRange', id: 0x0005, type: 'UnitRangeStruct', access: 'R V', conformance: 'UT', default: null, quality: 'X' }), AttributeElement({ name: 'LimitRange', id: 0x0006, type: 'RangePercent100thsStruct', access: 'R V', conformance: 'LM' }), AttributeElement({ name: 'TranslationDirection', id: 0x0007, type: 'TranslationDirectionEnum', access: 'R V', conformance: 'TR', quality: 'F' }), AttributeElement({ name: 'RotationAxis', id: 0x0008, type: 'RotationAxisEnum', access: 'R V', conformance: 'RO', quality: 'F' }), AttributeElement({ name: 'Overflow', id: 0x0009, type: 'OverflowEnum', access: 'R V', conformance: 'RO', quality: 'F' }), AttributeElement({ name: 'ModulationType', id: 0x000a, type: 'ModulationTypeEnum', access: 'R V', conformance: 'MD', quality: 'F' }), AttributeElement({ name: 'LatchControlModes', id: 0x000b, type: 'LatchControlModesBitmap', access: 'R V', conformance: 'LT', quality: 'F' }), CommandElement({ name: 'SetTarget', id: 0x0000, access: 'O T', conformance: 'M', direction: 'request', response: 'status' }, FieldElement({ name: 'Position', id: 0x0, type: 'percent100ths', conformance: 'O' }), FieldElement({ name: 'Latch', id: 0x1, type: 'bool', conformance: 'O' }), FieldElement({ name: 'Speed', id: 0x2, type: 'ThreeLevelAutoEnum', conformance: 'O' })), CommandElement({ name: 'Step', id: 0x0001, access: 'O T', conformance: 'PS', direction: 'request', response: 'status' }, FieldElement({ name: 'Direction', id: 0x0, type: 'StepDirectionEnum', conformance: 'M' }), FieldElement({ name: 'NumberOfSteps', id: 0x1, type: 'uint16', conformance: 'M', constraint: 'min 1' }), FieldElement({ name: 'Speed', id: 0x2, type: 'ThreeLevelAutoEnum', conformance: 'O' })), DatatypeElement({ name: 'ClosureUnitEnum', type: 'enum8' }, FieldElement({ name: 'Millimeter', id: 0x0, conformance: 'M' }), FieldElement({ name: 'Degree', id: 0x1, conformance: 'M' })), DatatypeElement({ name: 'ModulationTypeEnum', type: 'enum8' }, FieldElement({ name: 'SlatsOrientation', id: 0x0, conformance: 'M' }), FieldElement({ name: 'SlatsOpenwork', id: 0x1, conformance: 'M' }), FieldElement({ name: 'StripesAlignment', id: 0x2, conformance: 'M' }), FieldElement({ name: 'Opacity', id: 0x3, conformance: 'M' }), FieldElement({ name: 'Ventilation', id: 0x4, conformance: 'M' })), DatatypeElement({ name: 'OverflowEnum', type: 'enum8' }, FieldElement({ name: 'NoOverflow', id: 0x0, conformance: 'M' }), FieldElement({ name: 'Inside', id: 0x1, conformance: 'M' }), FieldElement({ name: 'Outside', id: 0x2, conformance: 'M' }), FieldElement({ name: 'TopInside', id: 0x3, conformance: 'M' }), FieldElement({ name: 'TopOutside', id: 0x4, conformance: 'M' }), FieldElement({ name: 'BottomInside', id: 0x5, conformance: 'M' }), FieldElement({ name: 'BottomOutside', id: 0x6, conformance: 'M' }), FieldElement({ name: 'LeftInside', id: 0x7, conformance: 'M' }), FieldElement({ name: 'LeftOutside', id: 0x8, conformance: 'M' }), FieldElement({ name: 'RightInside', id: 0x9, conformance: 'M' }), FieldElement({ name: 'RightOutside', id: 0x0a, conformance: 'M' })), DatatypeElement({ name: 'RotationAxisEnum', type: 'enum8' }, FieldElement({ name: 'Left', id: 0x0, conformance: 'M' }), FieldElement({ name: 'CenteredVertical', id: 0x1, conformance: 'M' }), FieldElement({ name: 'LeftAndRight', id: 0x2, conformance: 'M' }), FieldElement({ name: 'Right', id: 0x3, conformance: 'M' }), FieldElement({ name: 'Top', id: 0x4, conformance: 'M' }), FieldElement({ name: 'CenteredHorizontal', id: 0x5, conformance: 'M' }), FieldElement({ name: 'TopAndBottom', id: 0x6, conformance: 'M' }), FieldElement({ name: 'Bottom', id: 0x7, conformance: 'M' }), FieldElement({ name: 'LeftBarrier', id: 0x8, conformance: 'M' }), FieldElement({ name: 'LeftAndRightBarriers', id: 0x9, conformance: 'M' }), FieldElement({ name: 'RightBarrier', id: 0x0a, conformance: 'M' })), DatatypeElement({ name: 'StepDirectionEnum', type: 'enum8' }, FieldElement({ name: 'Decrease', id: 0x0, conformance: 'M' }), FieldElement({ name: 'Increase', id: 0x1, conformance: 'M' })), DatatypeElement({ name: 'TranslationDirectionEnum', type: 'enum8' }, FieldElement({ name: 'Downward', id: 0x0, conformance: 'M' }), FieldElement({ name: 'Upward', id: 0x1, conformance: 'M' }), FieldElement({ name: 'VerticalMask', id: 0x2, conformance: 'M' }), FieldElement({ name: 'VerticalSymmetry', id: 0x3, conformance: 'M' }), FieldElement({ name: 'Leftward', id: 0x4, conformance: 'M' }), FieldElement({ name: 'Rightward', id: 0x5, conformance: 'M' }), FieldElement({ name: 'HorizontalMask', id: 0x6, conformance: 'M' }), FieldElement({ name: 'HorizontalSymmetry', id: 0x7, conformance: 'M' }), FieldElement({ name: 'Forward', id: 0x8, conformance: 'M' }), FieldElement({ name: 'Backward', id: 0x9, conformance: 'M' }), FieldElement({ name: 'DepthMask', id: 0x0a, conformance: 'M' }), FieldElement({ name: 'DepthSymmetry', id: 0x0b, conformance: 'M' })), DatatypeElement({ name: 'LatchControlModesBitmap', type: 'map8' }, FieldElement({ name: 'RemoteLatching', constraint: '0' }), FieldElement({ name: 'RemoteUnlatching', constraint: '1' })), DatatypeElement({ name: 'DimensionStateStruct', type: 'struct' }, FieldElement({ name: 'Position', id: 0x0, type: 'percent100ths', conformance: 'O', default: null, quality: 'X' }), FieldElement({ name: 'Latch', id: 0x1, type: 'bool', conformance: 'O', default: null, quality: 'X' }), FieldElement({ name: 'Speed', id: 0x2, type: 'ThreeLevelAutoEnum', conformance: 'O' })), DatatypeElement({ name: 'RangePercent100thsStruct', type: 'struct' }, FieldElement({ name: 'Min', id: 0x0, type: 'percent100ths', conformance: 'M' }), FieldElement({ name: 'Max', id: 0x1, type: 'percent100ths', conformance: 'M' })), DatatypeElement({ name: 'UnitRangeStruct', type: 'struct' }, FieldElement({ name: 'Min', id: 0x0, type: 'int16', conformance: 'M' }), FieldElement({ name: 'Max', id: 0x1, type: 'int16', conformance: 'M' })));
8
8
  export const ClosureDimensionModel = new ClusterModel(ClosureDimensionDefinition);
9
- if (!MatterDefinition.children.some((child) => child.id === ClosureDimensionDefinition.id)) {
9
+ if (!MatterDefinition.children.some((child) => 'tag' in child && child.tag === 'cluster' && child.id === ClosureDimensionDefinition.id)) {
10
10
  MatterDefinition.children.push(ClosureDimensionDefinition);
11
11
  }
12
12
  if (Matter.clusters(ClosureDimensionModel.id) === undefined) {
@@ -20,7 +20,7 @@ export const SoilMeasurementDefinition = ClusterElement({
20
20
  default: null,
21
21
  }));
22
22
  export const SoilMeasurementModel = new ClusterModel(SoilMeasurementDefinition);
23
- if (!MatterDefinition.children.some((child) => child.id === SoilMeasurementDefinition.id)) {
23
+ if (!MatterDefinition.children.some((child) => 'tag' in child && child.tag === 'cluster' && child.id === SoilMeasurementDefinition.id)) {
24
24
  MatterDefinition.children.push(SoilMeasurementDefinition);
25
25
  }
26
26
  if (Matter.clusters(SoilMeasurementModel.id) === undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matterbridge/core",
3
- "version": "3.11.3-dev-20261109-ca46ffb",
3
+ "version": "3.11.3-dev-20261113-b22242c",
4
4
  "description": "Matterbridge core library",
5
5
  "author": "https://github.com/Luligu",
6
6
  "homepage": "https://matterbridge.io/",
@@ -136,10 +136,10 @@
136
136
  },
137
137
  "dependencies": {
138
138
  "@matter/main": "0.18.0",
139
- "@matterbridge/dgram": "3.11.3-dev-20261109-ca46ffb",
140
- "@matterbridge/thread": "3.11.3-dev-20261109-ca46ffb",
141
- "@matterbridge/types": "3.11.3-dev-20261109-ca46ffb",
142
- "@matterbridge/utils": "3.11.3-dev-20261109-ca46ffb",
139
+ "@matterbridge/dgram": "3.11.3-dev-20261113-b22242c",
140
+ "@matterbridge/thread": "3.11.3-dev-20261113-b22242c",
141
+ "@matterbridge/types": "3.11.3-dev-20261113-b22242c",
142
+ "@matterbridge/utils": "3.11.3-dev-20261113-b22242c",
143
143
  "escape-html": "1.0.3",
144
144
  "express": "5.3.0",
145
145
  "express-rate-limit": "8.7.3",