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
37 lines (36 loc) • 1.2 kB
TypeScript
/**
* Common device type definitions for all Tapo devices
* Single responsibility: Device type classification and categorization
*/
/**
* Tapo device categories
*/
export type TapoDeviceCategory = 'PLUG' | 'BULB' | 'UNKNOWN';
/**
* Supported Tapo device types
*/
export type TapoDeviceType = 'P100' | 'P105' | 'P110' | 'P110M' | 'P115' | 'L510' | 'L520' | 'L530' | 'UNKNOWN';
/**
* Device type to category mapping
*/
export declare const deviceTypeToCategory: Record<TapoDeviceType, TapoDeviceCategory>;
/**
* Device models that support energy monitoring
*/
export declare const energyMonitoringModels: TapoDeviceType[];
/**
* Get device category from device type
*/
export declare function getDeviceCategory(deviceType: TapoDeviceType): TapoDeviceCategory;
/**
* Check if device supports energy monitoring
*/
export declare function supportsEnergyMonitoring(deviceType: TapoDeviceType): boolean;
/**
* Get all device types by category
*/
export declare function getDeviceTypesByCategory(category: TapoDeviceCategory): TapoDeviceType[];
/**
* Check if device type is known/supported
*/
export declare function isKnownDeviceType(deviceType: string): deviceType is TapoDeviceType;