UNPKG

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.

95 lines 4.34 kB
import type { Camera, Chime, DeviceCollectionKey, Fob, Light, Relay, Sensor, Viewer } from "unifi-protect"; import type { CharacteristicValue, PlatformAccessory, PlatformConfig } from "homebridge"; import type { ProtectCamera } from "./devices/cameras/camera.ts"; import type { ProtectChime } from "./devices/chime.ts"; import type { ProtectFob } from "./devices/fob.ts"; import type { ProtectLight } from "./devices/light.ts"; import type { ProtectNvrOptions } from "./options.ts"; import type { ProtectRelay } from "./devices/relay.ts"; import type { ProtectSensor } from "./devices/sensor.ts"; import type { ProtectViewer } from "./devices/viewer.ts"; export declare function exhaustiveGuard(_value: never): void; export interface ProtectDeviceTypes { camera: ProtectCamera; chime: ProtectChime; fob: ProtectFob; light: ProtectLight; relay: ProtectRelay; sensor: ProtectSensor; viewer: ProtectViewer; } export interface ProtectProjectionMap { camera: Camera; chime: Chime; fob: Fob; light: Light; relay: Relay; sensor: Sensor; viewer: Viewer; } export type ProtectDevices = ProtectDeviceTypes[DeviceCollectionKey]; type IdentityKeys = "id" | "mac" | "modelKey"; export type WithoutIdentity<T> = T extends unknown ? { [K in keyof T as K extends IdentityKeys ? never : K]: T[K]; } : never; export interface ProtectAccessoryContext { detectMotion?: boolean; doorbellMuted?: boolean; hksvRecordingDisabled?: boolean; liveview?: string; liveviewState?: boolean; mac?: string; nvr?: string; packageCamera?: string; securityState?: CharacteristicValue; systemInfo?: boolean; } export type ProtectPersistedContextState = Partial<Pick<ProtectAccessoryContext, "detectMotion" | "doorbellMuted" | "hksvRecordingDisabled">>; export type ProtectAccessory = PlatformAccessory<ProtectAccessoryContext>; export declare const PACKAGE_CAMERA_ID_SUFFIX = ".PackageCamera"; export declare function packageCameraId(mac: string): string; export declare function isPackageCameraContext(context: ProtectAccessoryContext): context is ProtectAccessoryContext & { packageCamera: string; }; export declare const PACKAGE_CAMERA_NAME_SUFFIX = " Package Camera"; export interface ProtectPlatformConfig extends PlatformConfig { controllers?: ProtectNvrOptions[]; debug?: boolean; options?: string[]; ringDelay?: number; verboseFfmpeg?: boolean; videoProcessor?: string; } export declare const ProtectReservedNames: { readonly CONTACT_AUTHSENSOR: "ContactAuthSensor"; readonly CONTACT_MOTION_SMARTDETECT: "ContactMotionSmartDetect"; readonly CONTACT_MOTION_SMARTDETECT_LICENSE: "ContactMotionSmartDetectLicense"; readonly CONTACT_SENSOR: "ContactSensor"; readonly CONTACT_SENSOR_ALARM_SOUND: "ContactAlarmSound"; readonly CONTACT_SENSOR_GLASS_BREAK: "ContactGlassBreak"; readonly LEAKSENSOR_EXTERNAL: "External"; readonly LEAKSENSOR_INTERNAL: "Internal"; readonly LIGHTBULB_DOORBELL_VOLUME: "ChimeVolume"; readonly LIGHTBULB_NIGHTVISION: "NightVision"; readonly LIGHTBULB_PACKAGE_FLASHLIGHT: "PackageCamera.Flashlight"; readonly LOCK_ACCESS: "Access"; readonly SWITCH_DOORBELL_CHIME_BUZZER: "DoorbellChime.buzzer"; readonly SWITCH_DOORBELL_CHIME_DIGITAL: "DoorbellChime.digital"; readonly SWITCH_DOORBELL_CHIME_MECHANICAL: "DoorbellChime.mechanical"; readonly SWITCH_DOORBELL_CHIME_NONE: "DoorbellChime.none"; readonly SWITCH_DOORBELL_CHIME_SPEAKER: "DoorbellChime.speaker"; readonly SWITCH_DOORBELL_MUTE: "DoorbellMute"; readonly SWITCH_DOORBELL_TRIGGER: "DoorbellTrigger"; readonly SWITCH_FOB_BUTTON: "FobButton"; readonly SWITCH_HKSV_RECORDING: "HKSVRecordingSwitch"; readonly SWITCH_MOTION_SENSOR: "MotionSensorSwitch"; readonly SWITCH_MOTION_TRIGGER: "MotionSensorTrigger"; readonly SWITCH_RELAY_OUTPUT: "RelayOutput"; readonly SWITCH_STATUS_LED: "StatusLedSwitch"; readonly SWITCH_UFP_RECORDING_ALWAYS: "UFPRecordingSwitch.always"; readonly SWITCH_UFP_RECORDING_DETECTIONS: "UFPRecordingSwitch.detections"; readonly SWITCH_UFP_RECORDING_NEVER: "UFPRecordingSwitch.never"; }; export type ProtectReservedNames = (typeof ProtectReservedNames)[keyof typeof ProtectReservedNames]; export {}; //# sourceMappingURL=types.d.ts.map