diff --git a/src/http/device.ts b/src/http/device.ts index 60309091..1a7f6f38 100644 --- a/src/http/device.ts +++ b/src/http/device.ts @@ -1999,6 +1999,10 @@ export class Device extends TypedEmitter { 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; @@ -2145,6 +2149,11 @@ export class Device extends TypedEmitter { 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; @@ -2349,6 +2358,10 @@ export class Device extends TypedEmitter { 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; } @@ -2624,6 +2637,10 @@ export class Device extends TypedEmitter { 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); } @@ -2636,6 +2653,10 @@ export class Device extends TypedEmitter { 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); } @@ -2796,6 +2817,10 @@ export class Device extends TypedEmitter { 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); } diff --git a/src/http/station.ts b/src/http/station.ts index 1c575e60..ebe40212 100644 --- a/src/http/station.ts +++ b/src/http/station.ts @@ -7658,7 +7658,12 @@ export class Station extends TypedEmitter { 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(), @@ -7686,9 +7691,8 @@ export class Station extends TypedEmitter { ); } 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() diff --git a/src/http/types.ts b/src/http/types.ts index c32d0dab..96616008 100644 --- a/src/http/types.ts +++ b/src/http/types.ts @@ -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, @@ -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,