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

@Gutheinz Thank you so much for such quick response! I really appreciate it! Your solution works great when updating the refresh rate to be 1min. This is a viable workaround for TP-link only device automation. If there are other sensors involved which Smartthings supports originally that triggers the automation, we probably don’t need the communication between Kasa and ST.

1 Like

I am not sure this is something you can help with but thought I would ask. I have several s200 switches and my significant other would like to disable the led indicator that shines when they are off. Does anyone know how to do this?

thanks

Craig

I will look at adding two preferences to the device handlers:

a. LED Off.
b. Synchronize Kasa Name.

No promises. Some experimentation required.

much appreciated, in my googling I came across this.

Not sure if that led state setting applies to switches or just plugs. I’m sure your already aware of this but throwing it out there.

Craig

Hi Dave. Thank you so much for your work on this. For several reasons, I wanted to completely remove the integration and fresh install but have been unable to find a step by step procedure to do it. Could you please post the instructions or point me to them if it already exists somewhere. Thanks very much.
Jim

I used the same command in my testing. Revisited this yesterday. The issue is that the on-off command on the Switches illuminates only the WiFi icon on the switch-plate. It can not turn off the other light. Therefore, no change at this time.

Update. Just tested with following behavior:

HS200 (switch) turns on or off the wifi icon, but has no effect on the power off icon.

HS105 - turns on and off the power on Icon.

Note: The light in the Switch has basically opposite functionality to the plugs - when on the plugs are lit; however, the switches are unlit. Purpose: to find the switch in the dark?

Since the functionality is inconsistent, I will not implement. Too many problem reports will result.

Dave

Before updating, run the Application and select Remove. This is either a big red panel at the bottom or an option on the main page.

The instructions for installation are on the GitHub page under documentation. They are one change behind (I fixed a problem where some IOS users could not save the Kasa password and continue - but the application is pretty self-explanatory.)

Thanks. The problem is that I tried to update and I now have 2 managers. When I try to remove it says it can’t because it’s still in use by devices. Do I need to delete all the Tp-link devices first?

You have to use the Phone App to uninstall the manager before removing the code from the IDE.

Alternatively, you can remove each individual device either using the Phone App (settings for each device) or the IDE (My Device tab) device’s page.

It was the phone app that told me it couldn’t remove it. I’ll try removing the devices first. Thanks for the suggestion! I really appreciate your work on this project.

I’m stuck. When I try within the phone app, removal fails. When I try in the IDE, it fails with a long error msg.

You have gotten yourself into a mismatch between the Device Handler and Service Manager. This mismatch is causing the problems. The below should work (maybe).

Update all Device Handlers to the latest version.
Update both Service Managers to the latest versions, run the Service Manager, and run “Update Installation Data”.
Open each of the Service Managers and run “Remove”. That should work. If not, we will have to modify code.

Dave

Thank you immensely for your help. I was able to remove all the devices, the device handler and the managers. I’ve had the integration working well for a long time but felt I should upgrade. Possibly a mistake. I will carefully follow the instructions to reinstall. Thanks again!
Jim

1 Like

Sorry, one more issue. Reinstalled fine but I am getting an error from Kasa Device Management Page:
[error_code:-20651, msg:Token expired]! Correct before continuing. How to correct?

I’ve ensured my Kasa password is correct. Was going to try uninstalling/reinstalling the manager but I get the error “This SmartApp can’t be deleted at this time because it is installed by one or more users”.

You entered an invalid password or e-mail. Make sure you clear the password field (manually) and enter your password. Watch out for auto-fill within your phone.

Dave

  1. Do not know how to solve password problem. Try again carefully. (I just retested a clean install, no problems. Took < 1 minute. I have a Samsung S8.
  2. You must remove the smart app in the phone app before removing from the IDE. BUT, that will not help.

I have changed my password in the Kasa app and confirmed that I can logout/login using it. Still the same error in the Manager. I also updated the manager to the latest 4.0.03.

Well, problem solved. It seems. Have always used the Classic app. Opened the new Smartthings app and it offered to get a token and did so. Going back to the Classic app, I can now add my devices. No idea why that worked, but something to note for the future. Thanks again.
Jim

The message is DIRECTLY from the Kasa Cloud. It is caused by making a request that can not be fulfilled. This functionality has not changed since the very first edition, and
the code is the same. So I am at a loss.