TP-Link Smart Wi-Fi Light Switch

(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.


Hi Dave, thanks for writing the code I got my 2 HS100 working but my HS200 keeps getting comms Error. I have try remove the device and add again, republish the device handler, but nothing works. It is working fine under the Kasa app. Please advice thanks

(Dave Gutheinz) #24

I assume you are talking about the cloud version.

The most likely cause is that your HS200 has remote control turned off in the Kasa App. If that is off, then it is not available for cloud control. Open the Kasa App
a. Select your HS200
b. Upper left hand corner - select the bars
c. First item is remote control - select so the tab is green.



thanks for your quick reply Dave. The remote control was on but I had to reset the switch and uninstall from Kasa and smartThings then reinstall everything. Now everything seems to work fine.

(pradeep) #26

Hi @Gutheinz

I have installed TP Link necesary device handlers and all working fine. however i have to remove the tp link physical lights due to some works and when i replaced them back… Tp link lights working weirdly(if i switch off the light in smarthings app, it wont update the status straight away… i need to refresh it). and i cannot see any options related to ENUM. I tried to delete the smartapp from IDE and it dosen’t allow me to do it. Can you help me how to get them back to normal?

(Dave Gutheinz) #27

Same here. Looking at the code, it appears that the firmware on the bulbs has been updated (more equivalent with the plugs). Causes an error in the return parsing.

Will start fixing today and notify when fixed with instructions.