home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.98k stars 29.06k forks source link

TP-Link KS205 will not reauthenticate #121331

Closed Dragon1473 closed 1 week ago

Dragon1473 commented 1 week ago

The problem

My three matter-compatible KS205s will not authenticate with the TP-Link integration. All other switches and plugs are authenticating properly.

If attempting to reauthenticate through the browser, it will not accept credentials. If I attempt to reauthenticate through the iOS Home Assistant app, it states that it successfully reauthenticates, but then immediately asks to reauthenticate again. I attempt to re-authenticate in the iOS app while debug was enabled for the logs.

What version of Home Assistant Core has the issue?

core-2024.7.1

What was the last working version of Home Assistant Core?

core-2024.6

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

No response

Diagnostics information

home-assistant_tplink_2024-07-05T19-38-00.276Z.log config_entry-unifi-142ed1477b6f679d5d1b5235f451dcc5.json config_entry-unifi-142ed1477b6f679d5d1b5235f451dcc5 (1).json config_entry-unifi-142ed1477b6f679d5d1b5235f451dcc5 (2).json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-07-05 15:28:32.184 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Kitchen Lights KS205' for tplink integration could not authenticate: Unable to complete handshake: 10.69.4.144: TRANSPORT_UNKNOWN_CREDENTIALS_ERROR(1003) (error_code=TRANSPORT_UNKNOWN_CREDENTIALS_ERROR)
2024-07-05 15:28:32.188 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Front Door Light KS205' for tplink integration could not authenticate: Unable to complete handshake: 10.69.4.40: TRANSPORT_UNKNOWN_CREDENTIALS_ERROR(1003) (error_code=TRANSPORT_UNKNOWN_CREDENTIALS_ERROR)
2024-07-05 15:28:32.188 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Dining Room Lights KS205' for tplink integration could not authenticate: Unable to complete handshake: 10.69.4.204: TRANSPORT_UNKNOWN_CREDENTIALS_ERROR(1003) (error_code=TRANSPORT_UNKNOWN_CREDENTIALS_ERROR)

Additional information

Had no issues prior to 2024.7 - issue still exists in 2024.7.1. Authentication details are correct - devices are present in the Kasa iOS app.

home-assistant[bot] commented 1 week ago

Hey there @rytilahti, @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)

gimpy88 commented 1 week ago

@Dragon1473 Try removing the affected entities from the TP-Link integration and re-add them. Had the same issue with the KS205 as a recent firmware update broke the integration.

@rytilahti @sdb9696 The issue appears that after reconfiguring a device, it's using the existing encryption_type (AES) instead of pulling an updated connection_type with a different encryption_type (KLAP), which causes it to fail with TRANSPORT_UNKNOWN_CREDENTIALS.

sdb9696 commented 1 week ago

Thanks @gimpy88. I agree it seems the discovery is not updating the connection type correctly here after a firmware update. Deleting the config entries and recreating them should hopefully clear it.

Dragon1473 commented 1 week ago

That wokred! Thank you @gimpy88 and @sdb9696 !!

sdb9696 commented 1 week ago

@home-assistant close