Tp-Link KP401 Discover/Config failure driving me nuts

Hi all. I’m running several tp-link smart power devices (several HS103’s), and I just bought an outdoor smart power KP401. In the past my procedure for configuring these devices was pretty simple: plug device in, use smart phone tplink app to do initial setup, then move over to HA, using tplink integration, select “add device”, put in IP address of the device, and device is added to HA no problem. In the case of the KP401, I’m getting an error when doing the HA “add device” as follows:

Screenshot 2024-04-23 at 11.25.12 AM

Log file with debug enabled shows essentially the same thing:
2024-04-23 11:24:47.422 DEBUG (MainThread) [kasa.iotprotocol] Unable to query the device: 192.168.1.54, not retrying: Unable to connect to the device: 192.168.1.54:9999: [Errno 113] Connect call failed (‘192.168.1.54’, 9999)

Yet the KP401 is configured and operating fine from the tplink phone app

I’m running all the latest SW on an RPi4:

  • Core 2024.4.3
  • Supervisor 2024.04.0
  • Operating System 12.2
  • Frontend 20240404.2

Any ideas?

Read the manual.

Thank you, I have read the manual, multiple times, in particular:

  1. The manual says you must provision the device before adding it to HA. You can do so through the official Kasa app, which is what I’ve done, successfully
  2. the KP401 is listed in the manual as both “supported” and “not requiring authentication”, so no cloud credentials are required, same as the HS103 devices I’m already successfully configuring and using.
  3. The manual says “follow instructions on screen to complete setup” (in HA), which equates to using the automatic discovery or inputting the IP address of the device. I have tried both, unsuccessfully. It’s worth nothing I’ve not been successful with auto-discovery at all on any of my Kasa devices, only with using IP address discovery thus far.

The kasa CLI tool is not included in the integration, and is not documented as required, I’d prefer not to use it for multiple reasons. if it is required, that is not what the manual says.

Thankfully, I kept hacking away via trial/error, and found a/the solution:

The physical push button on the KP401 once pressed to turn off the LED light on the device, allowed it to be discovered and configured by HA. It’s documented as an on/off switch, but the phone app controls the device just fine either way and you can even choose to turn the led off permanently. Confusing, but its working now.

Sorry, I read it as requiring authentication.
I should not read forums when tired from work.
Happy you figured it out.

No problem at all Wally, and thank you. RTFM is always good advice, no matter the circumstance.

Hello, I’m having this very same issue and have done all the steps in the manual. I have the KP400, however which has two sockets. No matter what I do I can’t get it to be discovered by HomeAssistant. I’ve tried bypassing the official app using Kasa Python and connecting it directly to my network, I’ve tried keeping it on the Kasa cloud, I’ve tried resetting the device to factory settings and reconfiguring it. Nothing seems to work. I get the same error number.

Make sure you push the physical button(s) on the KP401/KP400 if your home assistant can’t see the device, and try to discover it again. Ignore the fact that the little led light is on or off on the KP400/KP401. The way they designed these buttons makes absolutely no sense to me, see my earlier comment on that.

Hi John,

Thank you for the reply. I tried that after reading your struggle and it still provides the same error. I read other threads that give the same error for Tuya products that suggest keeping it in an awake state so I also tried pressing the button on/off/on/off. Keeping it in pairing mode also does not help. I’m at a loss here.

Thanks again for your reply, I really hope I can get this to integrate. We have a bug zapper that scares my dog to the point that he won’t go outside now at night (when it’s on). So I want to make it so when the door opens the KP400 turns the bug zapper off for a set amount of time.