/** * Base class for Tapo Smart Bulbs */ import { BaseTapoDevice, TapoCredentials, TapoApiRequest, TapoApiResponse } from '../../types'; import { TapoBulbInfo, HSVColor, RGBColor, NamedColor, LightEffectConfig, BulbCapabilities } from '../../types/bulb'; import { TapoAuth } from '../../core/auth'; import { KlapAuth } from '../../core/klap-auth'; export declare abstract class BaseBulb extends BaseTapoDevice { protected auth: TapoAuth; protected klapAuth: KlapAuth; protected useKlap: boolean; private requestQueue; private lastRequestTime; private readonly minRequestInterval; constructor(ip: string, credentials: TapoCredentials); /** * Get device model - to be implemented by subclasses */ protected abstract getDeviceModel(): string; /** * Get device capabilities */ getCapabilities(): BulbCapabilities; private checkDeviceConnectivity; connect(): Promise; disconnect(): Promise; /** * Send request with rate limiting and session management */ protected sendRequest(request: TapoApiRequest): Promise>; /** * Turn bulb on */ turnOn(): Promise; /** * Turn bulb off */ turnOff(): Promise; /** * Toggle bulb state */ toggle(): Promise; /** * Convenience aliases following Python API pattern */ on(): Promise; off(): Promise; /** * Check if bulb is on */ isOn(): Promise; /** * Get device information */ getDeviceInfo(): Promise; /** * Set brightness level */ setBrightness(brightness: number): Promise; /** * Get current brightness */ getBrightness(): Promise; /** * Set color using HSV values */ setColor(color: HSVColor): Promise; /** * Set color using RGB values */ setColorRGB(color: RGBColor): Promise; /** * Set color using named color */ setNamedColor(color: NamedColor): Promise; /** * Get current color in HSV format */ getColor(): Promise; /** * Set color temperature */ setColorTemperature(temperature: number, brightness?: number): Promise; /** * Get current color temperature */ getColorTemperature(): Promise; /** * Set light effect */ setLightEffect(config: LightEffectConfig): Promise; /** * Turn off light effects */ turnOffEffect(): Promise; /** * Check if device supports a specific feature */ supportsFeature(feature: keyof BulbCapabilities): boolean; /** * Get device capabilities */ hasColorSupport(): Promise; hasColorTemperatureSupport(): Promise; hasEffectsSupport(): Promise; }