[Resolved] TP-Link Kasa: Commands not working

I added all the lights and plugs i have linked on smartthings, all the light switches work well , the issue happend when i try to control the smartplugs (Kasa Plugs Linked to Smartthings) i get this error "Result: unexpected error: 400 ", so i’m unable to control them.

Need Help!!

This sounds like an error message from the SharpTools for Android app - is that right?

How are you trying to control your Kasa plugs – via the main SharpTools Android app, Tasker plugins, or widgets? And is this using a community Device Type Handler or an official SmartThings integration?

Yes, i’m using the SharpTools for Android app.

I’m trying to control the plugs via the main SharpTools android app, i also pay for the widgets to control them that way, but i’m unable to do it as well.

And is it a community DTH for Kasa or…?

An error 400 typically indicates a client side error - most often this occurs when using Tasker plugins or widgets and trying to send a command with incorrect parameters. I assume you’re just trying to toggle the outlet on/off though, right?

I’m using an official SmartThings integration, thats why i find it odd. The bulbs are Philips Hue and they work just find.

From what I understand, they just released the new official TPLink Kasa integration last month, so I guess it doesn’t surprise me completely. :stuck_out_tongue: :man_shrugging:

I’ve read of one or two other brand new integrations that have quirks - for example, only working in the new Samsung SmartThings mobile app and not working in the SmartThings Classic app.

The next troubleshooting step would be to watch the SmartThings IDE Live Logs while attempting to reproduce the error and see if there are any clues as to what is going on. Have you used the SmartThings IDE before?

To check the logs from the SmartThings IDE:

  1. Login to the SmartThings IDE at: https://account.smartthings.com/
  2. Tap the Live Logging button in the top navigation
  3. Leave the Live Logging open and try to reproduce the issue using the SharpTools app
  4. Provide a copy of the logs here

Here are the logs:

That’s really bizarre that the device doesn’t support the on() and off() methods which are officially defined by the SmartThings Switch capability.

I’ve reached out to the SmartThings team to see if they have any thoughts on it. From what I recall, this Kasa integration was part of SmartThings’ new CST program (Connects with SmartThings) where the hardware manufacturer can build their own integration and then self certify. My guess is something about this integration doesn’t play nice with SmartApps.

Do you use the SmartThings Classic mobile app and if so, can you turn these plugs on/off from that app? Or better yet, can you turn the plugs on/off from any other traditional SmartApps like ‘Smart Lighting’?

In the meantime, you could likely workaround this by using a community developed Kasa integration, but I believe most of those require keeping a PC or Raspberry Pi running a small Node.js script.

I use the new Smartthings app and i can turn these plugs on/off from the app with no issue, the problem is when i try to toggle the switches from the Sharptools android app.

I hope this issue can be solve in the future, because i feel i little dissapointed for buying the widgets capability and being unable to use these plugs

Thanks.

To be clear, this appears to be an issue with the device integration with SmartThings as the on/off commands are being issued to SmartThings just fine, but the device is saying it doesn’t accept that command.

Reading through the various SmartThings groups, it looks like this new TP-Link Kasa integration doesn’t work with any third-party app (SharpTools, WebCoRE, ActionTiles, etc.) and they don’t even work with the SmartThings Classic app.

I’ve reached out to SmartThings, so let’s see what they say…

Just an update that we’ve been in contact with SmartThings Engineering and believe we have a path forward. I picked up a TP-Link Kasa device so I can do some testing and see if we can workaround the issue in the short term.

Wow thanks man, really appreciate it. Keep the good work. Hope you can solve it.

@Jesus_Jose_Mendez we made some enhancements to the SharpTools SmartApp to workaround the issue with TP-Link Kasa integration and worked with SmartThings Engineering to deploy the changes.

Can you please reauthorize your devices in the SharpTools for Android app (Settings > Authorize Devices) and then try the plug again?

I just did it and it worked!!! Thanks a lot for your help, you’re the best!!

2 Likes