import FakeGatoHistory from 'fakegato-history'; import type { API, Characteristic, DynamicPlatformPlugin, Logging, PlatformAccessory, PlatformConfig, Service } from 'homebridge'; import storage from 'node-persist'; import { AWSClient, BLEClient, HTTPClient, LANClient } from './connection/index.js'; import type { GoveePluginConfig, GoveePlatformAccessory, GoveePlatformAccessoryWithControl, DeviceCommand, ExternalUpdateParams } from './types.js'; export declare const PLATFORM_NAME = "Govee"; export interface ExtendedLogging extends Logging { debug: (msg: string, ...args: unknown[]) => void; debugWarn: (msg: string, ...args: unknown[]) => void; } /** * Govee Platform Plugin for Homebridge */ export declare class GoveePlatform implements DynamicPlatformPlugin { readonly Service: typeof Service; readonly Characteristic: typeof Characteristic; readonly api: API; readonly log: ExtendedLogging; readonly config: GoveePluginConfig; deviceConf: Record>; ignoredDevices: string[]; awsClient: AWSClient | false; bleClient: BLEClient | false; httpClient: HTTPClient | false; lanClient: LANClient | false; cusChar: Record; eveChar: Record; eveService: ReturnType; storageData: typeof storage; storageClientData: boolean; accountTopic?: string; accountToken?: string; accountId?: string; accountTokenTTR?: string; clientId?: string; iotEndpoint?: string; iotPass?: string; private readonly devicesInHB; private readonly awsDevices; private readonly httpDevices; private readonly lanDevices; private readonly isBeta; private queue; private refreshBLEInterval?; private refreshHTTPInterval?; private refreshAWSInterval?; private awsSyncInProgress; private httpSyncInProgress; constructor(log: Logging, config: PlatformConfig, api: API); private applyUserConfig; pluginSetup(): Promise; private setupLANClient; private setupHTTPAndAWSClients; private setupBLEClient; /** * Store discovered devices in storage for UI auto-population */ private storeDiscoveredDevices; private initializeDevices; pluginShutdown(): void; applyAccessoryLogging(accessory: GoveePlatformAccessoryWithControl): void; initialiseDevice(device: Record): void; addAccessory(device: { device: string; deviceName: string; model: string; }): GoveePlatformAccessoryWithControl | undefined; configureAccessory(accessory: PlatformAccessory): void; removeAccessory(accessory: GoveePlatformAccessory): void; goveeHTTPSync(): Promise; goveeAWSSync(): Promise; sendDeviceUpdate(accessory: GoveePlatformAccessoryWithControl, params: DeviceCommand): Promise; receiveUpdateLAN(accessoryId: string, params: Record, ipAddress: string): void; receiveUpdateAWS(payload: Record): void; receiveDeviceUpdate(accessory: GoveePlatformAccessoryWithControl, params: ExternalUpdateParams): void; updateAccessoryStatus(accessory: GoveePlatformAccessoryWithControl, online: boolean): void; } export default GoveePlatform;