Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

HS200 newer hardware: KLAP auth challenge mismatch despite valid TP-Link credentials #1700

Copy link
Copy link
@jda03806

Description

@jda03806
Issue body actions

Description

I have multiple TP-Link Kasa HS200 switches on the same LAN. Some older HS200 switches work locally with python-kasa, while several newer HS200 switches fail during KLAP authentication.

The failing switches are controllable from the Kasa/Tapo app and through SmartThings, but they cannot be controlled locally by python-kasa or Home Assistant's TP-Link integration.

Environment

  • python-kasa version: 0.10.2
  • Python version: 3.12
  • Host environment: Home Assistant OS SSH add-on on Raspberry Pi 4
  • Home Assistant Core: 2026.5.3
  • Network: same subnet, direct IP access works, devices respond to ping

Working Device

This HS200 works locally without credentials:

Model: HS200(US)
Host: 192.168.1.14
Port: 9999
Hardware: 5.0
Firmware: 1.0.11 Build 230908 Rel.160526
Mic Type: IOT.SMARTPLUGSWITCH
Credentials hash: None

Command:

kasa --host 192.168.1.14 --verbose state

Result: succeeds.

Failing Devices

Several HS200 devices fail, including:

HS200 at 192.168.1.234
Other affected HS200s: 192.168.1.74, 192.168.1.36, 192.168.1.124, 192.168.1.137

Command without credentials:

kasa --host 192.168.1.234 --verbose state

Result:

Raised error: Device response did not match our challenge on ip 192.168.1.234, check that your e-mail and password (both case-sensitive) are correct.
kasa.exceptions.AuthenticationError: Device response did not match our challenge on ip 192.168.1.234

Command with TP-Link credentials:

kasa --host 192.168.1.234 --username '<redacted>' --password '<redacted>' --verbose state

Result: same challenge mismatch.

Forcing legacy protocol:

kasa --host 192.168.1.234 --type plug --verbose state

Result:

Unable to connect to the device: 192.168.1.234:9999: [Errno 111] Connect call failed

So the failing devices are not available through the legacy port 9999 path.

Expected Behavior

python-kasa should authenticate to the newer HS200 devices using the supplied TP-Link/Kasa/Tapo credentials, or report a more specific unsupported protocol / firmware / credential-sync condition if this hardware revision is not supported.

Actual Behavior

The device is discovered/reached, but KLAP authentication fails with:

Device response did not match our challenge

The same credentials work in the Kasa/Tapo app, and the device works through SmartThings cloud integration.

Notes

This seems distinct from older no-auth HS200 local control. In my environment, older HS200 hardware/firmware still works locally on port 9999, while newer HS200 devices use port 80/KLAP and fail authentication.

I originally investigated this from Home Assistant, but direct python-kasa CLI testing reproduces the issue without Home Assistant involved.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.