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

94 lines (87 loc) 3.86 kB
<!DOCTYPE html> <!-- Copyright JS Foundation and other contributors, http://js.foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <script type="text/javascript"> function mk_conf(NAME) { console.log("mk_conf"); const conf = { category: 'tplink connect APIs', color: 'rgb( 63, 173, 181)', defaults: { name: { value: "" }, deviceIp: { value: "", required: true } }, credentials: { email: { type:"text" }, password: { type:"password" } }, inputs: 1, outputs: 1, align: "left", icon: "icon-toggle.png", paletteLabel: NAME, label: function () { return this.name || this._("resources.paletteLabel"); }, labelStyle: function () { return this.name ? "node_label_italic" : ""; }, paletteLabel: function () { return this._("resources.paletteLabel") || NAME; }, oneditsave: function () { var that = this; }, }; return conf; } RED.nodes.registerType('tplink_toggle', mk_conf('tplink_toggle')); </script> <script type="text/html" data-template-name="tplink_toggle"> <div id="list-property"> <!-- ノード名 --> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="resources.labels.name"></span></label> <input type="text" id="node-input-name"> </div> <!----------------------------------------------------------------------------> <hr> <!----------------------------------------------------------------------------> <!-- email --> <div class="form-row"> <label for="node-input-email"><i class="fa fa-shield"></i><span data-i18n="resources.labels.email"></span></label> <input type="text" id="node-input-email" placeholder="tplink account email"> </div> <!-- password --> <div class="form-row"> <label for="node-input-password"><i class="fa fa-key"></i><span data-i18n="resources.labels.password"></span></label> <input type="password" id="node-input-password" placeholder="tplink account password"> </div> <!----------------------------------------------------------------------------> <hr> <!----------------------------------------------------------------------------> <!-- Tapo device settings --> <p><b><span data-i18n="resources.labels.targetDeviceSettings"></span></b></p> <p><span data-i18n="resources.descriptions.targetDeviceSettings"></span></p> <!-- deviceIp --> <div class="form-row"> <label for="node-input-deviceIp"><i class="fa fa-map-marker"></i><span data-i18n="resources.labels.deviceIp"></span></label> <input type="text" id="node-input-deviceIp" placeholder="your tapo deviceIp(e.g: 192.168.0.100)"> </div> <!----------------------------------------------------------------------------> <hr> <!----------------------------------------------------------------------------> </div> </script> <style> </style>