node-red-contrib-tplink-tapo-connect-api
Version:
This unofficial node-RED node allows connection to TP-Link Tapo devices. This project has been enhanced with AI support to enable new features. Starting with v0.50, we have added support for the KLAP protocol. To prioritize the operation of this node, we
33 lines (32 loc) • 1.03 kB
TypeScript
/**
* Generic Device Info Retriever
* Lightweight class for getting device information from any Tapo device
* without needing to know the specific device type
*/
import { BaseTapoDevice, TapoCredentials, TapoApiRequest, TapoApiResponse, TapoDeviceInfo } from '../types';
export declare class GenericDeviceInfoRetriever extends BaseTapoDevice {
private auth;
private klapAuth;
private useKlap;
constructor(ip: string, credentials: TapoCredentials);
/**
* Connect to the device using either KLAP or Secure Passthrough
*/
connect(): Promise<void>;
/**
* Get device information - works for all device types
*/
getDeviceInfo(): Promise<TapoDeviceInfo>;
/**
* Disconnect and cleanup session
*/
disconnect(): Promise<void>;
/**
* Send request using the appropriate protocol
*/
protected sendRequest<T>(request: TapoApiRequest): Promise<TapoApiResponse<T>>;
/**
* Check if device is authenticated
*/
isAuthenticated(): boolean;
}