Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/http/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1999,6 +1999,10 @@ export class Device extends TypedEmitter<DeviceEvents> {
return DeviceType.CAMERA_E == type;
}

static isIndoorCameraBase(type: number): boolean {
return DeviceType.INDOOR_CAMERA == type;
}

static isSensor(type: number): boolean {
if (type == DeviceType.SENSOR || type == DeviceType.MOTION_SENSOR || type == DeviceType.ENTRY_SENSOR_E20)
return true;
Expand Down Expand Up @@ -2145,6 +2149,11 @@ export class Device extends TypedEmitter<DeviceEvents> {
return false;
}

static isFloodLightT8424(type: number): boolean {
if (type == DeviceType.FLOODLIGHT_CAMERA_8424) return true;
return false;
}

static isFloodLightT8425(type: number): boolean {
if (type == DeviceType.FLOODLIGHT_CAMERA_8425) return true;
return false;
Expand Down Expand Up @@ -2349,6 +2358,10 @@ export class Device extends TypedEmitter<DeviceEvents> {
return DeviceType.CAMERA_C35 == type;
}

static isIndoorPTCameraE30(type: number): boolean {
return DeviceType.INDOOR_PT_CAMERA_E30 == type;
}

static isSoloCameraE30(type: number): boolean {
return DeviceType.SOLO_CAMERA_E30 == type;
}
Expand Down Expand Up @@ -2624,6 +2637,10 @@ export class Device extends TypedEmitter<DeviceEvents> {
return Device.isCamera(this.rawDevice.device_type);
}

public isIndoorCameraBase(): boolean {
return Device.isIndoorCameraBase(this.rawDevice.device_type);
}

public isFloodLight(): boolean {
return Device.isFloodLight(this.rawDevice.device_type);
}
Expand All @@ -2636,6 +2653,10 @@ export class Device extends TypedEmitter<DeviceEvents> {
return Device.isFloodLightT8423(this.rawDevice.device_type);
}

public isFloodLightT8424(): boolean {
return Device.isFloodLightT8424(this.rawDevice.device_type);
}

public isFloodLightT8425(): boolean {
return Device.isFloodLightT8425(this.rawDevice.device_type);
}
Expand Down Expand Up @@ -2796,6 +2817,10 @@ export class Device extends TypedEmitter<DeviceEvents> {
return Device.isCameraC35(this.rawDevice.device_type);
}

public isIndoorPTCameraE30(): boolean {
return Device.isIndoorPTCameraE30(this.rawDevice.device_type);
}

public isSoloCameraE30(): boolean {
return Device.isSoloCameraE30(this.rawDevice.device_type);
}
Expand Down
12 changes: 8 additions & 4 deletions src/http/station.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7658,7 +7658,12 @@ export class Station extends TypedEmitter<StationEvents> {
command: commandData,
}
);
} else if (device.isOutdoorPanAndTiltCamera() || device.isBatteryDoorbellDualE340() || device.isFloodLightT8425()) {
} else if (
device.isOutdoorPanAndTiltCamera() ||
device.isBatteryDoorbellDualE340() ||
device.isFloodLightT8425() ||
((device.isIndoorPTCameraE30() || device.isIndoorCameraBase()) && this.isDeviceControlledByHomeBase())
) {
rootHTTPLogger.debug(`Station start livestream - sending command using CMD_DOORBELL_SET_PAYLOAD (1)`, {
stationSN: this.getSerial(),
deviceSN: device.getSerial(),
Expand Down Expand Up @@ -7686,9 +7691,8 @@ export class Station extends TypedEmitter<StationEvents> {
);
} else if (
device.isSoloCameras() ||
device.getDeviceType() === DeviceType.FLOODLIGHT_CAMERA_8423 ||
device.getDeviceType() === DeviceType.FLOODLIGHT_CAMERA_8424 ||
device.getDeviceType() === DeviceType.FLOODLIGHT_CAMERA_8424 ||
device.isFloodLightT8423() ||
device.isFloodLightT8424() ||
device.isWiredDoorbellT8200X() ||
device.isWallLightCam() ||
device.isGarageCamera()
Expand Down
25 changes: 25 additions & 0 deletions src/http/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10249,6 +10249,21 @@ export const DeviceCommands: Commands = {
CommandName.DeviceSavePresetPosition,
CommandName.DeviceDeletePresetPosition,
],
[DeviceType.INDOOR_PT_CAMERA_E30]: [
CommandName.DeviceStartLivestream,
CommandName.DeviceStopLivestream,
CommandName.DeviceTriggerAlarmSound,
CommandName.DevicePanAndTilt,
CommandName.DeviceStartDownload,
CommandName.DeviceCancelDownload,
CommandName.DeviceCalibrate,
CommandName.DeviceStartTalkback,
CommandName.DeviceStopTalkback,
CommandName.DeviceSnooze,
CommandName.DevicePresetPosition,
CommandName.DeviceSavePresetPosition,
CommandName.DeviceDeletePresetPosition,
],
[DeviceType.INDOOR_PT_CAMERA_C210]: [
CommandName.DeviceStartLivestream,
CommandName.DeviceStopLivestream,
Expand Down Expand Up @@ -10804,6 +10819,16 @@ export const StationCommands: Commands = {
CommandName.StationDatabaseCountByDate,
CommandName.StationDatabaseDelete,
],
[DeviceType.INDOOR_PT_CAMERA_E30]: [
CommandName.StationReboot,
CommandName.StationTriggerAlarmSound,
CommandName.StationDownloadImage,
CommandName.StationDatabaseQueryLatestInfo,
CommandName.StationDatabaseQueryByDate,
CommandName.StationDatabaseQueryLocal,
CommandName.StationDatabaseCountByDate,
CommandName.StationDatabaseDelete,
],
[DeviceType.INDOOR_PT_CAMERA_C210]: [
CommandName.StationReboot,
CommandName.StationTriggerAlarmSound,
Expand Down