homebridge-unifi-protect
Version:
Homebridge UniFi Protect plugin providing complete HomeKit integration for the entire UniFi Protect ecosystem with full support for most features including HomeKit Secure Video, multiple controllers, blazing fast performance, and much more.
69 lines (68 loc) • 2.66 kB
TypeScript
import type { PlatformAccessory, Resolution } from "homebridge";
import type { ProtectCameraChannelConfig, ProtectCameraConfig, ProtectEventPacket } from "unifi-protect";
import { LivestreamManager } from "../protect-livestream.js";
import type { MessageSwitchInterface } from "./protect-doorbell.js";
import type { Nullable } from "homebridge-plugin-utils";
import type { ProtectCameraPackage } from "./protect-camera-package.js";
import { ProtectDevice } from "./protect-device.js";
import type { ProtectNvr } from "../protect-nvr.js";
import { ProtectStreamingDelegate } from "../protect-stream.js";
export interface RtspEntry {
channel: ProtectCameraChannelConfig;
lens?: number;
name: string;
resolution: Resolution;
url: string;
}
type RtspOptions = Partial<{
biasHigher: boolean;
default: string;
maxPixels: number;
rtspEntries: RtspEntry[];
}>;
export declare class ProtectCamera extends ProtectDevice {
private accessUnlockTimer?;
private ambientLight;
private ambientLightTimer?;
private isDeleted;
isRinging: boolean;
detectLicensePlate: string[];
readonly livestream: LivestreamManager;
messageSwitches: {
[index: string]: MessageSwitchInterface;
};
packageCamera?: Nullable<ProtectCameraPackage>;
private rtspEntries;
private rtspQuality;
stream: ProtectStreamingDelegate;
ufp: ProtectCameraConfig;
constructor(nvr: ProtectNvr, device: ProtectCameraConfig, accessory: PlatformAccessory);
protected configureHints(): boolean;
protected configureDevice(): boolean;
cleanup(): void;
protected eventHandler(packet: ProtectEventPacket): void;
protected addEventHandler(packet: ProtectEventPacket): void;
private configureAmbientLightSensor;
private configureAccessFeatures;
private configureMotionSmartSensor;
private configureDoorbellTrigger;
protected configureVideoDoorbell(): boolean;
private configureCameraDetails;
private configureCrop;
private configureVideoStream;
private configureHksv;
private configureHksvRecordingSwitch;
private configureNightVisionDimmer;
private configureNvrRecordingSwitch;
protected configureMqtt(): boolean;
updateDevice(): boolean;
private findRtspEntry;
findRtsp(width: number, height: number, options?: RtspOptions): Nullable<RtspEntry>;
findRecordingRtsp(width: number, height: number): Nullable<RtspEntry>;
private sortByResolutions;
protected getResolution(resolution: Resolution): string;
get isHksvCapable(): boolean;
private get nightVision();
private get nightVisionBrightness();
}
export {};