Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ The following devices have been tested and confirmed as working. If your device
- **Cameras**: C100, C210, C225, C325WB, C520WS, C720, TC65, TC70
- **Hubs**: H100, H200
- **Hub-Connected Devices[^3]**: S200B, S200D, T100, T110, T300, T310, T315
- **Locks**: DL110

<!--SUPPORTED_END-->
[^1]: Model requires authentication
Expand Down
5 changes: 5 additions & 0 deletions SUPPORTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@ All Tapo devices require authentication.<br>Hub-Connected Devices may work acros
- Hardware: 1.0 (EU) / Firmware: 1.7.0
- Hardware: 1.0 (US) / Firmware: 1.8.0

### Locks

- **DL110**
- Hardware: 1.0 / Firmware: 1.0.9


<!--SUPPORTED_END-->
[^1]: Model requires authentication
1 change: 1 addition & 0 deletions devtools/generate_supported.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class SupportedVersion(NamedTuple):
DeviceType.Hub: "Hubs",
DeviceType.Sensor: "Hub-Connected Devices",
DeviceType.Thermostat: "Hub-Connected Devices",
DeviceType.Lock: "Locks",
}


Expand Down
1 change: 1 addition & 0 deletions kasa/device_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class DeviceType(Enum):
Fan = "fan"
Thermostat = "thermostat"
Vacuum = "vacuum"
Lock = "lock"
Unknown = "unknown"

@staticmethod
Expand Down
2 changes: 2 additions & 0 deletions kasa/smart/smartdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,8 @@ def _get_device_type_from_components(
return DeviceType.Thermostat
if "ROBOVAC" in device_type:
return DeviceType.Vacuum
if "TAPOLOCK" in device_type:
return DeviceType.Lock
_LOGGER.warning("Unknown device type, falling back to plug")
return DeviceType.Plug

Expand Down
7 changes: 7 additions & 0 deletions tests/device_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@
}
THERMOSTATS_SMART = {"KE100"}

LOCKS_SMART = {"DL110"}

WITH_EMETER_IOT = {"HS110", "HS300", "KP115", "KP125", *BULBS_IOT}
WITH_EMETER_SMART = {"P110", "P110M", "P115", "KP125M", "EP25", "P304M"}
WITH_EMETER = {*WITH_EMETER_IOT, *WITH_EMETER_SMART}
Expand All @@ -151,6 +153,7 @@
.union(SENSORS_SMART)
.union(SWITCHES_SMART)
.union(THERMOSTATS_SMART)
.union(LOCKS_SMART)
)
ALL_DEVICES = ALL_DEVICES_IOT.union(ALL_DEVICES_SMART)

Expand Down Expand Up @@ -325,6 +328,9 @@ def parametrize(
thermostats_smart = parametrize(
"thermostats smart", model_filter=THERMOSTATS_SMART, protocol_filter={"SMART.CHILD"}
)
locks_smart = parametrize(
"locks smart", model_filter=LOCKS_SMART, protocol_filter={"SMART"}
)
device_smart = parametrize(
"devices smart", model_filter=ALL_DEVICES_SMART, protocol_filter={"SMART"}
)
Expand Down Expand Up @@ -358,6 +364,7 @@ def check_categories():
+ hubs_smart.args[1]
+ sensors_smart.args[1]
+ thermostats_smart.args[1]
+ locks_smart.args[1]
+ camera_smartcam.args[1]
+ hub_smartcam.args[1]
)
Expand Down
237 changes: 237 additions & 0 deletions tests/fixtures/smart/DL110()_1.0_1.0.9.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
{
"component_nego": {
"component_list": [
{
"id": "device",
"ver_code": 1
},
{
"id": "firmware",
"ver_code": 2
},
{
"id": "quick_setup",
"ver_code": 1
},
{
"id": "time",
"ver_code": 1
},
{
"id": "wireless",
"ver_code": 1
},
{
"id": "iot_cloud",
"ver_code": 1
},
{
"id": "user_management",
"ver_code": 1
},
{
"id": "digital_code",
"ver_code": 1
},
{
"id": "battery",
"ver_code": 1
},
{
"id": "security_settings",
"ver_code": 1
},
{
"id": "lock",
"ver_code": 1
},
{
"id": "speaker",
"ver_code": 1
},
{
"id": "doorbell",
"ver_code": 1
},
{
"id": "lock_status",
"ver_code": 1
},
{
"id": "record",
"ver_code": 1
},
{
"id": "finger",
"ver_code": 1
},
{
"id": "calibration",
"ver_code": 1
},
{
"id": "emergency_code",
"ver_code": 1
}
]
},
"getBatteryInfo": {
"at_low_battery": false,
"battery_percentage": 42
},
"get_device_info": {
"at_low_battery": false,
"avatar": "",
"battery_percentage": 42,
"device_id": "0000000000000000000000000000000000000000",
"dst_last_update": 1736367967,
"fw_id": "00000000000000000000000000000000",
"fw_ver": "1.0.9 Build 240513 Rel.204727",
"has_set_location_info": false,
"hw_id": "00000000000000000000000000000000",
"hw_ver": "1.0",
"ip": "127.0.0.123",
"lang": "",
"latitude": 0,
"lock_status": 1,
"longitude": 0,
"mac": "D8-44-89-00-00-00",
"model": "DL110",
"nickname": "I01BU0tFRF9OQU1FIw==",
"oem_id": "00000000000000000000000000000000",
"region": "America/Chicago",
"rssi": -23,
"signal_level": 3,
"specs": "",
"ssid": "I01BU0tFRF9TU0lEIw==",
"time_diff": -360,
"type": "SMART.TAPOLOCK",
"wifi_mode_status": 1
},
"get_device_time": {
"region": "America/Chicago",
"time_diff": -360,
"timestamp": 1736378413
},
"get_fw_download_state": {
"auto_upgrade": false,
"download_progress": 0,
"reboot_time": 5,
"status": 0,
"upgrade_begin_time": 0,
"upgrade_time": 5
},
"get_latest_fw": {
"fw_size": 0,
"fw_ver": "1.0.9 Build 240513 Rel.204727",
"hw_id": "",
"need_to_upgrade": false,
"oem_id": "",
"release_date": "",
"release_note": "",
"type": 0
},
"get_wireless_scan_info": {
"ap_list": [
{
"key_type": "wpa2_psk",
"signal_level": 1,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 3,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 3,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 3,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 1,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 1,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 3,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "none",
"signal_level": 1,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 2,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 1,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 1,
"ssid": "I01BU0tFRF9TU0lEIw=="
},
{
"key_type": "wpa2_psk",
"signal_level": 1,
"ssid": "I01BU0tFRF9TU0lEIw=="
}
],
"start_index": 0,
"sum": 12,
"wep_supported": false
},
"qs_component_nego": {
"component_list": [
{
"id": "quick_setup",
"ver_code": 3
},
{
"id": "sunrise_sunset",
"ver_code": 1
},
{
"id": "iot_cloud",
"ver_code": 1
},
{
"id": "inherit",
"ver_code": 1
},
{
"id": "firmware",
"ver_code": 2
},
{
"id": "control_child",
"ver_code": 2
},
{
"id": "child_device",
"ver_code": 2
}
],
"extra_info": {
"device_model": "DL110",
"device_type": "SMART.TAPOLOCK"
}
}
}
Loading