René's URL Explorer Experiment


Title: KLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0 · Issue #1604 · python-kasa/python-kasa · GitHub

Open Graph Title: KLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0 · Issue #1604 · python-kasa/python-kasa

X Title: KLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0 · Issue #1604 · python-kasa/python-kasa

Description: KLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0SummaryI'm testing several TP-Link HS300 (US) power strips (Hardware Version 2.0) using the latest feature/tpap branch of python-kasa. Discovery succeeds and the ...

Open Graph Description: KLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0SummaryI'm testing several TP-Link HS300 (US) power strips (Hardware Version 2.0) using the latest feature/tpap branch of ...

X Description: KLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0SummaryI'm testing several TP-Link HS300 (US) power strips (Hardware Version 2.0) using the latest feature/tpap branch...

Opengraph URL: https://github.com/python-kasa/python-kasa/issues/1604

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"KLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0","articleBody":"\u003ch1 data-pm-slice=\"1 1 []\"\u003eKLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0\u003c/h1\u003e\u003ch2\u003eSummary\u003c/h2\u003e\u003cp\u003eI'm testing several \u003cstrong\u003eTP-Link HS300 (US)\u003c/strong\u003e power strips (\u003cstrong\u003eHardware Version 2.0\u003c/strong\u003e) using the latest \u003ccode\u003efeature/tpap\u003c/code\u003e branch of \u003cstrong\u003epython-kasa\u003c/strong\u003e.\nDiscovery succeeds and the initial handshake completes, but all devices fail authentication with the message:\u003c/p\u003e\u003cblockquote\u003e\u003cp\u003eDevice response did not match our challenge ... check that your e-mail and password (both case-sensitive) are correct.\u003c/p\u003e\u003c/blockquote\u003e\u003cp\u003eAll three devices are reachable and respond to \u003ccode\u003e/app/handshake1\u003c/code\u003e, but the returned server hash never matches the client challenge, causing the session to abort.\u003c/p\u003e\u003ch2\u003eEnvironment\u003c/h2\u003e\nComponent | Version / Details\n-- | --\nDevice Model | HS300 (US)\nHardware Version | 2.0\nFirmware Version | 1.1.6 Build 240130 Rel.173828\nEncrypt Type | KLAP\nLogin Version | 2\nHost OS | Ubuntu 24.04 LTS\npython-kasa Branch | feature/tpap (PR #1592)\nNetwork | Local LAN (192.168.0.x), no firewall, UFW inactive\n\n\u003ch2\u003eObserved Behavior\u003c/h2\u003e\u003cp\u003eTrimmed \u003ccode\u003ekasa --debug discover\u003c/code\u003e output:\u003c/p\u003e\u003cpre\u003e\u003ccode\u003eDEBUG:kasa.transports.klaptransport:Starting handshake with 192.168.0.98\nDEBUG:kasa.httpclient:Posting to [http://192.168.0.98/app/handshake1](http://192.168.0.98/app/handshake1)\nDEBUG:kasa.transports.klaptransport:Handshake1 success ... Server remote_seed is ...\nDEBUG:kasa.transports.klaptransport:Device response did not match our challenge on ip 192.168.0.98,\ncheck that your e-mail and password (both case-sensitive) are correct.\nDEBUG:kasa.protocols.iotprotocol:Unable to authenticate with 192.168.0.98, not retrying\n== Authentication failed for device ==\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003eEach device reports the following discovery payload (sanitized):\u003c/p\u003e\u003cpre\u003e\u003ccode\u003e{\n  \"device_type\": \"IOT.SMARTPLUGSWITCH\",\n  \"device_model\": \"HS300(US)\",\n  \"hw_ver\": \"2.0\",\n  \"mgt_encrypt_schm\": {\n    \"encrypt_type\": \"KLAP\",\n    \"lv\": 2,\n    \"new_klap\": 1,\n    \"http_port\": 80,\n    \"is_support_https\": false\n  },\n  \"login_version\": 2\n}\n\u003c/code\u003e\u003c/pre\u003e\u003ch3\u003eNetwork Connectivity\u003c/h3\u003e\u003cul\u003e\u003cli\u003e\u003cp\u003eICMP ping ✅\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eTCP 80 ✅\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eUDP 9999 (now deprecated) ❌ Closed\u003c/p\u003e\u003c/li\u003e\u003c/ul\u003e\u003ch3\u003eExpected Behavior\u003c/h3\u003e\u003cp\u003eOlder HS300 firmware (KLAP v1) authenticated successfully with email + password and allowed full local control via UDP 9999 or HTTP port 80.\nUnder the new firmware (KLAP v2 / Login Version 2), the initial handshake completes but authentication fails even with correct credentials.\u003c/p\u003e\u003ch3\u003eHypothesis\u003c/h3\u003e\u003cp\u003eThe new HS300 firmware likely implements KLAP v2 using a token- or certificate-based challenge hash, similar to TPAP / SPAKE2+ used in newer Tapo devices.\u003c/p\u003e\u003cp\u003eThe current library still derives the challenge hash from plain credentials, so the computed client hash never matches the device’s expected value.\u003c/p\u003e\u003cul\u003e\u003cli\u003e\u003cp\u003e\u003ccode\u003e/app/handshake1\u003c/code\u003e → works ✅\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003e\u003ccode\u003e/app/handshake2\u003c/code\u003e → validation fails ❌\u003c/p\u003e\u003c/li\u003e\u003c/ul\u003e\u003ch3\u003eReproduction Steps\u003c/h3\u003e\u003col\u003e\u003cli\u003e\u003cp\u003eConnect HS300 (US v2.0) to local LAN.\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eRun:\u003c/p\u003e\u003cpre\u003e\u003ccode\u003ekasa --debug discover\n\u003c/code\u003e\u003c/pre\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eObserve handshake success followed by:\u003c/p\u003e\u003cpre\u003e\u003ccode\u003eDevice response did not match our challenge\n\u003c/code\u003e\u003c/pre\u003e\u003c/li\u003e\u003c/ol\u003e\u003ch3\u003eAdditional Notes\u003c/h3\u003e\u003cul\u003e\u003cli\u003e\u003cp\u003eOccurs on all three HS300 v2.0 units tested.\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eConfirmed not a network or firewall issue (UPike IoT VLAN, unrestricted inter-VLAN traffic).\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003e\u003ccode\u003e/app/handshake1\u003c/code\u003e returns 200 OK with \u003ccode\u003eremote_seed\u003c/code\u003e and \u003ccode\u003eserver_hash\u003c/code\u003e.\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eLikely related to:\u003c/p\u003e\u003cul\u003e\u003cli\u003e\u003cp\u003eIssue #1590 (TPAP encryption)\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003ePR #1592 (SPAKE2+/TPAP implementation)\u003c/p\u003e\u003c/li\u003e\u003c/ul\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eThese devices may require new KLAP v2 handling logic parallel to the TPAP branch.\u003c/p\u003e\u003c/li\u003e\u003c/ul\u003e\u003ch3\u003eRequest\u003c/h3\u003e\u003cp\u003ePlease confirm whether KLAP v2 / Login Version 2 devices (HS300 v2.0) still use credential-derived hashing or require cloud-issued tokens for the second handshake stage.\u003c/p\u003e\u003cp\u003eIf a new derivation scheme is known, I can provide full \u003ccode\u003e--debug\u003c/code\u003e logs or packet captures of the \u003ccode\u003e/app/handshake1\u003c/code\u003e → \u003ccode\u003e/app/handshake2\u003c/code\u003e exchange for implementation testing.\u003c/p\u003e\u003ch3\u003eExample Device IDs (Sanitized)\u003c/h3\u003e\u003cpre\u003e\u003ccode\u003eDevice Id (hash): eff8dcab310ffac89b042df8a35da5c1\nOwner (hash):     44D82453FD26F2F462DA5F77E58808FC\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003eThank you for maintaining python-kasa — happy to run any extra debugging or packet captures needed to help finish KLAP v2 support.\u003c/p\u003e","author":{"url":"https://github.com/leviwheeling","@type":"Person","name":"leviwheeling"},"datePublished":"2025-10-30T14:23:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":35},"url":"https://github.com/1604/python-kasa/issues/1604"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b090c9e1-4c7a-d9be-afa6-abfe35782af3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEAD4:314F2F:630BB:88274:6981CA90
html-safe-nonce044a14e3ef24d941c287f3606be68339792ffa2b3fce95f76fc7a879cd7051be
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUQ0OjMxNEYyRjo2MzBCQjo4ODI3NDo2OTgxQ0E5MCIsInZpc2l0b3JfaWQiOiIzMTg1Mjc0NDMyODM5MDc2NDk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac55bca753da4de9c9469efe18b0af96ecc4147308584cace1dc61286df020c974
hovercard-subject-tagissue:3571043382
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-kasa/python-kasa/1604/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2ed6656c596c04c573c63c0d84bcb30fbe48ab51d93a514714ab1d6949903632/python-kasa/python-kasa/issues/1604
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2ed6656c596c04c573c63c0d84bcb30fbe48ab51d93a514714ab1d6949903632/python-kasa/python-kasa/issues/1604
og:image:altKLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0SummaryI'm testing several TP-Link HS300 (US) power strips (Hardware Version 2.0) using the latest feature/tpap branch of ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameleviwheeling
hostnamegithub.com
expected-hostnamegithub.com
None95dd6eb30a064b87bd2c653e622fe2eb6a2ec1d12751c5463c252220548e75a4
turbo-cache-controlno-preview
go-importgithub.com/python-kasa/python-kasa git https://github.com/python-kasa/python-kasa.git
octolytics-dimension-user_id57733869
octolytics-dimension-user_loginpython-kasa
octolytics-dimension-repository_id221571611
octolytics-dimension-repository_nwopython-kasa/python-kasa
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id221571611
octolytics-dimension-repository_network_root_nwopython-kasa/python-kasa
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7f9fe298cbc605034955dde47054b68dbf531efd
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/python-kasa/python-kasa/issues/1604#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-kasa%2Fpython-kasa%2Fissues%2F1604
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-kasa%2Fpython-kasa%2Fissues%2F1604
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-kasa%2Fpython-kasa
Reloadhttps://patch-diff.githubusercontent.com/python-kasa/python-kasa/issues/1604
Reloadhttps://patch-diff.githubusercontent.com/python-kasa/python-kasa/issues/1604
Reloadhttps://patch-diff.githubusercontent.com/python-kasa/python-kasa/issues/1604
python-kasa https://patch-diff.githubusercontent.com/python-kasa
python-kasahttps://patch-diff.githubusercontent.com/python-kasa/python-kasa
Please reload this pagehttps://patch-diff.githubusercontent.com/python-kasa/python-kasa/issues/1604
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-kasa%2Fpython-kasa
Fork 246 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-kasa%2Fpython-kasa
Star 1.6k https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-kasa%2Fpython-kasa
Code https://patch-diff.githubusercontent.com/python-kasa/python-kasa
Issues 51 https://patch-diff.githubusercontent.com/python-kasa/python-kasa/issues
Pull requests 36 https://patch-diff.githubusercontent.com/python-kasa/python-kasa/pulls
Discussions https://patch-diff.githubusercontent.com/python-kasa/python-kasa/discussions
Actions https://patch-diff.githubusercontent.com/python-kasa/python-kasa/actions
Projects 0 https://patch-diff.githubusercontent.com/python-kasa/python-kasa/projects
Security 0 https://patch-diff.githubusercontent.com/python-kasa/python-kasa/security
Insights https://patch-diff.githubusercontent.com/python-kasa/python-kasa/pulse
Code https://patch-diff.githubusercontent.com/python-kasa/python-kasa
Issues https://patch-diff.githubusercontent.com/python-kasa/python-kasa/issues
Pull requests https://patch-diff.githubusercontent.com/python-kasa/python-kasa/pulls
Discussions https://patch-diff.githubusercontent.com/python-kasa/python-kasa/discussions
Actions https://patch-diff.githubusercontent.com/python-kasa/python-kasa/actions
Projects https://patch-diff.githubusercontent.com/python-kasa/python-kasa/projects
Security https://patch-diff.githubusercontent.com/python-kasa/python-kasa/security
Insights https://patch-diff.githubusercontent.com/python-kasa/python-kasa/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-kasa/python-kasa/issues/1604
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-kasa/python-kasa/issues/1604
KLAP v2 Authentication Failure on TP-Link HS300 (US) — Hardware Version 2.0https://patch-diff.githubusercontent.com/python-kasa/python-kasa/issues/1604#top
https://github.com/leviwheeling
https://github.com/leviwheeling
leviwheelinghttps://github.com/leviwheeling
on Oct 30, 2025https://github.com/python-kasa/python-kasa/issues/1604#issue-3571043382
#1592https://github.com/python-kasa/python-kasa/pull/1592
Missing support for TPAP encryption type #1590https://github.com/python-kasa/python-kasa/issues/1590
TPAP Implementation #1592https://github.com/python-kasa/python-kasa/pull/1592
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.