UNPKG

homebridge-eufy-security-mikebcbc

Version:
91 lines 3.45 kB
import { PlatformAccessory, CharacteristicValue, Resolution } from 'homebridge'; import { EufySecurityPlatform } from '../platform'; import { DeviceAccessory } from './Device'; import { Camera, DeviceEvents, PropertyName, StreamMetadata } from 'eufy-security-client'; import { StreamingDelegate } from '../controller/streamingDelegate'; import { RecordingDelegate } from '../controller/recordingDelegate'; import { CameraConfig } from '../utils/configTypes'; export interface ProtectCameraChannelConfig { bitrate: number; enabled: boolean; fps: number; height: number; id: number; idrInterval: number; isRtspEnabled: boolean; name: string; width: number; } export interface RtspEntry { channel: ProtectCameraChannelConfig; lens?: number; name: string; resolution: Resolution; url: string; } /** * Platform Accessory * An instance of this class is created for each accessory your platform registers * Each accessory may expose multiple services of different service types. */ export declare class CameraAccessory extends DeviceAccessory { protected cameraStatus: { isEnabled: boolean; timestamp: number; }; private notificationTimeout; readonly cameraConfig: CameraConfig; hardwareTranscoding: boolean; hardwareDecoding: boolean; timeshift: boolean; hksvRecording: boolean; HksvErrors: number; isOnline: boolean; private rtspEntries; private rtspQuality; private isVideoConfigured; rtsp_url: string; metadata: StreamMetadata; readonly eventTypesToHandle: (keyof DeviceEvents)[]; streamingDelegate: StreamingDelegate | null; recordingDelegate?: RecordingDelegate | null; private resolutions; constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: Camera); private setupCamera; private getCameraStreamingOptions; /** * Get camera recording options based on device capabilities. * @returns CameraRecordingOptions object */ private getCameraRecordingOptions; private getCameraControllerOptions; private setupButtonService; protected setupSwitchService(serviceName: string, serviceType: 'switch' | 'lightbulb' | 'outlet', propertyName: PropertyName): void; private setupEnableButton; private setupMotionButton; private setupLightButton; private setupChimeButton; /** * Get the configuration for a camera device. * * - Combines default settings with those from the platform config. * - Validates certain settings like talkback capability. * * @returns {CameraConfig} The finalized camera configuration. */ private getCameraConfig; private cameraFunction; private setupMotionFunction; protected getCameraPropertyValue(characteristic: any, propertyName: PropertyName): CharacteristicValue; protected setCameraPropertyValue(characteristic: any, propertyName: PropertyName, value: CharacteristicValue): Promise<void>; /** * Handle push notifications for a doorbell device. * Mute subsequent notifications within a timeout period. * @param characteristic - The Characteristic to update for HomeKit. */ private onDeviceRingsPushNotification; getBitrate(channelId: number): number; setBitrate(channelId: number, value: number): Promise<boolean>; private configureVideoStream; } //# sourceMappingURL=CameraAccessory.d.ts.map