@matterbridge/core 3.10.10-dev-20260912-8fddbe4 → 3.10.10-dev-20260914-784e019
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/dist/behaviors/weriftSession.d.ts +2 -0
- package/dist/behaviors/weriftSession.js +25 -1
- package/dist/demoDevices.js +64 -0
- package/dist/devices/camera/export.d.ts +9 -0
- package/dist/devices/camera/export.js +9 -0
- package/dist/devices/cameraController.d.ts +8 -0
- package/dist/devices/cameraController.js +35 -0
- package/dist/devices/floodlightCamera.d.ts +4 -2
- package/dist/devices/floodlightCamera.js +7 -6
- package/dist/devices/videoDoorbell.d.ts +4 -2
- package/dist/devices/videoDoorbell.js +7 -6
- package/package.json +9 -5
|
@@ -29,6 +29,8 @@ export declare class WeriftWebRtcSession {
|
|
|
29
29
|
private static readonly DIAGNOSTICS_INTERVAL_MS;
|
|
30
30
|
private lastDiagnosticsCounters?;
|
|
31
31
|
private readonly dtlsTransportsWithStateLogging;
|
|
32
|
+
private static parseIcePortRange;
|
|
33
|
+
private static parseIceAdditionalHostAddresses;
|
|
32
34
|
constructor(webRtcSessionId: number, options: WeriftOfferOptions);
|
|
33
35
|
private summarizeSdp;
|
|
34
36
|
private getFreeUdpPort;
|
|
@@ -22,11 +22,35 @@ export class WeriftWebRtcSession {
|
|
|
22
22
|
static DIAGNOSTICS_INTERVAL_MS = 10_000;
|
|
23
23
|
lastDiagnosticsCounters;
|
|
24
24
|
dtlsTransportsWithStateLogging = new Set();
|
|
25
|
+
static parseIcePortRange() {
|
|
26
|
+
const raw = process.env.MATTERBRIDGE_ICE_PORT_RANGE?.trim();
|
|
27
|
+
if (!raw)
|
|
28
|
+
return undefined;
|
|
29
|
+
const match = /^(\d{1,5})-(\d{1,5})$/.exec(raw);
|
|
30
|
+
if (!match)
|
|
31
|
+
return undefined;
|
|
32
|
+
const min = Number(match[1]);
|
|
33
|
+
const max = Number(match[2]);
|
|
34
|
+
if (min < 1024 || max > 65_535 || min >= max)
|
|
35
|
+
return undefined;
|
|
36
|
+
return [min, max];
|
|
37
|
+
}
|
|
38
|
+
static parseIceAdditionalHostAddresses() {
|
|
39
|
+
const addresses = process.env.MATTERBRIDGE_ICE_HOST_ADDRESSES?.split(',')
|
|
40
|
+
.map((address) => address.trim())
|
|
41
|
+
.filter((address) => address.length > 0) ?? [];
|
|
42
|
+
return addresses.length > 0 ? addresses : undefined;
|
|
43
|
+
}
|
|
25
44
|
constructor(webRtcSessionId, options) {
|
|
26
45
|
this.webRtcSessionId = webRtcSessionId;
|
|
27
46
|
this.options = { ...options };
|
|
28
|
-
|
|
47
|
+
const icePortRange = WeriftWebRtcSession.parseIcePortRange();
|
|
48
|
+
const iceAdditionalHostAddresses = WeriftWebRtcSession.parseIceAdditionalHostAddresses();
|
|
49
|
+
this.peerConnection = new RTCPeerConnection({ codecs: { audio: [useOPUS(), usePCMU()], video: [useH264(), useVP8()] }, icePortRange, iceAdditionalHostAddresses });
|
|
29
50
|
this.log = new AnsiLogger({ logName: `WebRTC session ${webRtcSessionId}`, logLevel: "debug", logNameColor: MAGENTA, logTimestampFormat: 4 });
|
|
51
|
+
if (icePortRange || iceAdditionalHostAddresses) {
|
|
52
|
+
this.log.debug(`ICE overrides: portRange=${icePortRange ? `${icePortRange[0]}-${icePortRange[1]}` : 'default'} additionalHostAddresses=${iceAdditionalHostAddresses?.join(', ') ?? 'none'}`);
|
|
53
|
+
}
|
|
30
54
|
this.peerConnection.iceGatheringStateChange.subscribe((state) => {
|
|
31
55
|
this.log.info(`ICE gathering state: ${state}`);
|
|
32
56
|
});
|
package/dist/demoDevices.js
CHANGED
|
@@ -5,6 +5,7 @@ import { AirQuality } from '@matter/types/clusters/air-quality';
|
|
|
5
5
|
import { ClosureDimension } from '@matter/types/clusters/closure-dimension';
|
|
6
6
|
import { DoorLock } from '@matter/types/clusters/door-lock';
|
|
7
7
|
import { FanControl } from '@matter/types/clusters/fan-control';
|
|
8
|
+
import { Identify } from '@matter/types/clusters/identify';
|
|
8
9
|
import { PowerSource } from '@matter/types/clusters/power-source';
|
|
9
10
|
import { PowerTopology } from '@matter/types/clusters/power-topology';
|
|
10
11
|
import { ResourceMonitoring } from '@matter/types/clusters/resource-monitoring';
|
|
@@ -14,18 +15,25 @@ import { Thermostat } from '@matter/types/clusters/thermostat';
|
|
|
14
15
|
import { EndpointNumber } from '@matter/types/datatype';
|
|
15
16
|
import { getErrorMessage } from '@matterbridge/utils/error';
|
|
16
17
|
import { AirConditioner } from './devices/airConditioner.js';
|
|
18
|
+
import { AudioDoorbell } from './devices/audioDoorbell.js';
|
|
17
19
|
import { BasicVideoPlayer } from './devices/basicVideoPlayer.js';
|
|
18
20
|
import { BatteryStorage } from './devices/batteryStorage.js';
|
|
21
|
+
import { Camera } from './devices/camera.js';
|
|
22
|
+
import { CameraController } from './devices/cameraController.js';
|
|
19
23
|
import { CastingVideoClient } from './devices/castingVideoClient.js';
|
|
20
24
|
import { CastingVideoPlayer } from './devices/castingVideoPlayer.js';
|
|
25
|
+
import { Chime } from './devices/chime.js';
|
|
21
26
|
import { Closure } from './devices/closure.js';
|
|
22
27
|
import { ContentApp } from './devices/contentApp.js';
|
|
23
28
|
import { Cooktop } from './devices/cooktop.js';
|
|
24
29
|
import { Dishwasher } from './devices/dishwasher.js';
|
|
30
|
+
import { Doorbell } from './devices/doorbell.js';
|
|
25
31
|
import { ElectricalUtilityMeter } from './devices/electricalUtilityMeter.js';
|
|
26
32
|
import { Evse } from './devices/evse.js';
|
|
27
33
|
import { ExtractorHood } from './devices/extractorHood.js';
|
|
34
|
+
import { FloodlightCamera } from './devices/floodlightCamera.js';
|
|
28
35
|
import { HeatPump } from './devices/heatPump.js';
|
|
36
|
+
import { Intercom } from './devices/intercom.js';
|
|
29
37
|
import { IrrigationSystem } from './devices/irrigationSystem.js';
|
|
30
38
|
import { LaundryDryer } from './devices/laundryDryer.js';
|
|
31
39
|
import { LaundryWasher } from './devices/laundryWasher.js';
|
|
@@ -33,8 +41,10 @@ import { MicrowaveOven } from './devices/microwaveOven.js';
|
|
|
33
41
|
import { Oven } from './devices/oven.js';
|
|
34
42
|
import { Refrigerator } from './devices/refrigerator.js';
|
|
35
43
|
import { RoboticVacuumCleaner } from './devices/roboticVacuumCleaner.js';
|
|
44
|
+
import { SnapshotCamera } from './devices/snapshotCamera.js';
|
|
36
45
|
import { SolarPower } from './devices/solarPower.js';
|
|
37
46
|
import { Speaker } from './devices/speaker.js';
|
|
47
|
+
import { VideoDoorbell } from './devices/videoDoorbell.js';
|
|
38
48
|
import { VideoRemoteControl } from './devices/videoRemoteControl.js';
|
|
39
49
|
import { WaterHeater } from './devices/waterHeater.js';
|
|
40
50
|
import { getSupportedDeviceType } from './matterbridgeDeviceTypes.js';
|
|
@@ -823,4 +833,58 @@ export async function createDemoDevices(matterbridge) {
|
|
|
823
833
|
tagList: [getSemtag(ElectricalMeasurementTag.Ac), getSemtag(PowerSourceTag.Ev), getSemtag(CommodityTariffFlowTag.Import), getSemtag(CommodityTariffChronologyTag.Upcoming)],
|
|
824
834
|
});
|
|
825
835
|
await registerDevice(electricalUtilityMeterEvEndpoint, 'Electrical Utility Meter Ev', 'ENERGY-14-10');
|
|
836
|
+
ep = new Camera('Camera', 'CAMERA-16-01', {
|
|
837
|
+
id: 'Camera',
|
|
838
|
+
number: EndpointNumber(16_01),
|
|
839
|
+
weriftOfferOptions: { video: true, audio: true, videoSource: 'test', audioSource: 'test' },
|
|
840
|
+
});
|
|
841
|
+
await registerDevice(ep, 'Camera', 'CAMERA-16-01');
|
|
842
|
+
ep = new Camera('Camera Ptz', 'CAMERA-16-01-1', {
|
|
843
|
+
id: 'CameraPtz',
|
|
844
|
+
number: EndpointNumber(16_01_1),
|
|
845
|
+
ptz: true,
|
|
846
|
+
identifyType: Identify.IdentifyType.VisibleIndicator,
|
|
847
|
+
weriftOfferOptions: { video: true, audio: true, videoSource: 'test', audioSource: 'test' },
|
|
848
|
+
});
|
|
849
|
+
await registerDevice(ep, 'Camera Ptz', 'CAMERA-16-01-1');
|
|
850
|
+
ep = new FloodlightCamera('Floodlight Camera', 'CAMERA-16-02', {
|
|
851
|
+
id: 'FloodlightCamera',
|
|
852
|
+
number: EndpointNumber(16_02),
|
|
853
|
+
cameraOptions: { number: EndpointNumber(16_02_1), ptz: true, identifyType: Identify.IdentifyType.VisibleIndicator },
|
|
854
|
+
lightOptions: { number: EndpointNumber(16_02_2) },
|
|
855
|
+
});
|
|
856
|
+
await registerDevice(ep, 'Floodlight Camera', 'CAMERA-16-02');
|
|
857
|
+
ep = new VideoDoorbell('Video Doorbell', 'CAMERA-16-03', {
|
|
858
|
+
id: 'VideoDoorbell',
|
|
859
|
+
number: EndpointNumber(16_03),
|
|
860
|
+
cameraOptions: { number: EndpointNumber(16_03_1), ptz: true, identifyType: Identify.IdentifyType.VisibleIndicator },
|
|
861
|
+
doorbellOptions: { number: EndpointNumber(16_03_2) },
|
|
862
|
+
});
|
|
863
|
+
await registerDevice(ep, 'Video Doorbell', 'CAMERA-16-03');
|
|
864
|
+
ep = new Intercom('Intercom I', 'CAMERA-16-04', { id: 'Intercom', number: EndpointNumber(16_04), identifyType: Identify.IdentifyType.VisibleIndicator });
|
|
865
|
+
await registerDevice(ep, 'Intercom I', 'CAMERA-16-04');
|
|
866
|
+
ep = new Intercom('Intercom II', 'CAMERA-16-04-1', { id: 'IntercomII', number: EndpointNumber(16_04_1), identifyType: Identify.IdentifyType.VisibleIndicator });
|
|
867
|
+
await registerDevice(ep, 'Intercom II', 'CAMERA-16-04-1');
|
|
868
|
+
ep = new AudioDoorbell('Audio Doorbell', 'CAMERA-16-05', { id: 'AudioDoorbell', number: EndpointNumber(16_05) });
|
|
869
|
+
await registerDevice(ep, 'Audio Doorbell', 'CAMERA-16-05');
|
|
870
|
+
ep = new SnapshotCamera('Snapshot Camera', 'CAMERA-16-06', {
|
|
871
|
+
id: 'SnapshotCamera',
|
|
872
|
+
number: EndpointNumber(16_06),
|
|
873
|
+
identifyType: Identify.IdentifyType.VisibleIndicator,
|
|
874
|
+
});
|
|
875
|
+
await registerDevice(ep, 'Snapshot Camera', 'CAMERA-16-06');
|
|
876
|
+
ep = new Chime('Chime', 'CAMERA-16-07', {
|
|
877
|
+
id: 'Chime',
|
|
878
|
+
number: EndpointNumber(16_07),
|
|
879
|
+
identifyType: Identify.IdentifyType.AudibleBeep,
|
|
880
|
+
installedChimeSounds: [
|
|
881
|
+
{ chimeId: 0, name: 'Default Chime' },
|
|
882
|
+
{ chimeId: 1, name: 'Westminster' },
|
|
883
|
+
],
|
|
884
|
+
});
|
|
885
|
+
await registerDevice(ep, 'Chime', 'CAMERA-16-07');
|
|
886
|
+
ep = new CameraController('Camera Controller', 'CAMERA-16-08', { id: 'CameraController', number: EndpointNumber(16_08) });
|
|
887
|
+
await registerDevice(ep, 'Camera Controller', 'CAMERA-16-08');
|
|
888
|
+
ep = new Doorbell('Doorbell', 'CAMERA-16-09', { id: 'Doorbell', number: EndpointNumber(16_09) });
|
|
889
|
+
await registerDevice(ep, 'Doorbell', 'CAMERA-16-09');
|
|
826
890
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from '../audioDoorbell.js';
|
|
2
|
+
export * from '../camera.js';
|
|
3
|
+
export * from '../cameraController.js';
|
|
4
|
+
export * from '../chime.js';
|
|
5
|
+
export * from '../doorbell.js';
|
|
6
|
+
export * from '../floodlightCamera.js';
|
|
7
|
+
export * from '../intercom.js';
|
|
8
|
+
export * from '../snapshotCamera.js';
|
|
9
|
+
export * from '../videoDoorbell.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from '../audioDoorbell.js';
|
|
2
|
+
export * from '../camera.js';
|
|
3
|
+
export * from '../cameraController.js';
|
|
4
|
+
export * from '../chime.js';
|
|
5
|
+
export * from '../doorbell.js';
|
|
6
|
+
export * from '../floodlightCamera.js';
|
|
7
|
+
export * from '../intercom.js';
|
|
8
|
+
export * from '../snapshotCamera.js';
|
|
9
|
+
export * from '../videoDoorbell.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
|
|
2
|
+
import type { MatterbridgeEndpointOptions } from '../matterbridgeEndpointTypes.js';
|
|
3
|
+
export interface CameraControllerOptions extends MatterbridgeEndpointOptions {
|
|
4
|
+
powerSourceType?: 'Rechargeable' | 'Replaceable' | 'Battery' | 'Wired' | 'None';
|
|
5
|
+
}
|
|
6
|
+
export declare class CameraController extends MatterbridgeEndpoint {
|
|
7
|
+
constructor(name: string, serial: string, options?: CameraControllerOptions);
|
|
8
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { addWebRtcTransportProviderClient } from '../behaviors/clients.js';
|
|
2
|
+
import { createDefaultWebRtcTransportRequestorClusterServer } from '../behaviors/webRtcTransportRequestorServer.js';
|
|
3
|
+
import { cameraController, powerSource } from '../matterbridgeDeviceTypes.js';
|
|
4
|
+
import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
|
|
5
|
+
export class CameraController extends MatterbridgeEndpoint {
|
|
6
|
+
constructor(name, serial, options = {}) {
|
|
7
|
+
const { powerSourceType = 'Wired', id, number, tagList, mode } = options;
|
|
8
|
+
super(powerSourceType === 'None' ? [cameraController] : [cameraController, powerSource], {
|
|
9
|
+
id: id ?? `${name.replaceAll(' ', '')}-${serial.replaceAll(' ', '')}`,
|
|
10
|
+
number,
|
|
11
|
+
tagList,
|
|
12
|
+
mode,
|
|
13
|
+
});
|
|
14
|
+
this.createDefaultBasicInformationClusterServer(name, serial, 0xfff1, 'Matterbridge', 0x8000, 'Matterbridge Camera Controller');
|
|
15
|
+
switch (powerSourceType) {
|
|
16
|
+
case 'Rechargeable':
|
|
17
|
+
this.createDefaultPowerSourceRechargeableBatteryClusterServer();
|
|
18
|
+
break;
|
|
19
|
+
case 'Replaceable':
|
|
20
|
+
this.createDefaultPowerSourceReplaceableBatteryClusterServer();
|
|
21
|
+
break;
|
|
22
|
+
case 'Battery':
|
|
23
|
+
this.createDefaultPowerSourceBatteryClusterServer();
|
|
24
|
+
break;
|
|
25
|
+
case 'Wired':
|
|
26
|
+
this.createDefaultPowerSourceWiredClusterServer();
|
|
27
|
+
break;
|
|
28
|
+
case 'None':
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
31
|
+
createDefaultWebRtcTransportRequestorClusterServer(this);
|
|
32
|
+
addWebRtcTransportProviderClient(this);
|
|
33
|
+
this.addRequiredClusters();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { Semtag } from '@matter/types';
|
|
2
|
+
import type { EndpointNumber } from '@matter/types/datatype';
|
|
2
3
|
import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
|
|
3
4
|
import type { MatterbridgeEndpointOptions } from '../matterbridgeEndpointTypes.js';
|
|
4
5
|
import type { CameraOptions } from './camera.js';
|
|
5
|
-
export type FloodlightCameraCameraOptions = Omit<CameraOptions, 'id' | '
|
|
6
|
+
export type FloodlightCameraCameraOptions = Omit<CameraOptions, 'id' | 'mode' | 'powerSourceType'>;
|
|
6
7
|
export interface FloodlightCameraLightOptions {
|
|
7
8
|
name?: string;
|
|
8
9
|
tagList?: Semtag[];
|
|
10
|
+
number?: EndpointNumber;
|
|
9
11
|
onOff?: boolean;
|
|
10
12
|
}
|
|
11
13
|
export interface FloodlightCameraOptions extends MatterbridgeEndpointOptions {
|
|
@@ -15,5 +17,5 @@ export interface FloodlightCameraOptions extends MatterbridgeEndpointOptions {
|
|
|
15
17
|
}
|
|
16
18
|
export declare class FloodlightCamera extends MatterbridgeEndpoint {
|
|
17
19
|
constructor(name: string, serial: string, options?: FloodlightCameraOptions);
|
|
18
|
-
addLight(name: string,
|
|
20
|
+
addLight(name: string, options?: FloodlightCameraLightOptions): MatterbridgeEndpoint;
|
|
19
21
|
}
|
|
@@ -43,8 +43,8 @@ export class FloodlightCamera extends MatterbridgeEndpoint {
|
|
|
43
43
|
{ resolution: { width: 640, height: 480 }, maxFrameRate: 10, imageCodec: CameraAvStreamManagement.ImageCodec.Jpeg, requiresEncodedPixels: false },
|
|
44
44
|
{ resolution: { width: 1280, height: 720 }, maxFrameRate: 10, imageCodec: CameraAvStreamManagement.ImageCodec.Jpeg, requiresEncodedPixels: false },
|
|
45
45
|
{ resolution: { width: 1920, height: 1080 }, maxFrameRate: 10, imageCodec: CameraAvStreamManagement.ImageCodec.Jpeg, requiresEncodedPixels: false },
|
|
46
|
-
], weriftOfferOptions, } = cameraOptions;
|
|
47
|
-
const cameraChild = this.addChildDeviceType('Camera', camera, {});
|
|
46
|
+
], weriftOfferOptions, number: cameraNumber, tagList: cameraTagList = [], } = cameraOptions;
|
|
47
|
+
const cameraChild = this.addChildDeviceType('Camera', camera, { number: cameraNumber, ...(cameraTagList.length > 0 ? { tagList: cameraTagList } : {}) });
|
|
48
48
|
cameraChild.log.logName = 'Camera';
|
|
49
49
|
if (identifyType !== Identify.IdentifyType.None) {
|
|
50
50
|
cameraChild.createDefaultIdentifyClusterServer(identifyTime, identifyType);
|
|
@@ -67,11 +67,12 @@ export class FloodlightCamera extends MatterbridgeEndpoint {
|
|
|
67
67
|
createDefaultWebRtcTransportProviderClusterServer(cameraChild, weriftOfferOptions);
|
|
68
68
|
addWebRtcTransportRequestorClient(cameraChild);
|
|
69
69
|
cameraChild.addRequiredClusters();
|
|
70
|
-
const { name: lightName = 'Light', tagList: lightTagList = [], onOff: lightOnOff = false } = lightOptions;
|
|
71
|
-
this.addLight(lightName, lightTagList, lightOnOff);
|
|
70
|
+
const { name: lightName = 'Light', tagList: lightTagList = [], number: lightNumber, onOff: lightOnOff = false } = lightOptions;
|
|
71
|
+
this.addLight(lightName, { tagList: lightTagList, number: lightNumber, onOff: lightOnOff });
|
|
72
72
|
}
|
|
73
|
-
addLight(name,
|
|
74
|
-
const
|
|
73
|
+
addLight(name, options = {}) {
|
|
74
|
+
const { tagList = [], number, onOff = false } = options;
|
|
75
|
+
const light = this.addChildDeviceType(name, onOffLight, { number, ...(tagList.length > 0 ? { tagList } : {}) });
|
|
75
76
|
light.log.logName = name;
|
|
76
77
|
light.createDefaultIdentifyClusterServer();
|
|
77
78
|
light.createDefaultOnOffClusterServer(onOff);
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { Semtag } from '@matter/types';
|
|
2
2
|
import { Identify } from '@matter/types/clusters/identify';
|
|
3
|
+
import type { EndpointNumber } from '@matter/types/datatype';
|
|
3
4
|
import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
|
|
4
5
|
import type { MatterbridgeEndpointOptions } from '../matterbridgeEndpointTypes.js';
|
|
5
6
|
import type { CameraOptions } from './camera.js';
|
|
6
|
-
export type VideoDoorbellCameraOptions = Omit<CameraOptions, 'id' | '
|
|
7
|
+
export type VideoDoorbellCameraOptions = Omit<CameraOptions, 'id' | 'mode' | 'powerSourceType'>;
|
|
7
8
|
export interface VideoDoorbellDoorbellOptions {
|
|
8
9
|
name?: string;
|
|
9
10
|
tagList?: Semtag[];
|
|
11
|
+
number?: EndpointNumber;
|
|
10
12
|
identifyTime?: number;
|
|
11
13
|
identifyType?: Identify.IdentifyType;
|
|
12
14
|
}
|
|
@@ -17,5 +19,5 @@ export interface VideoDoorbellOptions extends MatterbridgeEndpointOptions {
|
|
|
17
19
|
}
|
|
18
20
|
export declare class VideoDoorbell extends MatterbridgeEndpoint {
|
|
19
21
|
constructor(name: string, serial: string, options?: VideoDoorbellOptions);
|
|
20
|
-
addDoorbell(name: string,
|
|
22
|
+
addDoorbell(name: string, options?: VideoDoorbellDoorbellOptions): MatterbridgeEndpoint;
|
|
21
23
|
}
|
|
@@ -43,8 +43,8 @@ export class VideoDoorbell extends MatterbridgeEndpoint {
|
|
|
43
43
|
{ resolution: { width: 640, height: 480 }, maxFrameRate: 10, imageCodec: CameraAvStreamManagement.ImageCodec.Jpeg, requiresEncodedPixels: false },
|
|
44
44
|
{ resolution: { width: 1280, height: 720 }, maxFrameRate: 10, imageCodec: CameraAvStreamManagement.ImageCodec.Jpeg, requiresEncodedPixels: false },
|
|
45
45
|
{ resolution: { width: 1920, height: 1080 }, maxFrameRate: 10, imageCodec: CameraAvStreamManagement.ImageCodec.Jpeg, requiresEncodedPixels: false },
|
|
46
|
-
], weriftOfferOptions, } = cameraOptions;
|
|
47
|
-
const cameraChild = this.addChildDeviceType('Camera', camera, {});
|
|
46
|
+
], weriftOfferOptions, number: cameraNumber, tagList: cameraTagList = [], } = cameraOptions;
|
|
47
|
+
const cameraChild = this.addChildDeviceType('Camera', camera, { number: cameraNumber, ...(cameraTagList.length > 0 ? { tagList: cameraTagList } : {}) });
|
|
48
48
|
cameraChild.log.logName = 'Camera';
|
|
49
49
|
if (cameraIdentifyType !== Identify.IdentifyType.None) {
|
|
50
50
|
cameraChild.createDefaultIdentifyClusterServer(cameraIdentifyTime, cameraIdentifyType);
|
|
@@ -67,11 +67,12 @@ export class VideoDoorbell extends MatterbridgeEndpoint {
|
|
|
67
67
|
createDefaultWebRtcTransportProviderClusterServer(cameraChild, weriftOfferOptions);
|
|
68
68
|
addWebRtcTransportRequestorClient(cameraChild);
|
|
69
69
|
cameraChild.addRequiredClusters();
|
|
70
|
-
const { name: doorbellName = 'Doorbell', tagList: doorbellTagList = [], identifyTime = 0, identifyType = Identify.IdentifyType.None } = doorbellOptions;
|
|
71
|
-
this.addDoorbell(doorbellName, doorbellTagList, identifyTime, identifyType);
|
|
70
|
+
const { name: doorbellName = 'Doorbell', tagList: doorbellTagList = [], number: doorbellNumber, identifyTime = 0, identifyType = Identify.IdentifyType.None } = doorbellOptions;
|
|
71
|
+
this.addDoorbell(doorbellName, { tagList: doorbellTagList, number: doorbellNumber, identifyTime, identifyType });
|
|
72
72
|
}
|
|
73
|
-
addDoorbell(name,
|
|
74
|
-
const
|
|
73
|
+
addDoorbell(name, options = {}) {
|
|
74
|
+
const { tagList = [], number, identifyTime = 0, identifyType = Identify.IdentifyType.None } = options;
|
|
75
|
+
const doorbellChild = this.addChildDeviceType(name, doorbell, { number, ...(tagList.length > 0 ? { tagList } : {}) });
|
|
75
76
|
doorbellChild.log.logName = name;
|
|
76
77
|
doorbellChild.createDefaultIdentifyClusterServer(identifyTime, identifyType);
|
|
77
78
|
doorbellChild.createDefaultMomentarySwitchClusterServer();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/core",
|
|
3
|
-
"version": "3.10.10-dev-
|
|
3
|
+
"version": "3.10.10-dev-20260914-784e019",
|
|
4
4
|
"description": "Matterbridge core library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -54,6 +54,10 @@
|
|
|
54
54
|
"types": "./dist/devices/export.d.ts",
|
|
55
55
|
"import": "./dist/devices/export.js"
|
|
56
56
|
},
|
|
57
|
+
"./devices/camera": {
|
|
58
|
+
"types": "./dist/devices/camera/export.d.ts",
|
|
59
|
+
"import": "./dist/devices/camera/export.js"
|
|
60
|
+
},
|
|
57
61
|
"./clusters": {
|
|
58
62
|
"types": "./dist/clusters/export.d.ts",
|
|
59
63
|
"import": "./dist/clusters/export.js"
|
|
@@ -132,10 +136,10 @@
|
|
|
132
136
|
},
|
|
133
137
|
"dependencies": {
|
|
134
138
|
"@matter/main": "0.17.9",
|
|
135
|
-
"@matterbridge/dgram": "3.10.10-dev-
|
|
136
|
-
"@matterbridge/thread": "3.10.10-dev-
|
|
137
|
-
"@matterbridge/types": "3.10.10-dev-
|
|
138
|
-
"@matterbridge/utils": "3.10.10-dev-
|
|
139
|
+
"@matterbridge/dgram": "3.10.10-dev-20260914-784e019",
|
|
140
|
+
"@matterbridge/thread": "3.10.10-dev-20260914-784e019",
|
|
141
|
+
"@matterbridge/types": "3.10.10-dev-20260914-784e019",
|
|
142
|
+
"@matterbridge/utils": "3.10.10-dev-20260914-784e019",
|
|
139
143
|
"escape-html": "1.0.3",
|
|
140
144
|
"express": "5.2.1",
|
|
141
145
|
"express-rate-limit": "8.7.0",
|