homebridge-eufy-security
Version:
Control Eufy Security from homebridge.
84 lines • 3.31 kB
TypeScript
import { PlatformAccessory, CharacteristicValue, Resolution } from 'homebridge';
import { EufySecurityPlatform } from '../platform';
import { DeviceAccessory } from './Device';
import { Camera, DeviceEvents, PropertyName, StreamMetadata, PropertyValue } from 'eufy-security-client';
import { CameraConfig } from '../utils/configTypes';
import { StreamingDelegate } from '../controller/streamingDelegate';
import { RecordingDelegate } from '../controller/recordingDelegate';
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;
rtsp_url: string;
metadata: StreamMetadata;
standalone: boolean;
readonly eventTypesToHandle: (keyof DeviceEvents)[];
protected streamingDelegate: StreamingDelegate | null;
protected recordingDelegate?: RecordingDelegate | null;
resolutions: Resolution[];
constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: Camera);
private setupCamera;
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 applyPropertyValue(characteristic: any, propertyName: PropertyName, value: PropertyValue): 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(): number;
setBitrate(): Promise<boolean>;
private configureVideoStream;
private getCameraControllerOptions;
}
//# sourceMappingURL=CameraAccessory.d.ts.map