UNPKG

homebridge-eufy-security

Version:
77 lines 3.22 kB
import { API, DynamicPlatformPlugin, Logger, PlatformAccessory } from 'homebridge'; import { EufySecurityPlatformConfig } from './config'; import { EufySecurity } from 'eufy-security-client'; export declare class EufySecurityPlatform implements DynamicPlatformPlugin { config: EufySecurityPlatformConfig; readonly api: API; eufyClient: EufySecurity; readonly accessories: PlatformAccessory[]; private already_shutdown; readonly eufyPath: string; private activeAccessoryIds; private cleanCachedAccessoriesTimeout?; private _hostSystem; nodeJScompatible: boolean; constructor(hblog: Logger, config: EufySecurityPlatformConfig, api: API); /** * Initializes the configuration object with default values where properties are not provided. * If a property is provided in the config object, it overrides the default value. * Additionally, certain numeric properties are parsed to ensure they are of the correct type. * @param config - Partial configuration object with user-provided values. */ private initConfig; /** * Configures the logging mechanism for the plugin. */ private configureLogger; /** * Configures log streams for various log files if log file storage is not omitted. */ private configureLogStreams; private probeHwOs; get hostSystem(): string; private initSetup; private pluginSetup; /** * Generates a UUID based on the given identifier and station flag. * @param identifier The unique identifier. * @param isStation Flag indicating whether the identifier belongs to a station. * @returns The generated UUID. */ private generateUUID; private delay; /** * Defines an accessory for a device or station. * * @param deviceContainer The container holding information about the device or station. * @param isStation A boolean indicating whether the container represents a station. * @returns A tuple containing the created or cached accessory and a boolean indicating whether the accessory was cached. */ private defineAccessory; /** * Adds or updates an accessory for a device or station. * * @param deviceContainer The container holding information about the device or station. * @param isStation A boolean indicating whether the container represents a station. */ private addOrUpdateAccessory; private stationAdded; private deviceAdded; private stationRemoved; private deviceRemoved; private pluginShutdown; /** * This function is invoked when homebridge restores cached accessories from disk at startup. * It should be used to setup event handlers for characteristics and update respective values. */ configureAccessory(accessory: PlatformAccessory): void; private cleanCachedAccessories; private register_station; private register_device; /** * Checks compatibility of the current Node.js version with Livestream functionality. * @returns {boolean} Returns true if the Node.js version is compatible, false otherwise. */ private checkNodeJSVersionCompatibility; } //# sourceMappingURL=platform.d.ts.map