Skip to content
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ The following devices have been tested and confirmed as working. If your device
- **Wall Switches**: S210, S220, S500, S500D, S505, S505D, TS15
- **Bulbs**: L430C, L430P, L510B, L510E, L530B, L530E, L535E, L630
- **Light Strips**: L900-10, L900-5, L920-5, L930-5
- **Cameras**: C100, C110, C210, C220, C225, C325WB, C520WS, C720, TC65, TC70
- **Cameras**: C100, C110, C210, C220, C225, C325WB, C520WS, C720, TC40, TC65, TC70
- **Doorbells and chimes**: D100C, D130, D230
- **Vacuums**: RV20 Max Plus, RV30 Max
- **Hubs**: H100, H200
Expand Down
2 changes: 2 additions & 0 deletions SUPPORTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ All Tapo devices require authentication.<br>Hub-Connected Devices may work acros
- Hardware: 1.0 (US) / Firmware: 1.2.8
- **C720**
- Hardware: 1.0 (US) / Firmware: 1.2.3
- **TC40**
- Hardware: 2.0 (EU) / Firmware: 1.0.4
- **TC65**
- Hardware: 1.0 / Firmware: 1.3.9
- **TC70**
Expand Down
7 changes: 4 additions & 3 deletions kasa/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand All @@ -28,4 +28,5 @@ def get_default_credentials(tuple: tuple[str, str]) -> Credentials:
"KASACAMERA": ("YWRtaW4=", "MjEyMzJmMjk3YTU3YTVhNzQzODk0YTBlNGE4MDFmYzM="),
"TAPO": ("dGVzdEB0cC1saW5rLm5ldA==", "dGVzdA=="),
"TAPOCAMERA": ("YWRtaW4=", "YWRtaW4="),
"TAPOCAMERA_LV3": ("YWRtaW4=", "VFBMMDc1NTI2NDYwNjAz"),
}
6 changes: 5 additions & 1 deletion kasa/transports/sslaestransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ def __init__(
not self._credentials or self._credentials.username is None
) and not self._credentials_hash:
self._credentials = Credentials()
if self._login_version == 3:
_default_credentials = DEFAULT_CREDENTIALS["TAPOCAMERA_LV3"]
else:
_default_credentials = DEFAULT_CREDENTIALS["TAPOCAMERA"]
self._default_credentials: Credentials = get_default_credentials(
DEFAULT_CREDENTIALS["TAPOCAMERA"]
_default_credentials
)
self._http_client: HttpClient = HttpClient(config)

Expand Down
Loading
Loading