homebridge-unifi-access
Version:
Homebridge UniFi Access plugin providing complete HomeKit integration for the UniFi Access ecosystem with full support for most features including autoconfiguration, motion detection, multiple controllers, and realtime updates.
56 lines (55 loc) • 2.21 kB
TypeScript
import type { API, HAP, PlatformAccessory } from "homebridge";
import type { AccessApi, AccessDeviceConfig, AccessEventPacket } from "unifi-access";
import { type HomebridgePluginLogging, type Nullable } from "homebridge-plugin-utils";
import type { AccessController } from "./access-controller.js";
import type { AccessPlatform } from "./access-platform.js";
export interface AccessHints {
hasDps: boolean;
ledStatus: boolean;
logDoorbell: boolean;
logDps: boolean;
logLock: boolean;
logMotion: boolean;
motionDuration: number;
occupancyDuration: number;
syncName: boolean;
}
export declare abstract class AccessBase {
readonly api: API;
private debug;
protected readonly hap: HAP;
readonly log: HomebridgePluginLogging;
readonly controller: AccessController;
udaApi: AccessApi;
readonly platform: AccessPlatform;
constructor(controller: AccessController);
protected setInfo(accessory: PlatformAccessory, device: AccessDeviceConfig): boolean;
get name(): string;
}
export declare abstract class AccessDevice extends AccessBase {
accessory: PlatformAccessory;
hints: AccessHints;
protected listeners: {
[index: string]: (packet: AccessEventPacket) => void;
};
abstract uda: AccessDeviceConfig;
constructor(controller: AccessController, accessory: PlatformAccessory);
protected configureHints(): boolean;
configureInfo(): boolean;
cleanup(): void;
protected configureMotionSensor(isEnabled?: boolean, isInitialized?: boolean): boolean;
private configureMotionSwitch;
private configureMotionTrigger;
private configureMqttMotionTrigger;
protected configureOccupancySensor(isEnabled?: boolean, isInitialized?: boolean): boolean;
getFeatureFloat(option: string): Nullable<number | undefined>;
getFeatureNumber(option: string): Nullable<number | undefined>;
getFeatureValue(option: string): Nullable<string | undefined>;
hasFeature(option: string): boolean;
isReservedName(name: string | undefined): boolean;
get isOnline(): boolean;
get id(): string;
get name(): string;
get accessoryName(): string;
set accessoryName(name: string);
}