Invalid authentication: Server response doesn't match our challenge on ip TP-Link

This fixed it for me. I updated the firmware of my power strips and they all got disconnected from HA. Looks like that Third-Party Compatibility toggle was disabled after the firmware update was complete. Re-enabling it using the Kasa app, and then logging in with my TP-Link credentials for each power strip in HA fixed it.

Thank you @thatsiebguy !

I had the same issue. All of my devices were originally set up in the Kasa app. I had to link Tapo with Kasa, enable Third-Party Compability, then basically readd the device using the host IP via the Tapo integration by clicking the Add Integration button on the Devices and Services section.

No clue why it had to be added that way, but it worked. All my Kasa and Tapo devices shows up under the TP-Link Smart Home integration in HA.

I hope this helps.

1 Like

I got it to work! I’m not exactly certain how though :slight_smile: Here are some things I did based on reading related posts:

  • I have been using the Kasa android app. I opened the Tapo app and logged in. I was able to see all my devices, but didn’t find a global third-party enable option.
  • WHAT I THINK DID THE TRICK - The Kasa app has a third-party area in the app, but no global selection (just things like Amazon and Google). the TAPO app has the same, PLUS a global third-party options, which for me was OFF - so I turned it on.
  • I went to https://www.tplinkcloud.com/ and ensured that I could log in. I also changed my password. I didn’t actually "change it. I just created a new password with the old one.
  • Powered off my strip for 5 minutes and turned back on.
  • I went back into HA Integrations and clicked on the auto detected TP-Link strip and authenticated just fine.

I can now see all my existing devices and the new strip.

As a side note, I also tried to install the Tapo integration, which it said would work with TP-Link integration. When I selected “enable or yes”, it said it couldn’t be configured via the UI. Not certain what that was all about.

2 Likes

Update: Well - that was short lived. Says, “reconfigure” again, but won’t. The only thing that happened was my Alexa asked for permission to re-link. Maybe that broke it. Either way, it won’t reconnect.

Mine was doing the same thing. I had tried almost everything others were saying and I kept getting the error.

What I ended up having to do was, I had made a new account because of troubleshooting something else but it wasn’t allowing me to login on Home Assistant for Kasa stuff. I tried both logins and nothing worked. So I had to delete my account I wasn’t going to use anymore and then everything worked.

Just tested and littlemaui is correct that if you have been using the Kasa app, you need to login to the TAPO app and turn on global third party options, which enables integrations for all apps, including Kasa.

This immediately fixed the issue for me. I’d previously tried resetting my password, power cycling, and disabling two-factor authentication.

1 Like

Worked for me, thank you. TpLink support should refer users to this solution.

Does the HomeAssistant documentation need updating too, warning users of this issue as a show stopping prerequisite? Should the integration installation routines also prompt, prominently? Raising a GitHub request may be the way to bring this to the developers attention to improve their reputation of a reliable integration.

1 Like

Thank you so much @lacroix and @littlemaui for finding that 3rd party setting in the Tapo app. That resolved it for me as well – for now. I’m sorry to hear that it stopped working again for you @littlemaui. I hope you’re able to find a solution.

Notice this marked as solved but it seems it really isn’t.

I’m having the same problem. For me, I have a mixture of HS300’s, HS200’s, HS220’s and KS230’s. All was working fine until I added a new HS300. When I added the new HS300, all the two existing HS300’s went into an error state, wanting to be re-authenticated. I’ve toggled the 3rd party setting in the Tapo app. I don’t have the Kasa app loaded, only the Tapo App. I even tried everything listed in this thread, nothing has worked to fix the HS300’s. I even tried using a simpler password, that didn’t work.

Thank God the H*/K* switches work, or that’d be the end of Home Assistant in my house. My family would revolt! :wink:

I was getting the same error adding my P316M. My solution, I added it to a different HA server as a tapo device, then the same username/password worked fine on my first HA server.

Same issues w/ tapo C520CW cam, I had to go into tapo app in my account settings and enable third party compatibility. And then into camera setting under advanced setting, provide a user name and PW in camera account. In HA, I type in the user name and PW that I used in the camera account. Solved my issue. I hope this help you!

I was having the same issue and I found that this was only the case for me with my HS300 devices. Those devices would say that the challenge IP didn’t match and I kept getting the authentication error message even though I know the credentials are correct since they work for any other tp-link or tapo device.

I decided to probe the device via the CLI by doing the following (on macOS):

python3 -m venv kasa_debug
source kasa_debug/bin/activate
pip install python-kasa

After running those three commands, I ran the following to ensure I could see the device via the network:

kasa discover

That showed me a list of devices but not all since I had them on my IoT VLAN so I then probed the device directly by running the following command:

kasa --host 192.168.x.x sysinfo

That showed me the device info so now I was certain that the device is communicating on my network

The next step was to add the device manually instead of discovering it because seems like the discovery path was flaky, probably because of my VLAN.

In HA, I “Add Integration → TP-Link → TP-Link Smart Home → Enter the Host IP for that device” and once I did that, it saw it and didn’t require a user/password and it added the device without issues.

Note: you may need to fully reset the device and re-add it to your network first and also ensure that in Tapo and Kasa that you have third party integration/services enabled.

This was the only thing that worked for me as nothing else previously stated in this post worked. Hopefully this adds as another fix for others that may be experiencing the same issue

I recently had this issue after updating firmware on other tapo plugs. I had two that just suddenly stopped working with the 403 error. My password hadn’t changed and I couldn’t figure out why suddenly you’d get an auth error.

In the Tapo app the option to “enable 3rd party compatibility” had appeared and been turned on. That killed HA integration completely. As soon as I toggled that on, everything came back.

Hope that helps someone!

I had an interesting discovery trying to figure all this out. If you’re using a password manager, the Kasa app trims the password at a given length. The password I had in my password manager was longer than was being submitted to Kasa. I didn’t bother counting the length, but if you’re having trouble despite all the above, check the last character of your Kasa password vs the last character of what’s being entered into HA.