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
129 lines (108 loc) • 3.45 kB
HTML
<script type="text/x-red" data-help-name="tplink_command" data-lang="en-US">
<p>Unofficial node-RED node for connecting to TP-Link Tapo devices. Currently limited to the P100 & P105 smart plugs and L510E smart bulbs</p>
<!-- property -->
<hr style="margin-top: 30px; margin-bottom: 30px;" align="middle">
<h3 id="property">Property</h3>
<dl class="message-properties">
<!-- Name -->
<dt class="optional">Name<span class="property-type">string</span></dt>
<dd>set the node name displayed in the flow.</dd>
<!-- Email -->
<dt id="email">Email<span class="property-type">string</span></dt>
<dd>
<p>set the email address registered with Tp Link.</p>
</dd>
<!-- Password -->
<dt id="password">Password<span class="property-type">string</span></dt>
<dd>
<p>set the password registered with Tp Link.</p>
</dd>
<!-- Tapo ipaddress -->
<dt class="optional" id="tapoIpAddress">Tapo ipaddress<span class="property-type">string</span></dt>
<dd>
<p>set the IP address to the Tapo device.</p>
</dd>
</dl>
<!-- inputs -->
<hr style="margin-top: 30px; margin-bottom: 30px;" align="middle">
<h3 id="inputs">Inputs</h3>
<dl class="message-properties">
<dt>msg.payload.email<span class="property-type">string</span></dt>
<dd>
<p><a href="#email">Click here for details</a></p>
</dd>
<dt>msg.payload.password<span class="property-type">string</span></dt>
<dd>
<p><a href="#password">Click here for details</a></p>
</dd>
<dt>msg.payload.deviceIp<span class="property-type">string</span></dt>
<dd>
<p><a href="#tapoIpAddress">Click here for details</a></p>
</dd>
<dt id="command">msg.payload.command<span class="property-type">string</span></dt>
<ul>
<!-- power -->
<li>power</li>
<p>tapo device power on/off</p>
<dl class="message-properties" style="margin:10px 10px 10px 0px;">
<dt><b>msg.payload.option.power</b></dt>
<ul>
<li>0: tapo device power off</li>
<li>1: tapo device power on</li>
</ul>
</dl>
<!-- toggle -->
<li>toggle</li>
<p>tapo device power on/off(toggle)</p>
<!-- status -->
<li>status</li>
<p>get tapo device info</p>
</ul>
<dd>
<p>[e.g]</p>
<pre>
<code>
[case1]
msg.payload = {
"email": "your@gmail.com",
"password": "password",
"deviceIp": "192.168.0.xxx",
"command": "power",
"option": {
"power": 0
}
}
[case2]
msg.payload = {
"email": "your@gmail.com",
"password": "password",
"deviceIp": "192.168.0.xxx",
"command": "toggle"
}
</code>
</pre>
</dd>
</dl>
<!-- outputs -->
<hr style="margin-top: 30px; margin-bottom: 30px;" align="middle">
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload.result<span class="property-type">boolean</span></dt>
<dd>
<p>true: success</p>
<p>false: failure</p>
</dd>
<dt>payload.errorInf<span class="property-type">string</span></dt>
<dd>error object</dd>
</dl>
<!-- details -->
<hr style="margin-top: 30px; margin-bottom: 30px;" align="middle">
<h3>Details</h3>
<p>This node module provides several features by input "msg.payload.command".</p>
<p><a href="#command">Click here for details</a></p>
<!-- details -->
<hr style="margin-top: 30px; margin-bottom: 30px;" align="middle">
<h3>References</h3>
<p>This API uses<a href="https://github.com/dickydoouk/tp-link-tapo-connect"><b>"dickydoouk/tp-link-tapo-connect"</b></a>.</p>
</script>