## [0.11.0.1](https://github.com/python-kasa/python-kasa/tree/0.11.0.1) (2026-10-04) [Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.10.2...0.11.0.1) **Release summary:** *Note: 0.11.0 was tagged but never published to PyPI due to a packaging issue. 0.11.0.1 contains the same changes plus a fix for the release workflow.* This is a huge and long overdue release, coming more than a year and a half after the previous one. Hopefully the next one follows sooner, as the TPAP transport (which did not make it into this release) is used more and more on newer devices. This release brings broader camera support, new modules for lights, vacuums and cameras, and many connectivity fixes for newer firmware versions. Some other highlights: - Improved Tapo camera support: login version 3, presets, wifi handling, last alert detection, and more robust authentication and discovery. - Selective room cleaning for robot vacuums. - Configurable light strip length via the new strip segment module, and an exposed light transition state change flag. - Basic HomeKit module for Kasa (iot) devices. - Energy monitoring V2 support (S515D). - Better hub and thermostat state reporting (hold, summer mode, low battery). - Connection fixes for newer Tapo firmware and older SSL devices, plus KLAP v2 for iot devices. - More resilient time handling, with failover and UTC fallback for iot devices. - Python 3.14 is now supported. - Inclusion of fixtures for 29 devices or firmware versions, including the Tapo C460, C200 and C101 cameras and the KH100 hub with KE100/KE110 thermostats. **Thank you to all contributors!** A big thank you to everyone who contributed to this release, whether through code, device fixtures, bug reports or testing. Special thanks to @ZeliardM for a huge effort on both features and project maintenance, including but not limited to: - Features like the HomeKit module for iot devices, iot time module failover, wifi handling and credential improvements for cameras, Tapo login version 3, and V2 energy monitoring for S515D. - A lot of necessary maintenance work including type annotations and cleanups throughout the test suite, modernized docstrings, CI hardening with SHA-pinned actions, and many bug fixes. This helps us to keep the library maintainable and open to new contributions. A warm welcome to our new contributors, with special thanks to those who contributed improvements and fixes: - @alams154: discovery on port 20004 - @bluntman001: iot device classification fix - @bm1549: KLAP v2 transport for iot devices - @darylldelfin: cipher support for newer Tapo firmware - @davidefiocco: vacuum mop water level fix - @epg-pers: selective room cleaning for vacuums - @freeKC: camera discovery and authentication fixes - @gpongelli: extended camera detection - @Ikstar: KL420 color temperature range - @juherr: last alert detection module for cameras, camera error codes and a C200 fixture - @kad: SSL connections to older devices - @KaloyanNaumov: multi-request timeout handling - @loganrosen: KL400L5 color temperature range - @markvanpraet: Tapo C460 support and camera battery fix - @monteccarlos: iot timezone mapping fix - @mrwogu: preset support for Tapo cameras - @nopoz: strip segment module, light transition flag and credentials hash fix - @tk1475: UTC fallback for unset iot device clocks - @wh1t3f1r3: non-retryable network error handling Thanks also to our new contributors who provided device fixtures to help future development efforts: @emanueleg, @fantandrea, @HarryPehkonen, @ijaron, @Krotu, @LostLuma, @mjbohr and @TheLinuxGuy. **This release in numbers:** - 68 merged pull requests from 29 contributors, 27 of them first-time contributors - 8 new modules - 29 new device fixtures - 203 files changed, with 25,199 lines added and 2,585 removed **Implemented enhancements:** - \[Feature Request\] C220 camera line crossing detection on-off switch [\#1551](https://github.com/python-kasa/python-kasa/issues/1551) - SslAesTransport: handshake again when a camera answers 401 to passthrough [\#1771](https://github.com/python-kasa/python-kasa/pull/1771) (@freeKC) - Add LastAlertDetection module for smartcam devices [\#1762](https://github.com/python-kasa/python-kasa/pull/1762) (@juherr) - Add KL420 to TPLINK\_KELVIN color temperature ranges [\#1757](https://github.com/python-kasa/python-kasa/pull/1757) (@Ikstar) - Do not authenticate with a credentials\_hash from a different transport [\#1749](https://github.com/python-kasa/python-kasa/pull/1749) (@nopoz) - Expose the light transition state change flag [\#1745](https://github.com/python-kasa/python-kasa/pull/1745) (@nopoz) - Add strip segment module for configurable light strip length [\#1744](https://github.com/python-kasa/python-kasa/pull/1744) (@nopoz) - Add KL400L5 color temperature range [\#1719](https://github.com/python-kasa/python-kasa/pull/1719) (@loganrosen) - Update smartcam credential handling and tests [\#1664](https://github.com/python-kasa/python-kasa/pull/1664) (@ZeliardM) - Add support for V2 Energy Monitoring for S515D [\#1663](https://github.com/python-kasa/python-kasa/pull/1663) (@ZeliardM) - Add selective room cleaning to vacuum clean module [\#1660](https://github.com/python-kasa/python-kasa/pull/1660) (@epg-pers) - New Wi-Fi handling for SMARTCAM devices [\#1639](https://github.com/python-kasa/python-kasa/pull/1639) (@ZeliardM) - Add support for tapo login\_version 3 in sslaestransport [\#1638](https://github.com/python-kasa/python-kasa/pull/1638) (@ZeliardM) - Add preset support for Tapo cameras [\#1615](https://github.com/python-kasa/python-kasa/pull/1615) (@mrwogu) - Add python 3.14 to supported versions [\#1599](https://github.com/python-kasa/python-kasa/pull/1599) (@rytilahti) - Add discovery port 20004 [\#1595](https://github.com/python-kasa/python-kasa/pull/1595) (@alams154) - Implement IOT Time Module Failover [\#1583](https://github.com/python-kasa/python-kasa/pull/1583) (@ZeliardM) - Add bare bones homekit module for iot devices [\#1566](https://github.com/python-kasa/python-kasa/pull/1566) (@ZeliardM) - Extend smartcam detection support [\#1552](https://github.com/python-kasa/python-kasa/pull/1552) (@gpongelli) **Fixed bugs:** - Time module unavailable for waterleak sensor [\#1613](https://github.com/python-kasa/python-kasa/issues/1613) - 'No time zone found with key EST' in debian 13 [\#1579](https://github.com/python-kasa/python-kasa/issues/1579) - Discovery: accept cameras that only send the encrypt\_type list [\#1770](https://github.com/python-kasa/python-kasa/pull/1770) (@freeKC) - Classify IOT devices via sysinfo regardless of transport \(fixes \#1740\) [\#1769](https://github.com/python-kasa/python-kasa/pull/1769) (@bluntman001) - Fall back to UTC for iot time when the device clock is not set [\#1768](https://github.com/python-kasa/python-kasa/pull/1768) (@tk1475) - Add UNKNOWN\_USERNAME \(-60502\) camera error code [\#1761](https://github.com/python-kasa/python-kasa/pull/1761) (@juherr) - Disable multi requests on timeout during multi-request [\#1759](https://github.com/python-kasa/python-kasa/pull/1759) (@KaloyanNaumov) - Add ECDHE-RSA-AES256 cipher for newer Tapo firmware [\#1755](https://github.com/python-kasa/python-kasa/pull/1755) (@darylldelfin) - Map iot timezone index 18 to America/New\_York instead of EST [\#1743](https://github.com/python-kasa/python-kasa/pull/1743) (@monteccarlos) - fix: use KLAP v2 transport for IOT devices with login version 2 [\#1731](https://github.com/python-kasa/python-kasa/pull/1731) (@bm1549) - Add ENETUNREACH to non-retryable errors in XorTransport [\#1668](https://github.com/python-kasa/python-kasa/pull/1668) (@wh1t3f1r3) - Fix mop set\_waterlevel sending setCleanAttr without type field [\#1667](https://github.com/python-kasa/python-kasa/pull/1667) (@davidefiocco) - Fix SMARTCAM Time module and update tests [\#1659](https://github.com/python-kasa/python-kasa/pull/1659) (@ZeliardM) - Fix camera login version in CLI [\#1658](https://github.com/python-kasa/python-kasa/pull/1658) (@ZeliardM) - Allow SSL connections to older devices [\#1654](https://github.com/python-kasa/python-kasa/pull/1654) (@kad) - waterleaksensor: use parent's Time for alert timestamp [\#1614](https://github.com/python-kasa/python-kasa/pull/1614) (@rytilahti) - Add hold state to thermostatstate [\#1609](https://github.com/python-kasa/python-kasa/pull/1609) (@rytilahti) - Fix thermostat idle reporting on low battery [\#1598](https://github.com/python-kasa/python-kasa/pull/1598) (@rytilahti) - Add shutdown \(summer mode\) to thermostatstate [\#1588](https://github.com/python-kasa/python-kasa/pull/1588) (@rytilahti) - Fix iotstrip child device time handling [\#1584](https://github.com/python-kasa/python-kasa/pull/1584) (@ZeliardM) **Added support for devices:** - Add C200 device fixture [\#1760](https://github.com/python-kasa/python-kasa/pull/1760) (@juherr) - Add P125M fixture for firmware 1.4.4 [\#1746](https://github.com/python-kasa/python-kasa/pull/1746) (@HarryPehkonen) - Add fixtures for KH100, KE100 and KE110 and simulate TRV states [\#1726](https://github.com/python-kasa/python-kasa/pull/1726) (@Krotu) - Add L530EA\(EU\) device fixture [\#1694](https://github.com/python-kasa/python-kasa/pull/1694) (@ZeliardM) - Add C101 test fixture [\#1673](https://github.com/python-kasa/python-kasa/pull/1673) (@ijaron) - Add LB130\(US\) device fixture [\#1669](https://github.com/python-kasa/python-kasa/pull/1669) (@ZeliardM) - Add KL110B\(UN\) device fixture [\#1657](https://github.com/python-kasa/python-kasa/pull/1657) (@ZeliardM) - Add TS15\(US\) device fixture [\#1649](https://github.com/python-kasa/python-kasa/pull/1649) (@ZeliardM) - Add Tapo C460 support [\#1645](https://github.com/python-kasa/python-kasa/pull/1645) (@markvanpraet) - Add P105\(US\) device fixture [\#1644](https://github.com/python-kasa/python-kasa/pull/1644) (@ZeliardM) - Add L430C\(EU\) device fixture [\#1643](https://github.com/python-kasa/python-kasa/pull/1643) (@ZeliardM) - Add L430P\(EU\) device fixture [\#1607](https://github.com/python-kasa/python-kasa/pull/1607) (@LostLuma) - Add S500\(US\)\_1.0\_1.2.0 fixture [\#1569](https://github.com/python-kasa/python-kasa/pull/1569) (@ZeliardM) - Add device fixture for P316M\(US\) [\#1568](https://github.com/python-kasa/python-kasa/pull/1568) (@TheLinuxGuy) - Add L535E\(EU\) 3.0 1.1.8 fixture [\#1545](https://github.com/python-kasa/python-kasa/pull/1545) (@fantandrea) - Adding KL400L10\(US\)\_1.0\_1.0.10 fixture [\#1539](https://github.com/python-kasa/python-kasa/pull/1539) (@mjbohr) - Add TP10\(IT\) 1.0 1.2.5 fixture [\#1538](https://github.com/python-kasa/python-kasa/pull/1538) (@emanueleg) - Add LB100\(US\)\_1.0\_1.8.11 fixture file [\#1515](https://github.com/python-kasa/python-kasa/pull/1515) (@ZeliardM) - Add KS225\(US\)\_1.0\_1.1.1 and L930-5\(EU\)\_1.0\_1.2.5 [\#1509](https://github.com/python-kasa/python-kasa/pull/1509) (@ZeliardM) **Documentation updates:** - How to hash credentials to make use of --credentials-hash flag? [\#1517](https://github.com/python-kasa/python-kasa/issues/1517) - docs: modernize docstrings across the repository [\#1682](https://github.com/python-kasa/python-kasa/pull/1682) (@ZeliardM) - Add a note to emeter guide being kasa-only [\#1512](https://github.com/python-kasa/python-kasa/pull/1512) (@rytilahti) **Project maintenance:** - Fix PyPI publishing for packages with metadata 2.5 [\#1779](https://github.com/python-kasa/python-kasa/pull/1779) (@rytilahti) - tests: add type annotations to top-level test files [\#1688](https://github.com/python-kasa/python-kasa/pull/1688) (@ZeliardM) - tests: add type annotations to CLI, protocol, and smartcam tests [\#1687](https://github.com/python-kasa/python-kasa/pull/1687) (@ZeliardM) - tests: add type annotations to Smart tests [\#1686](https://github.com/python-kasa/python-kasa/pull/1686) (@ZeliardM) - tests: add type annotations to IoT tests [\#1685](https://github.com/python-kasa/python-kasa/pull/1685) (@ZeliardM) - tests: add type annotations to transport tests [\#1684](https://github.com/python-kasa/python-kasa/pull/1684) (@ZeliardM) - tests: centralize transport and session cleanup in conftest [\#1683](https://github.com/python-kasa/python-kasa/pull/1683) (@ZeliardM) - ci: pin all GitHub Actions to SHA hashes and update versions [\#1681](https://github.com/python-kasa/python-kasa/pull/1681) (@ZeliardM) - tests: fix typos, child device subtype, CLI patch path, and deprecation test logic [\#1677](https://github.com/python-kasa/python-kasa/pull/1677) (@ZeliardM) - Update GitHub Workflows and Actions [\#1622](https://github.com/python-kasa/python-kasa/pull/1622) (@ZeliardM) - Use log-level debug for smartdevice query error reporting [\#1587](https://github.com/python-kasa/python-kasa/pull/1587) (@rytilahti) - Use Device instead of SmartDevice where feasible [\#1585](https://github.com/python-kasa/python-kasa/pull/1585) (@ZeliardM) **Closed issues:** - Python 3.14 Support [\#1597](https://github.com/python-kasa/python-kasa/issues/1597) - HS300 Child State - Time Module Error [\#1445](https://github.com/python-kasa/python-kasa/issues/1445)
python-kasa
python-kasa is a Python library to control TPLink's smart home devices (plugs, wall switches, power strips, and bulbs).
This is a voluntary, community-driven effort and is not affiliated, sponsored, or endorsed by TPLink.
Contributions in any form (adding missing features, reporting issues, fixing or triaging existing ones, improving the documentation, or device donations) are more than welcome!
Getting started
You can install the most recent release using pip:
pip install python-kasa
Alternatively, you can clone this repository and use uv to install the development version:
git clone https://github.com/python-kasa/python-kasa.git
cd python-kasa/
uv sync --all-extras
uv run kasa
If you have not yet provisioned your device, you can do so using the cli tool.
Discovering devices
Running kasa discover will send discovery packets to the default broadcast address (255.255.255.255) to discover supported devices.
If your device requires authentication to control it,
you need to pass the credentials using --username and --password options or define KASA_USERNAME and KASA_PASSWORD environment variables.
Note
If your system has multiple network interfaces, you can specify the broadcast address using the
--targetoption.
The discover command will automatically execute the state command on all the discovered devices:
$ kasa discover
Discovering devices on 255.255.255.255 for 3 seconds
== Bulb McBulby - L530 ==
Host: 192.0.2.123
Port: 80
Device state: False
Time: 2024-06-22 15:42:15+02:00 (tz: {'timezone': 'CEST'}
Hardware: 3.0
Software: 1.1.6 Build 240130 Rel.173828
MAC (rssi): 5C:E9:31:aa:bb:cc (-50)
== Primary features ==
State (state): False
Brightness (brightness): 11 (range: 0-100)
Color temperature (color_temperature): 0 (range: 2500-6500)
Light effect (light_effect): *Off* Party Relax
== Information ==
Signal Level (signal_level): 2
Overheated (overheated): False
Cloud connection (cloud_connection): False
Update available (update_available): None
Device time (device_time): 2024-06-22 15:42:15+02:00
== Configuration ==
HSV (hsv): HSV(hue=35, saturation=70, value=11)
Auto update enabled (auto_update_enabled): False
Light preset (light_preset): *Not set* Light preset 1 Light preset 2 Light preset 3 Light preset 4 Light preset 5 Light preset 6 Light preset 7
Smooth transition on (smooth_transition_on): 2 (range: 0-60)
Smooth transition off (smooth_transition_off): 20 (range: 0-60)
== Debug ==
Device ID (device_id): soneuniqueidentifier
RSSI (rssi): -50 dBm
SSID (ssid): HomeNet
Current firmware version (current_firmware_version): 1.1.6 Build 240130 Rel.173828
Available firmware version (available_firmware_version): None
Command line usage
All devices support a variety of common commands (like on, off, and state).
The syntax to control device is kasa --host <host> <command>:
$ kasa --host 192.0.2.123 on
Use kasa --help (or consult the documentation) to get a list of all available commands and options.
Some examples of available options include JSON output (--json), more verbose output (--verbose), and defining timeouts (--timeout and --discovery-timeout).
Refer the documentation for more details.
Note
Each individual command may also have additional options, which are shown when called with the
--helpoption.
Feature interface
All devices are also controllable through a generic feature-based interface.
The available features differ from device to device and are accessible using kasa feature command:
$ kasa --host 192.0.2.123 feature
== Primary features ==
State (state): False
Brightness (brightness): 11 (range: 0-100)
Color temperature (color_temperature): 0 (range: 2500-6500)
Light effect (light_effect): *Off* Party Relax
== Information ==
Signal Level (signal_level): 2
Overheated (overheated): False
Cloud connection (cloud_connection): False
Update available (update_available): None
Device time (device_time): 2024-06-22 15:39:44+02:00
== Configuration ==
HSV (hsv): HSV(hue=35, saturation=70, value=11)
Auto update enabled (auto_update_enabled): False
Light preset (light_preset): *Not set* Light preset 1 Light preset 2 Light preset 3 Light preset 4 Light preset 5 Light preset 6 Light preset 7
Smooth transition on (smooth_transition_on): 2 (range: 0-60)
Smooth transition off (smooth_transition_off): 20 (range: 0-60)
== Debug ==
Device ID (device_id): soneuniqueidentifier
RSSI (rssi): -50 dBm
SSID (ssid): HomeNet
Current firmware version (current_firmware_version): 1.1.6 Build 240130 Rel.173828
Available firmware version (available_firmware_version): None
Some features present configuration that can be changed:
kasa --host 192.0.2.123 feature color_temperature 2500
Changing color_temperature from 0 to 2500
New state: 2500
Note
When controlling hub-connected devices, you need to pass the device ID of the connected device as an option:
kasa --host 192.0.2.200 feature --child someuniqueidentifier target_temperature 21
Library usage
import asyncio
from kasa import Discover
async def main():
dev = await Discover.discover_single("192.0.2.123", username="un@example.com", password="pw")
await dev.turn_on()
await dev.update()
if __name__ == "__main__":
asyncio.run(main())
If you want to use this library in your own project, a good starting point is the tutorial in the documentation.
You can find several code examples in the API documentation How to guides.
Information about the library design and the way the devices work can be found in the topics section.
Contributing
Contributions are very welcome! The easiest way to contribute is by creating a fixture file for the automated test suite if your device hardware and firmware version is not currently listed as supported. Please refer to our contributing guidelines.
Supported devices
The following devices have been tested and confirmed as working. If your device is unlisted but working, please consider contributing a fixture file.
Note
The hub attached Tapo buttons S200B and S200D do not currently support alerting when the button is pressed.
Note
Some firmware versions of Tapo Cameras will not authenticate unless you enable "Tapo Lab" > "Third-Party Compatibility" in the native Tapo app. Alternatively, you can factory reset and then prevent the device from accessing the internet.
Supported Kasa devices
- Plugs: EP10, EP251 , HS1001 , HS103, HS105, HS110, KP100, KP105, KP115, KP125, KP125M2 , KP401
- Power Strips: EP40, EP40M2 , HS107, HS300, KP200, KP303, KP400
- Wall Switches: ES20M, HS2001 , HS210, HS2201 , KP405, KS200, KS200M, KS2052 , KS220, KS220M, KS2252 , KS230, KS2402
- Bulbs: KL110, KL110B, KL120, KL125, KL130, KL135, KL50, KL60, LB100, LB110, LB130
- Light Strips: KL400L10, KL400L5, KL420L5, KL430
- Hubs: KH1002
- Hub-Connected Devices3 : KE1002 , KE1102
Supported Tapo2 devices
- Plugs: P100, P105, P110, P110M, P115, P125M, P135, TP10, TP15
- Power Strips: P210M, P300, P304M, P306, P316M, TP25
- Wall Switches: S210, S220, S500, S500D, S505, S505D, S515D, TS15
- Bulbs: L430C, L430P, L510B, L510E, L530B, L530E, L530EA, L535E, L630
- Light Strips: L900-10, L900-5, L920-5, L930-5
- Cameras: C100, C101, C110, C200, C210, C220, C225, C325WB, C460, C520WS, C720, TC40, TC65, TC70
- Doorbells and chimes: D100C, D130, D230
- Vacuums: RV20 Max Plus, RV30 Max
- Hubs: H100, H200
- Hub-Connected Devices3 : S200B, S200D, T100, T110, T300, T310, T315
See supported devices in our documentation for more detailed information about tested hardware and software versions.
Resources
Developer Resources
- softScheck's github contains lot of information and wireshark dissector
- TP-Link Smart Home Device Simulator
- Unofficial API documentation
- Another unofficial API documentation
- pyHS100 provides synchronous interface and is the unmaintained predecessor of this library.