[RELEASE] TP-Link Plug, Switch, and Bulb integration


I just installed an HS105 and it all worked as it's supposed to. But I did need to apply a little guesswork as to which device handler was the right one. (Chose Plug-Switch over Multi-Plug and I was right.)

Thanks @djgutheinz !



I am ready to move to your node.js code and wanted to know what I need to do to transition my TP-Link devices from cloud over to local. I didn't see anything on the readme on your GitHub. So any guidance is appreciated!


It will currently require a full re-install to the latest version (see last part of this post). If you have a lot of devices - a bummer. I have to you want applet installation instructions.

I created this morning applet installation instructions for Windows, Android, and Fire devices. Installation on Raspberry Pi and MAC are beyond my experience. See next post.

If someone has instructions, I would be happy to steal for inclusion in the baseline.

Future consideration (on-request): An App and Driver version that allows switching from Hub <-> Cloud (both directions) as desired. This would work even on older versions by updating App and Driver and running app. Will take about a day to create/test.


Install Instructions for the TP-LinkHub_v3.js applet onto Windows, Android, add Fire tablet.


So what are you using outside of node.js for libraries. Maybe I can help with the Raspi. Can you send URLs of those added libraries?


Ignorant here of what you mean. The only time I use node.js is for the Hubitat and SmartThings integrations and I did not need special libraries for that script.


In your instructions you state to download servers ultimate pro and servers ultimate pro f. Hence why I am asking what libraries are you using. :grin:


These are both downloaded from Google Play or the Fire App Store. Do not know for IOS devices. Updated instruction (this was also in the first paragraph).

I am currently updating handlers and and application. One focus is to allow the auto-switch over. May take a day or so, but hope to finish by tomorrow.



Developing UDP version.

I am suspending all version 3.x development at the just released beta. I have found a way to make the UDP work so that devices can be controlled without either a node.js hub nor a Kasa Account (single install for all devices). I have to port some node.js code over to groovy for (1) discovery, and (2) encryption (done previously). After that, we will have a Version 4 app and driver set.



So I suspect you are pretty much going to abandon the Node.JS after this latest findings correct? Your development is freaky-fast! Do you work at JimmyJohns?


No. 70 YO retiree with no life. And you are correct. For Hubitat, if I get a good UDP implementation then the Node Applet is OBE - not abandoned.


your work is certainly appreciated!


Dave and Anthony,

This is truly impressive. I just installed my Hubitate today and setup your new UDP driver for my three HS100s, worked perfectly.

Your work is much appreciated,


Glad you like it. The instructions were for a upgrade install and did not include one step:

Assure you assign a static IP address (in your router) for the devices. Otherwise (rarely) you will loose connection.


Working great on my HS105. Thank you!


This was the missing thing for me, came here to say it wasn't working, but had to pull the IP and enter it (and reserve it on the router).


@djgutheinz This is working great for a couple HS100s I pulled out of the 'Not local device boneyard'. Works so good in fact, I got rid of the trace logs.:grinning:

Thanks for your hard work!


Confirming it works great on the tunable white bulb (LB-120).



I been following your work, I must say it's great and a big thank you for it.

I know in some point you were involved in the Tuya/Smartlife driver, which is very similar with the node.js. Do you know if those devices could get a driver like this? With the UDP? That will be awesome for this community. Thank you.


That would be the decision of @cwwilson08. Looking at his implementation, the API is in java script. Difference, the TP-Link commands are embedded in the driver. Because of my original implementation, the work to go to UDP (i.e., nodeless) was limited to (1) implementing the encryption in the driver language, and (2) implementing the UDP send and initial parse. Not difficult.

To port, the relevant API elements would have to be coded into the Driver and UDP implemented to send the command. Not a trivial task.