From 0b952d52449dc6a4176c7253b3187c38da25bf31 Mon Sep 17 00:00:00 2001 From: michael-bohr Date: Sat, 31 Oct 2026 19:40:05 -0400 Subject: [PATCH] Add KS230(US) hw 2.0 fw 1.1.4 fixture (#1824) --- README.md | 2 +- SUPPORTED.md | 1 + tests/fixtures/iot/KS230(US)_2.0_1.1.4.json | 138 ++++++++++++++++++++ 3 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 tests/fixtures/iot/KS230(US)_2.0_1.1.4.json diff --git a/README.md b/README.md index 2054b76b..a4c0e07c 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ The following devices have been tested and confirmed as working. If your device - **Plugs**: EP10, EP25[^2], HS100[^2], HS103, HS105, HS110, KP100, KP105, KP115, KP125, KP125M[^1], KP401 - **Power Strips**: EP40, EP40M[^1], HS107, HS300, KP200, KP303, KP400 -- **Wall Switches**: ES20M, HS200[^2], HS210, HS220[^2], KP405, KS200, KS200M, KS205[^1], KS220, KS220M, KS225[^1], KS230, KS240[^1] +- **Wall Switches**: ES20M, HS200[^2], HS210, HS220[^2], KP405, KS200, KS200M, KS205[^1], KS220, KS220M, KS225[^1], KS230[^2], KS240[^1] - **Bulbs**: KL110, KL110B, KL120, KL125, KL130, KL135, KL50, KL60, LB100, LB110, LB130 - **Light Strips**: KL400L10, KL400L5, KL420L5, KL430 - **Hubs**: KH100[^1] diff --git a/SUPPORTED.md b/SUPPORTED.md index eec0eedd..6d4f04c5 100644 --- a/SUPPORTED.md +++ b/SUPPORTED.md @@ -129,6 +129,7 @@ Some newer Kasa devices require authentication. These are marked with [^1] in th - **KS230** - Hardware: 1.0 (US) / Firmware: 1.0.14 - Hardware: 2.0 (US) / Firmware: 1.0.11 + - Hardware: 2.0 (US) / Firmware: 1.1.4[^1] - **KS240** - Hardware: 1.0 (US) / Firmware: 1.0.4[^1] - Hardware: 1.0 (US) / Firmware: 1.0.5[^1] diff --git a/tests/fixtures/iot/KS230(US)_2.0_1.1.4.json b/tests/fixtures/iot/KS230(US)_2.0_1.1.4.json new file mode 100644 index 00000000..56c0e9c9 --- /dev/null +++ b/tests/fixtures/iot/KS230(US)_2.0_1.1.4.json @@ -0,0 +1,138 @@ +{ + "cnCloud": { + "get_info": { + "binded": 1, + "cld_connection": 1, + "err_code": 0, + "fwDlPage": "", + "fwNotifyType": -1, + "illegalType": 0, + "server": "n-devs.tplinkcloud.com", + "stopConnect": 0, + "tcspInfo": "", + "tcspStatus": 1, + "username": "user@example.com" + }, + "get_intl_fw_list": { + "err_code": 0, + "fw_list": [] + } + }, + "discovery_result": { + "error_code": 0, + "result": { + "device_id": "00000000000000000000000000000000", + "device_model": "KS230(US)", + "device_type": "IOT.SMARTPLUGSWITCH", + "factory_default": false, + "hw_ver": "2.0", + "ip": "127.0.0.123", + "mac": "BC-07-1D-00-00-00", + "mgt_encrypt_schm": { + "ANS": false, + "encrypt_type": "KLAP", + "http_port": 80, + "is_support_https": false, + "lv": 2, + "new_klap": 1 + }, + "obd_src": "tplink", + "owner": "00000000000000000000000000000000", + "protocol_version": 1 + } + }, + "schedule": { + "get_next_action": { + "err_code": 0, + "type": -1 + }, + "get_rules": { + "enable": 1, + "err_code": 0, + "rule_list": [], + "version": 2 + } + }, + "smartlife.iot.dimmer": { + "get_default_behavior": { + "double_click": { + "mode": "none" + }, + "err_code": 0, + "hard_on": { + "mode": "last_status" + }, + "long_press": { + "mode": "instant_on_off" + }, + "soft_on": { + "mode": "last_status" + } + }, + "get_dimmer_parameters": { + "bulb_type": 1, + "calibration_type": 0, + "err_code": 0, + "fadeOffTime": 0, + "fadeOnTime": 1000, + "gentleOffTime": 10000, + "gentleOnTime": 3000, + "maxThreshold": 100, + "minThreshold": 14, + "rampRate": 30 + } + }, + "system": { + "get_sysinfo": { + "active_mode": "none", + "alias": "#MASKED_NAME#", + "brightness": 100, + "dc_state": 0, + "dev_name": "Wi-Fi Smart 3-Way Dimmer", + "deviceId": "0000000000000000000000000000000000000000", + "err_code": 0, + "feature": "TIM", + "hwId": "00000000000000000000000000000000", + "hw_ver": "2.0", + "icon_hash": "", + "latitude_i": 0, + "led_off": 1, + "lnk_on": 1, + "longitude_i": 0, + "mac": "BC:07:1D:00:00:00", + "max_thr": 1, + "mic_type": "IOT.SMARTPLUGSWITCH", + "model": "KS230(US)", + "next_action": { + "type": -1 + }, + "ntc_state": 0, + "obd_src": "tplink", + "oemId": "00000000000000000000000000000000", + "on_time": 0, + "preferred_state": [ + { + "brightness": 100, + "index": 0 + }, + { + "brightness": 75, + "index": 1 + }, + { + "brightness": 50, + "index": 2 + }, + { + "brightness": 25, + "index": 3 + } + ], + "relay_state": 0, + "rssi": -48, + "status": "new", + "sw_ver": "1.1.4 Build 241223 Rel.105830", + "updating": 0 + } + } +}