Add support for tapo login_version 3 in sslaestransport (#1638)

Updates to get_default_credentials and DEFAULT_CREDENTIALS for handling
a new default password for encryption_type 3 in TAPOCAMERA devices that
use encryption_type 3.

This adds support for devices like TC40.
This commit is contained in:
ZeliardM
2026-02-22 13:56:26 -05:00
committed by GitHub
parent 30a8fd45a8
commit eefbf9ec1c
6 changed files with 1103 additions and 6 deletions

View File

@@ -16,10 +16,10 @@ class Credentials:
password: str = field(default="", repr=False)
def get_default_credentials(tuple: tuple[str, str]) -> Credentials:
def get_default_credentials(crdentials: tuple[str, str]) -> Credentials:
"""Return decoded default credentials."""
un = base64.b64decode(tuple[0].encode()).decode()
pw = base64.b64decode(tuple[1].encode()).decode()
un = base64.b64decode(crdentials[0].encode()).decode()
pw = base64.b64decode(crdentials[1].encode()).decode()
return Credentials(un, pw)
@@ -28,4 +28,5 @@ DEFAULT_CREDENTIALS = {
"KASACAMERA": ("YWRtaW4=", "MjEyMzJmMjk3YTU3YTVhNzQzODk0YTBlNGE4MDFmYzM="),
"TAPO": ("dGVzdEB0cC1saW5rLm5ldA==", "dGVzdA=="),
"TAPOCAMERA": ("YWRtaW4=", "YWRtaW4="),
"TAPOCAMERA_LV3": ("YWRtaW4=", "VFBMMDc1NTI2NDYwNjAz"),
}