UNPKG

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

54 lines 1.77 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseTapoDevice = exports.DeviceCapabilityError = exports.FeatureNotSupportedError = void 0; exports.getDeviceId = getDeviceId; exports.getDeviceType = getDeviceType; exports.getFwVer = getFwVer; exports.getHwVer = getHwVer; exports.getOnTime = getOnTime; exports.getSignalLevel = getSignalLevel; // Helper functions for backward compatibility function getDeviceId(deviceInfo) { return deviceInfo.device_id; } function getDeviceType(deviceInfo) { return deviceInfo.type; } function getFwVer(deviceInfo) { return deviceInfo.fw_ver; } function getHwVer(deviceInfo) { return deviceInfo.hw_ver; } function getOnTime(deviceInfo) { return deviceInfo.on_time; } function getSignalLevel(deviceInfo) { return deviceInfo.signal_level; } class FeatureNotSupportedError extends Error { constructor(feature, deviceModel, message) { super(message || `Feature '${feature}' is not supported on device model '${deviceModel}'`); this.name = 'FeatureNotSupportedError'; this.feature = feature; this.deviceModel = deviceModel; } } exports.FeatureNotSupportedError = FeatureNotSupportedError; class DeviceCapabilityError extends Error { constructor(capability, reason, message) { super(message || `Device capability '${capability}' unavailable: ${reason}`); this.name = 'DeviceCapabilityError'; this.capability = capability; this.reason = reason; } } exports.DeviceCapabilityError = DeviceCapabilityError; class BaseTapoDevice { constructor(ip, credentials) { this.ip = ip; this.credentials = credentials; } } exports.BaseTapoDevice = BaseTapoDevice; //# sourceMappingURL=base.js.map