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.
49 lines (48 loc) • 2.07 kB
TypeScript
import type { PlatformAccessory } from "homebridge";
import { type HomebridgePluginLogging, MqttClient, type Nullable } from "homebridge-plugin-utils";
import { ProtectNvrSystemInfo } from "./devices/index.js";
import type { ProtectNvrConfig } from "unifi-protect";
import type { ProtectDeviceConfigTypes, ProtectDevices } from "./protect-types.js";
import { ProtectApi } from "unifi-protect";
import { ProtectEvents } from "./protect-events.js";
import type { ProtectNvrOptions } from "./protect-options.js";
import type { ProtectPlatform } from "./protect-platform.js";
export declare class ProtectNvr {
private api;
config: ProtectNvrOptions;
private deviceRemovalQueue;
readonly configuredDevices: {
[index: string]: ProtectDevices;
};
events: ProtectEvents;
private featureLog;
private hap;
private liveviews;
logApiErrors: boolean;
readonly log: HomebridgePluginLogging;
mqtt: Nullable<MqttClient>;
private name;
platform: ProtectPlatform;
systemInfo: Nullable<ProtectNvrSystemInfo>;
ufp: ProtectNvrConfig;
ufpApi: ProtectApi;
private unsupportedDevices;
constructor(platform: ProtectPlatform, nvrOptions: ProtectNvrOptions);
private bootstrapNvr;
login(): Promise<void>;
private configureNvr;
private addProtectDevice;
addHomeKitDevice(device: ProtectDeviceConfigTypes): boolean;
private discoverAndSyncAccessories;
private cleanupDevices;
removeHomeKitDevice(accessory: PlatformAccessory, noRemovalDelay?: boolean): void;
private servePlaylist;
private get devicelist();
private devices;
getDeviceById(deviceId: string): Nullable<ProtectDevices>;
getFeatureFloat(option: string): Nullable<number | undefined>;
getFeatureNumber(option: string): Nullable<number | undefined>;
isNvrFeature(option: string, device?: ProtectDeviceConfigTypes | ProtectNvrConfig): boolean;
hasFeature(option: string, device?: ProtectDeviceConfigTypes | ProtectNvrConfig): boolean;
logFeature(option: string, message: string): void;
}