Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPLink Authentication - Query failed after successful authentication #116089

Closed
Benvdaa opened this issue Apr 24, 2024 · 16 comments · Fixed by #120060
Closed

TPLink Authentication - Query failed after successful authentication #116089

Benvdaa opened this issue Apr 24, 2024 · 16 comments · Fixed by #120060
Assignees
Labels
integration: tplink waiting-for-upstream We're waiting for a change upstream

Comments

@Benvdaa
Copy link

Benvdaa commented Apr 24, 2024

The problem

TP-Link Smart Plug P115 Authentication failures

What version of Home Assistant Core has the issue?

core-2024.4.4

What was the last working version of Home Assistant Core?

core-2024.4.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

TP-Link Smart Home

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tplink/

Diagnostics information

home-assistant_tplink_2024-04-24T08-24-06.415Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-04-24 09:39:07.483 ERROR (MainThread) [kasa.klaptransport] Query failed after successful authentication Host is 172.17.2.110, Sequence is 2064511670, Response status is 403, Request was {"method":"multipleRequest","params":{"requests":[{"method":"get_device_info","params":null},{"method":"get_device_usage","params":null},{"method":"get_device_time","params":null},{"method":"get_energy_usage","params":null},{"method":"get_current_power","params":null}]},"requestID":1232717469337128960,"request_time_milis":1713944347473,"terminal_uuid":"e/nTo1RR2FYHhTJIqPAs7g=="}
2024-04-24 09:39:07.484 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Authentication failed while fetching 172.17.2.110 data: Got a security error from 172.17.2.110 after handshake completed
2024-04-24 09:39:07.583 ERROR (MainThread) [kasa.klaptransport] Query failed after successful authentication Host is 172.17.2.111, Sequence is -1782478897, Response status is 403, Request was {"method":"multipleRequest","params":{"requests":[{"method":"get_device_info","params":null},{"method":"get_device_usage","params":null},{"method":"get_device_time","params":null},{"method":"get_energy_usage","params":null},{"method":"get_current_power","params":null}]},"requestID":1232717469735587840,"request_time_milis":1713944347568,"terminal_uuid":"NS7+R3sMmtCrGjflzqB2Jw=="}
2024-04-24 09:39:07.584 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Authentication failed while fetching 172.17.2.111 data: Got a security error from 172.17.2.111 after handshake completed
2024-04-24 09:39:07.608 ERROR (MainThread) [kasa.klaptransport] Query failed after successful authentication Host is 172.17.2.113, Sequence is -129225428, Response status is 403, Request was {"method":"multipleRequest","params":{"requests":[{"method":"get_device_info","params":null},{"method":"get_device_usage","params":null},{"method":"get_device_time","params":null},{"method":"get_energy_usage","params":null},{"method":"get_current_power","params":null}]},"requestID":1232717469857222656,"request_time_milis":1713944347597,"terminal_uuid":"jJ7IfsUkizCxQgWJ4gMT9Q=="}
2024-04-24 09:39:07.609 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Authentication failed while fetching 172.17.2.113 data: Got a security error from 172.17.2.113 after handshake completed
2024-04-24 09:39:07.684 ERROR (MainThread) [kasa.klaptransport] Query failed after successful authentication Host is 172.17.2.114, Sequence is -1416544645, Response status is 403, Request was {"method":"multipleRequest","params":{"requests":[{"method":"get_device_info","params":null},{"method":"get_device_usage","params":null},{"method":"get_device_time","params":null},{"method":"get_energy_usage","params":null},{"method":"get_current_power","params":null}]},"requestID":1232717470175989760,"request_time_milis":1713944347673,"terminal_uuid":"I1Yc5w2ZCWot5sFwF3nfEg=="}
2024-04-24 09:39:07.685 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Authentication failed while fetching 172.17.2.114 data: Got a security error from 172.17.2.114 after handshake completed
2024-04-24 09:39:07.736 ERROR (MainThread) [kasa.klaptransport] Query failed after successful authentication Host is 172.17.2.112, Sequence is 1675243184, Response status is 403, Request was {"method":"multipleRequest","params":{"requests":[{"method":"get_device_info","params":null},{"method":"get_device_usage","params":null},{"method":"get_device_time","params":null},{"method":"get_energy_usage","params":null},{"method":"get_current_power","params":null}]},"requestID":1232717470389899264,"request_time_milis":1713944347724,"terminal_uuid":"FnKFkn38v0Uy5qQos1Nemg=="}
2024-04-24 09:39:07.737 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Authentication failed while fetching 172.17.2.112 data: Got a security error from 172.17.2.112 after handshake completed
2024-04-24 09:39:07.903 ERROR (MainThread) [kasa.klaptransport] Query failed after successful authentication Host is 172.17.2.115, Sequence is -1072289526, Response status is 403, Request was {"method":"multipleRequest","params":{"requests":[{"method":"get_device_info","params":null},{"method":"get_device_usage","params":null},{"method":"get_device_time","params":null},{"method":"get_energy_usage","params":null},{"method":"get_current_power","params":null}]},"requestID":1232717471090348032,"request_time_milis":1713944347892,"terminal_uuid":"B2bfGO0hQLrsFbSarTJGPg=="}
2024-04-24 09:39:07.903 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Authentication failed while fetching 172.17.2.115 data: Got a security error from 172.17.2.115 after handshake completed
2024-04-24 09:39:08.533 ERROR (MainThread) [kasa.klaptransport] Query failed after successful authentication Host is 172.17.2.116, Sequence is -1769468747, Response status is 403, Request was {"method":"multipleRequest","params":{"requests":[{"method":"get_device_info","params":null},{"method":"get_device_usage","params":null},{"method":"get_device_time","params":null},{"method":"get_energy_usage","params":null},{"method":"get_current_power","params":null}]},"requestID":1232717473736953856,"request_time_milis":1713944348522,"terminal_uuid":"oQY/5OeKhCvvVlFMowiFGg=="}
2024-04-24 09:39:08.534 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Authentication failed while fetching 172.17.2.116 data: Got a security error from 172.17.2.116 after handshake completed
2024-04-24 09:39:24.542 ERROR (MainThread) [plugp100.protocol.klap_protocol] Query failed after succesful authentication at 1713944364.5427897.  Host is ('http', '172.17.2.112', 80), Available attempts count is 3, Sequence is -545851547, Response status is 403, Request was <plugp100.requests.tapo_request.TapoRequest object at 0x7f528c5fa0>
2024-04-24 09:39:24.548 ERROR (MainThread) [plugp100.protocol.klap_protocol] Query failed after succesful authentication at 1713944364.5484045.  Host is ('http', '172.17.2.116', 80), Available attempts count is 3, Sequence is -2062668754, Response status is 403, Request was <plugp100.requests.tapo_request.TapoRequest object at 0x7f523352b0>
2024-04-24 09:39:24.554 ERROR (MainThread) [plugp100.protocol.klap_protocol] Query failed after succesful authentication at 1713944364.55398.  Host is ('http', '172.17.2.115', 80), Available attempts count is 3, Sequence is -653304590, Response status is 403, Request was <plugp100.requests.tapo_request.TapoRequest object at 0x7f528c6ab0>
2024-04-24 09:39:24.711 ERROR (MainThread) [plugp100.protocol.klap_protocol] Query failed after succesful authentication at 1713944364.7118032.  Host is ('http', '172.17.2.113', 80), Available attempts count is 3, Sequence is -1633554269, Response status is 403, Request was <plugp100.requests.tapo_request.TapoRequest object at 0x7f52335010>
2024-04-24 09:39:24.868 ERROR (MainThread) [plugp100.protocol.klap_protocol] Query failed after succesful authentication at 1713944364.8686318.  Host is ('http', '172.17.2.111', 80), Available attempts count is 3, Sequence is -1044974523, Response status is 403, Request was <plugp100.requests.tapo_request.TapoRequest object at 0x7f5210d160>
2024-04-24 09:39:24.906 ERROR (MainThread) [plugp100.protocol.klap_protocol] Query failed after succesful authentication at 1713944364.906046.  Host is ('http', '172.17.2.110', 80), Available attempts count is 3, Sequence is -271970924, Response status is 403, Request was <plugp100.requests.tapo_request.TapoRequest object at 0x7f5e79f2c0>
2024-04-24 09:39:24.933 ERROR (MainThread) [plugp100.protocol.klap_protocol] Query failed after succesful authentication at 1713944364.9332902.  Host is ('http', '172.17.2.114', 80), Available attempts count is 3, Sequence is 1161778083, Response status is 403, Request was <plugp100.requests.tapo_request.TapoRequest object at 0x7f5a39eb40>

