TP-Link Smart Wi-Fi Light Switch

(Diego Yong) #1

does any one if those work with ST? They are currently on sale at amazon, and I was thinking about getting a couple.

(Paul) #2

Already a thread here:

(Chris) #3

Short answer is there is no official integration. Long answer is that another member created a DTH for this that works in conjunction with a web server that you would have to set up on your internal network, so it’s not a simple solution but it is possible. I have 3 of the HS100 smart outlets and have been using this solution, they have been working flawlessly for about 3 weeks now.

(Luis Rodriguez) #4

Hello, do you have the code for the solution you mentioned to handle the tp-link devices?

(Chris) #5

See this post, I wrote up some instructions using someone else’s code.

(Luis Rodriguez) #6

Will it work with the tp-link hs200?

(Chris) #7

No idea. Try it and let us know :slight_smile:

(David King) #8

I wish someone would come out with a product like this that was integrated with ST. This would be a great solution for those of us with older homes that lack the neutral wire in the wiring and want to automate and be able to use LED lights.

(Mark) #9

Take a look at lutron’s caseta line. Some of the dimmers and switches work with LEDs even without neutral, and there’s now an official ST integration that works well.

Also there’s one switch in Leviton’s Lumina line that works without neutral. It’s a zigbee switch so it works with ST. It’s the ZSS10-G0Z.

(Carter) #10

Did a search and I don’t see much on the TP-Link HS200. I too would like to know if something was figured out. BB here in Canada has them 50% off and if they worked I want to pick up 5 of them.

(Jason) #11

@GetCarter I have the HS200 hooked up to ST using this:

I was using the node.js hub version for a while, but switched to the ‘cloud’ version when it came out and it works great. The only thing is that if you hit the switch manually it can take up to 15 min for ST to see that. However you can change that in the code or use webcore to refresh it on a timer.

(Carter) #12

Thanks for the info! I’m new to this "don’t even have my SmartThing Hub yet which I’m buying soon so haven’t worked with JS yet with a hub. Was hoping it would be simple like other Z-Wave/Zigbee devices. Price was right but for the sake of simplicity I think I’ll have to pass on the switches.

(Dave Gutheinz) #13

You no longer need node.js nor a separate bridge. See the link above. The cloud version requires only installation of items into the SmartThings IDE. For the HS200 (I have 3), you install the Service Manager and Device Handler in the IDE, then run the Service Manager. Full instructions available at source link. (Disclaimer: I am the author of the mentioned integration for SmartThings to TP-Link. This series was my first project herein and my first software project since 1980.)

This is similar for other community supported devices. Most have some sort if installation instructions and do not require external bridges/hubs. Some are great, some are good, some are so-so. But if free…

That being said, the only devices that the SmartThings team will guarantee to operate are those in the official Marketplace. Some Z-wave and Zigbee devices will install with the generic device handlers, but that is not 100%. Research
a. The SmartThings Marketplace (guaranteed to work)
b. Things that are smart Wiki (see link below)
c. This set of BLOGS
d. Ask, like you have.

(Carter) #16

Thanks for the reply. I’m going to read this all over to get a better understanding of ST IDE and how it works and what I would need to add to make these work.

Also quick heads up on the spelling of this page for the word “Cloud”

(Dave Gutheinz) #17

Have fun, but be careful. There are a lot of rabbit holes you can go down. Full of wicked queens, mad hatters, and other things that can suck you dry.



Thank you for posting the code on GitHub for TP-Link devices. I just installed it and it works great. I had purchased 5 switches and I thought I was going to have to go through the aggravation of returning them and purchasing new ones.

Thank you,


(David) #19

Hi Dave,

First, thank for your work. I’ve tried creating that new smart app, pasting your code, but get the following error:

No signature of method: script_app_metadata_a05a7a1b_1009_42a9_91b6_771cc63f776a.metadata() is applicable for argument types: (script_app_metadata_a05a7a1b_1009_42a9_91b6_771cc63f776a$_run_closure1) values: [script_app_metadata_a05a7a1b_1009_42a9_91b6_771cc63f776a$_run_closure1@633a9756] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)

I have a Kasa account, a SmartThings IDE account, etc. Not sure what I’m doing wrong here.

Also, the Device Handler form requires much more information than is available. Am I supposed to be editing any parts of the code?

Thanks in advance,


(Dave Gutheinz) #20


I would suggest you read the installation instructions (on the GitHub page) and follow it closely.

  1. The error you are stating is too general. It could be caused by pasting a device handler into a smart-app form or vice-a-versa. Since I do not know the explicits, it is virtually impossible to resolve.
  2. There should be no need to use the device handler form. You paste from source code (as opposed to form).

Again, the provided instructions have servered many well. If you have a problem, the error (as above) as well as the step from the instructions will assist in determining what is going on.


(David) #21

Thanks for your quick reply. I did just that and found my error. I successfully was able to end=ter the code for the Smart App and Device Handler.

However, now I am struggling with being unable to find and add any kind of TP-Link or experimental TP-Link app within the SmartThings app itself. Simply does not show as an option.

(Dave Gutheinz) #22

You may not have selected your location. How device handlers an d service manager must be installed only after selecting the location. If net, the ST phone app will not see them.