[Deprecated] New TP-Link/Kasa Plug, Switch, and Bulb Integration

I am currently on Hubitat and have similar code there. If anyone knows of explicit fixes for the DTH to help integration into the new API, please let me know.

OK, I figured this out. As usual, it cost me a day of my life, but right now I’m drinking a beer and feeling it was worth it.

I got my TP Link Kasa HS 300 to show energy values in the new Smartthings app by finally getting the right device handler into my IDE. It is DEPRECATED-TP-Link-SmartThings/TP-Link EM Multi-Plug.groovy at master · DaveGut/DEPRECATED-TP-Link-SmartThings · GitHub

And the Smart App (Service Manager) is DEPRECATED-TP-Link-SmartThings/TP-Link SmartThings Manager.groovy at master · DaveGut/DEPRECATED-TP-Link-SmartThings · GitHub

It’s very easy to get an incorrect device handler, or at least it was for me. It was in the Deprecated list, but not on this table in the documentation. I found it by sifting through conversations to find Dave Gutheinz’s update for the HS 300 Device Handler. “TP Link EM Multi-Plug.groovy” is the one you need.

1 Like

Surprised it still works!

Yes it seems to work fine. What threw me was that this table doesn’t include the “TP Link EM Multi-Plug.groovy” DH which is the one I needed. But I eventually found it.

1 Like

Im constantly getting either network error or token error. Tried reinstalling, resetting kasa password, not using any password managers. Cant get past this step.

Appreciate any help or guidance.

And this one !

Getting the same thing. Shame there is no home energy monitoring with the official kasa ST link. I wonder if this is because this is the new ST app not the classic?

No. It is because the TP-Link integration for the devices did not include the Energy Monitor functions. If you contact TP-Link, you may have some chance for them to include in the SmartThings integration.


I gave up with it, returned it back to Amazin and found some official smartthings plugs. They work really well and the energy readout is very quick. Ive got it hooked into Webcore now in a laundry piston. Happy days.

1 Like

Just got the KP115 and did the following to get it to work with smartthings

  1. Set up KP115 through the KASA smart app in my newly created KASA account
  2. Copy-pasted Davgut’s version 4 of the smart app in IDE, added the extra line for KP115 as mentioned by Ernie and published it for me
  3. Copied and pasted Davgut’s deprecated device handler in IDE and published it for me
  4. Added TP Link service manager in the new smartthings smart app
  5. Once added, I double-clicked the TP Link manager and updated the credentials with the token
  6. Then, I added the device and KP115 was found and added to smartthings under ‘No room assigned’
  7. I went to the TP link manager again and updated the device preferences to set the refresh rate
  8. Came back to smartthings and clicked on the smart plug where I can now see power meter and energy consumption
  9. I immediately wrote a simple automation to fire at 6PM and if the power meter is showing more than 5 W. I turned on the printer which showed the power as 12W and the automation fired perfectly
  10. So all done and am happy that I have not lost out on the purchase

Huge thanks for Davgut and Ernie.


Yes thanks Dave and Ernie I had to use your deprecated smart app to get the KP115 running and I followed Subramanian summary and it works fine. This is much better then the supposed better smartthings built integration.

1 Like

It is, but since the smartthings-hosted groovy cloud will be discontinued sometime this year, you may need to start thinking about a Plan B. The official integration is already on the new architecture, so it doesn’t have that issue.

From Dave.

This is why I left SmartThings. It was a dead-end for the ide development and I am not inclined to learn yet another method (at the age of 73).

Anyone who wishes to use my code as a basis for a new integration is more than welcome.


1 Like

Wow I understand. The problem with the official integration is that it does not allow for all the devices that indicate works with smartthings on the boxes like the kp115. When I contacted kasa about this they said well just send them back as you are right it is not supported. You would think they would at least have included all their devices or changed the packaging

1 Like

They probably hard-coded the model instead of basing devices based on capabilities. The data to do the second one is in the device status data. I use this in Hubitat and no longer have to update every time a new model comes out.

Good luck.

1 Like

Worked like a charm, i am able to run my rules with notifications. Greatly appreciate the step by step write up and Smartapp owner Dave and Ernie. I learn a lot from the community

1 Like

Has anyone been able to get this working in the latest version of the SmartThings app?
I just bought two of the KP115 smart outlets and was disappointed I could not get the energy monitoring in SmartThings/WebCoRE. I’ve followed all of the directions and things seem to be good up until I add the SmartApp within SmartThings. I’m able to log into my Kasa account and pull in the list of devices, but once I try to select one, it just errors out and says:

I’ve tried removing and re-adding several times and have not had any luck

@sdschramm Small world - I just bought (2) HS110 this weekend and am stuck at the same step you are, though I don’t get an error. I select a device to add when I click done, it doesn’t bring them into the app. I am assuming we are SoL, given that the DH is deprecated, unfortunately.

Maybe @Gutheinz can shed some light?

I am planning on returning them since my entire application hinges on being able to read the power.

My only guess is recent platform changes to SmartThings. One of the reasons I deprecated the integration and went to Hubitat (where I have a similar (better) integration.


1 Like

I was able to get this switches to work with Home Assistant very easily and it has all the energy monitoring details.

The only reason I’m still sticking around with SmartThings is I have so many auotmations in WebCoRE. Trying to replicate them in Home Assistant is difficult and Node-RED is even more difficult.

I’ve considered Habitat many times, but I really don’t want to buy another hub and migrate everything to that just to keep WebCoRE.

At this point, I’m hanging on until Samsung pulls the plug on the IDE. Then I’ll be forced to jump one way or the other.