Additional information

No response

@home-assistant
Copy link

Hey there @rytilahti, @TheGardenMonkey, @bdraco, @sdb9696, mind taking a look at this issue as it has been labeled with an integration (tplink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tplink can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tplink Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tplink documentation
tplink source
(message by IssueLinks)

@Spotlight-Kid
Copy link

I get this too

@sdb9696
Copy link
Contributor

sdb9696 commented Apr 24, 2024

Hi, this is a known issue fixed in the underlying library. It did not make this months beta but should be in the 2024-06 release.

@alvtellez
Copy link

I've also been getting this for the past week, it's really annoying, thanks for letting us know about the upcoming fix!

@rytilahti
Copy link
Member

In the logs there are errors from both core and custom integrations, so I'm wondering if that could lead to confusion on the device(s)? You could try disabling either one of them temporarily and see if that helps.

@sdb9696
Copy link
Contributor

sdb9696 commented Apr 24, 2024

Ah yes, that's a great spot. If both core and custom integrations are authenticating to the same devices they will probably be de-authenticating each other and causing this error.

@Ashleyde42
Copy link

I have been getting authentication failures since 15 April. It happens for Smart Em plugs P110, Smart plugs P100, Power boards p300, LED lights L930 and L900. Is there a solution.

@sdb9696
Copy link
Contributor

sdb9696 commented Apr 25, 2024

I have been getting authentication failures since 15 April. It happens for Smart Em plugs P110, Smart plugs P100, Power boards p300, LED lights L930 and L900. Is there a solution.

Can you post some debug logs?

@wmrato
Copy link

wmrato commented Apr 25, 2024

I too have this issue for quite a while & re-entered Auth details many times with Repairs still listed, Grrrr
Both Integrations installed TP-Link Smart Home & TP-Link Tapo [HACS]
I kept the older HACS Integration for the extra entities (Signal Level & Overheat are essential) others are useful too
Missing Entities on TP-Link Smart Home
P100 Entities: Overheat, Signal Level, Firmware
P110 Entities: Overheat, Signal Level, Month Energy, Month Runtime, Firmware

Devices: 11 devices:[ P100, P110] ( all good reception )
Integrations Installed & used entities
TP-Link Smart Home only Entities [switch]
TP-Link Tapo [HACS] all other Entities [Overheat, Signal Level, Firmware], [ Month Energy, Month Runtime ]
Both Integrations worked together without re-authorisation, but not sure which update (Sys or Intergration) broke them.

Please let me know if I can help in any way?
Creating some Debug Logs for u, Do I post them here ??
Lots of love to the maintainers & HA Team.

@Benvdaa
Copy link
Author

Benvdaa commented Apr 25, 2024

On a different HA same issue with TP-Link Smart Home.
TP-Link Tapo [HACS] no auth issues.
Temp solution disable /ignore devices in TP-Link Smart Home [Integration], and returned back to TP-Link Tapo [HACS] for monitoring the power consumption.

@Ashleyde42
Copy link

i disabled the devices on the TP-Link Tapo. Left the TP-Link Smart Home alone. All works fine now.

@alvtellez
Copy link

alvtellez commented Apr 26, 2024

Every day my P100 plugs stop working, asking for authentications, and very often when putting the credentials, I get this error:
Connection error: ('Device connection error: 192.168.1.209: [Errno 104] Connection reset by peer', ClientOSError(104, 'Connection reset by peer'))

@GavinFarrington
Copy link

Just another me-too post. Same thing happening here with KP125MP2. Clicking to "repair" results in

Error
Config flow could not be loaded: {"message":"Invalid flow specified"}

@AlTyndall
Copy link

I have a P110 working fine (and has been for a couple of months). I have just tried adding another P110 to HA and it gives me the error "Invalid authentication: Unable to complete handshake: 192.168.1.xx: TRANSPORT_UNKNOWN_CREDENTIALS_ERROR(1003)". The difference between the working one and the one I can't connect is that the non-working one did a firmware update to 1.3.0 Build 230905 Rel.152200 and the working one is still at 1.2.3 Build 230425 Rel.142542 (I turned auto firmware update off on that one). Is 1.3.0 causing problems? (I can guarantee the username and password requested during configuration process in HA are correct - copied & pasted from password manager.)

@sdb9696
Copy link
Contributor

sdb9696 commented May 10, 2024

@home-assistant rename TPLink Authentication - Query failed after successful authentication

@home-assistant home-assistant bot changed the title TP-Link Smart Home Authentication failure TPLink Authentication - Query failed after successful authentication May 10, 2024
@sdb9696
Copy link
Contributor

sdb9696 commented May 10, 2024

I've renamed this issue to try to keep it contained to the original reporters issue which should be fixed in the next HA release.

For any other issues with different symptoms, i.e. different error codes or log messages, please look for an existing open issue that matches the symptoms, or open a new issue with as much diagnostic information as possible.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: tplink waiting-for-upstream We're waiting for a change upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants