GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Disable multi requests on timeout during multi-request by KaloyanNaumov · Pull Request #1759 · python-kasa/python-kasa Conversation
Contributor
SummaryA Tapo P300(EU) power strip on firmware 1. Builtin
|
| request | result |
|---|---|
get_child_device_list alone |
OK, 0.2 s, 3 children |
get_child_device_component_list alone |
OK, 0.0 s |
| both in one multipleRequest | no response (timeout) |
full update() with _multi_request_batch_size = 1 |
OK, 0.3–0.6 s |
_execute_multiple_query only disables batching on JSON_DECODE_FAIL_ERROR / INTERNAL_UNKNOWN_ERROR (#1025). This PR applies the same pattern to a TimeoutError raised while sending a batch: set the batch size to 1 and raise _RetryableError.
retry_count + 1 timeouts rather than after the first one. This is the behaviour _query's TimeoutError handler was written for.I considered adding the two child-list methods to FORCE_SINGLE_REQUEST instead. I did not, because that set is documented for requests that do not return the method key, and it would add a request for every strip and hub to work around one firmware. If you would prefer this handled as a narrower or opt-in quirk, I am happy to rework it.
test_smart_device_multiple_request_timeout, test_smart_device_multiple_request_timeout_single_requests, test_smart_device_multiple_request_child_lists_timeout (models the P300 behaviour), plus a BuiltinTimeoutError case in test_httpclient_errors. Four of these fail on master and pass with this change.uv run pytest: 22748 passed, 880 skipped, 4 failed. The four failures are timezone tests (tests/iot/test_iottimezone.py ×3, tests/test_device.py::test_device_timezones) that fail identically on an untouched master checkout in my environment.pre-commit run on the changed files: all hooks pass, including ruff, ruff-format and mypy.Discover.discover_single + update() with the default batch size:| master | this branch | |
|---|---|---|
| request timeout 10 s | KasaException ... TimeoutError() after ~10.5 s |
OK, ~11.7 s, 3 children |
request timeout 5 s, first update() |
— | OK, ~6.5 s |
request timeout 5 s, next update() |
— | OK, 0.1–0.3 s |
A fixture for P300(EU)_1.0_1.0.7 already exists, so none is added.
This PR was prepared with the help of an AI coding assistant (Claude). I reviewed the change, and the device measurements above were taken against my own hardware.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
python-kasa#1273 rewrote `asyncio.TimeoutError` to `TimeoutError` in httpclient.py, but the module imports `TimeoutError` from kasa.exceptions, which shadows the builtin. aiohttp raises the builtin TimeoutError when `ClientTimeout(total=...)` expires after the connection is established, so those timeouts fell through to the generic handler and were raised as a non-retryable KasaException instead of kasa's TimeoutError. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The P300(EU) on firmware 1.0.7 never answers a multipleRequest that contains both get_child_device_component_list and get_child_device_list, while each request sent on its own succeeds. The existing fallback to single requests only triggers on JSON_DECODE_FAIL_ERROR and INTERNAL_UNKNOWN_ERROR, so the device could not be updated. Treat a timeout on a batched request the same way: disable batching and retry. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## master #1759 +/- ## ======================================= Coverage 93.29% 93.29% ======================================= Files 157 157 Lines 9932 9937 +5 Branches 1022 1022 ======================================= + Hits 9266 9271 +5 Misses 471 471 Partials 195 195 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The batched request loop only runs when the batch size is not 1, as a batch size of 1 sends single requests and returns earlier, so the `batch size != 1` check and the re-raise were dead code and left uncovered. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @KaloyanNaumov. The change sounds reasonable, so I just merge it as-is to continue release preparations.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # P300 does not respond to some batched requests (e.g. both child | ||
| # list requests together) so disable batching. Batch size is never | ||
| # 1 here as that case sends single requests above. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is P300 specific, so I wanted to cleanup the comment. Alas, I could not push to your branch.
I am merging this now to get it into the next release I am preparing.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
## [0.11.0](https://github.com/python-kasa/python-kasa/tree/0.11.0) (2026-10-04) [Full Changelog](0.10.2...0.11.0) **Release summary:** 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](#1551) - SslAesTransport: handshake again when a camera answers 401 to passthrough [\#1771](#1771) (@freeKC) - Add LastAlertDetection module for smartcam devices [\#1762](#1762) (@juherr) - Add KL420 to TPLINK\_KELVIN color temperature ranges [\#1757](#1757) (@Ikstar) - Do not authenticate with a credentials\_hash from a different transport [\#1749](#1749) (@nopoz) - Expose the light transition state change flag [\#1745](#1745) (@nopoz) - Add strip segment module for configurable light strip length [\#1744](#1744) (@nopoz) - Add KL400L5 color temperature range [\#1719](#1719) (@loganrosen) - Update smartcam credential handling and tests [\#1664](#1664) (@ZeliardM) - Add support for V2 Energy Monitoring for S515D [\#1663](#1663) (@ZeliardM) - Add selective room cleaning to vacuum clean module [\#1660](#1660) (@epg-pers) - New Wi-Fi handling for SMARTCAM devices [\#1639](#1639) (@ZeliardM) - Add support for tapo login\_version 3 in sslaestransport [\#1638](#1638) (@ZeliardM) - Add preset support for Tapo cameras [\#1615](#1615) (@mrwogu) - Add python 3.14 to supported versions [\#1599](#1599) (@rytilahti) - Add discovery port 20004 [\#1595](#1595) (@alams154) - Implement IOT Time Module Failover [\#1583](#1583) (@ZeliardM) - Add bare bones homekit module for iot devices [\#1566](#1566) (@ZeliardM) - Extend smartcam detection support [\#1552](#1552) (@gpongelli) **Fixed bugs:** - Time module unavailable for waterleak sensor [\#1613](#1613) - 'No time zone found with key EST' in debian 13 [\#1579](#1579) - Discovery: accept cameras that only send the encrypt\_type list [\#1770](#1770) (@freeKC) - Classify IOT devices via sysinfo regardless of transport \(fixes \#1740\) [\#1769](#1769) (@bluntman001) - Fall back to UTC for iot time when the device clock is not set [\#1768](#1768) (@tk1475) - Add UNKNOWN\_USERNAME \(-60502\) camera error code [\#1761](#1761) (@juherr) - Disable multi requests on timeout during multi-request [\#1759](#1759) (@KaloyanNaumov) - Add ECDHE-RSA-AES256 cipher for newer Tapo firmware [\#1755](#1755) (@darylldelfin) - Map iot timezone index 18 to America/New\_York instead of EST [\#1743](#1743) (@monteccarlos) - fix: use KLAP v2 transport for IOT devices with login version 2 [\#1731](#1731) (@bm1549) - Add ENETUNREACH to non-retryable errors in XorTransport [\#1668](#1668) (@wh1t3f1r3) - Fix mop set\_waterlevel sending setCleanAttr without type field [\#1667](#1667) (@davidefiocco) - Fix SMARTCAM Time module and update tests [\#1659](#1659) (@ZeliardM) - Fix camera login version in CLI [\#1658](#1658) (@ZeliardM) - Allow SSL connections to older devices [\#1654](#1654) (@kad) - waterleaksensor: use parent's Time for alert timestamp [\#1614](#1614) (@rytilahti) - Add hold state to thermostatstate [\#1609](#1609) (@rytilahti) - Fix thermostat idle reporting on low battery [\#1598](#1598) (@rytilahti) - Add shutdown \(summer mode\) to thermostatstate [\#1588](#1588) (@rytilahti) - Fix iotstrip child device time handling [\#1584](#1584) (@ZeliardM) **Added support for devices:** - Add C200 device fixture [\#1760](#1760) (@juherr) - Add P125M fixture for firmware 1.4.4 [\#1746](#1746) (@HarryPehkonen) - Add fixtures for KH100, KE100 and KE110 and simulate TRV states [\#1726](#1726) (@Krotu) - Add L530EA\(EU\) device fixture [\#1694](#1694) (@ZeliardM) - Add C101 test fixture [\#1673](#1673) (@ijaron) - Add LB130\(US\) device fixture [\#1669](#1669) (@ZeliardM) - Add KL110B\(UN\) device fixture [\#1657](#1657) (@ZeliardM) - Add TS15\(US\) device fixture [\#1649](#1649) (@ZeliardM) - Add Tapo C460 support [\#1645](#1645) (@markvanpraet) - Add P105\(US\) device fixture [\#1644](#1644) (@ZeliardM) - Add L430C\(EU\) device fixture [\#1643](#1643) (@ZeliardM) - Add L430P\(EU\) device fixture [\#1607](#1607) (@LostLuma) - Add S500\(US\)\_1.0\_1.2.0 fixture [\#1569](#1569) (@ZeliardM) - Add device fixture for P316M\(US\) [\#1568](#1568) (@TheLinuxGuy) - Add L535E\(EU\) 3.0 1.1.8 fixture [\#1545](#1545) (@fantandrea) - Adding KL400L10\(US\)\_1.0\_1.0.10 fixture [\#1539](#1539) (@mjbohr) - Add TP10\(IT\) 1.0 1.2.5 fixture [\#1538](#1538) (@emanueleg) - Add LB100\(US\)\_1.0\_1.8.11 fixture file [\#1515](#1515) (@ZeliardM) - Add KS225\(US\)\_1.0\_1.1.1 and L930-5\(EU\)\_1.0\_1.2.5 [\#1509](#1509) (@ZeliardM) **Documentation updates:** - How to hash credentials to make use of --credentials-hash flag? [\#1517](#1517) - docs: modernize docstrings across the repository [\#1682](#1682) (@ZeliardM) - Add a note to emeter guide being kasa-only [\#1512](#1512) (@rytilahti) **Project maintenance:** - tests: add type annotations to top-level test files [\#1688](#1688) (@ZeliardM) - tests: add type annotations to CLI, protocol, and smartcam tests [\#1687](#1687) (@ZeliardM) - tests: add type annotations to Smart tests [\#1686](#1686) (@ZeliardM) - tests: add type annotations to IoT tests [\#1685](#1685) (@ZeliardM) - tests: add type annotations to transport tests [\#1684](#1684) (@ZeliardM) - tests: centralize transport and session cleanup in conftest [\#1683](#1683) (@ZeliardM) - ci: pin all GitHub Actions to SHA hashes and update versions [\#1681](#1681) (@ZeliardM) - tests: fix typos, child device subtype, CLI patch path, and deprecation test logic [\#1677](#1677) (@ZeliardM) - Update GitHub Workflows and Actions [\#1622](#1622) (@ZeliardM) - Use log-level debug for smartdevice query error reporting [\#1587](#1587) (@rytilahti) - Use Device instead of SmartDevice where feasible [\#1585](#1585) (@ZeliardM) **Closed issues:** - Python 3.14 Support [\#1597](#1597) - HS300 Child State - Time Module Error [\#1445](#1445)
## [0.11.0.1](https://github.com/python-kasa/python-kasa/tree/0.11.0.1) (2026-10-04) [Full Changelog](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](#1551) - SslAesTransport: handshake again when a camera answers 401 to passthrough [\#1771](#1771) (@freeKC) - Add LastAlertDetection module for smartcam devices [\#1762](#1762) (@juherr) - Add KL420 to TPLINK\_KELVIN color temperature ranges [\#1757](#1757) (@Ikstar) - Do not authenticate with a credentials\_hash from a different transport [\#1749](#1749) (@nopoz) - Expose the light transition state change flag [\#1745](#1745) (@nopoz) - Add strip segment module for configurable light strip length [\#1744](#1744) (@nopoz) - Add KL400L5 color temperature range [\#1719](#1719) (@loganrosen) - Update smartcam credential handling and tests [\#1664](#1664) (@ZeliardM) - Add support for V2 Energy Monitoring for S515D [\#1663](#1663) (@ZeliardM) - Add selective room cleaning to vacuum clean module [\#1660](#1660) (@epg-pers) - New Wi-Fi handling for SMARTCAM devices [\#1639](#1639) (@ZeliardM) - Add support for tapo login\_version 3 in sslaestransport [\#1638](#1638) (@ZeliardM) - Add preset support for Tapo cameras [\#1615](#1615) (@mrwogu) - Add python 3.14 to supported versions [\#1599](#1599) (@rytilahti) - Add discovery port 20004 [\#1595](#1595) (@alams154) - Implement IOT Time Module Failover [\#1583](#1583) (@ZeliardM) - Add bare bones homekit module for iot devices [\#1566](#1566) (@ZeliardM) - Extend smartcam detection support [\#1552](#1552) (@gpongelli) **Fixed bugs:** - Time module unavailable for waterleak sensor [\#1613](#1613) - 'No time zone found with key EST' in debian 13 [\#1579](#1579) - Discovery: accept cameras that only send the encrypt\_type list [\#1770](#1770) (@freeKC) - Classify IOT devices via sysinfo regardless of transport \(fixes \#1740\) [\#1769](#1769) (@bluntman001) - Fall back to UTC for iot time when the device clock is not set [\#1768](#1768) (@tk1475) - Add UNKNOWN\_USERNAME \(-60502\) camera error code [\#1761](#1761) (@juherr) - Disable multi requests on timeout during multi-request [\#1759](#1759) (@KaloyanNaumov) - Add ECDHE-RSA-AES256 cipher for newer Tapo firmware [\#1755](#1755) (@darylldelfin) - Map iot timezone index 18 to America/New\_York instead of EST [\#1743](#1743) (@monteccarlos) - fix: use KLAP v2 transport for IOT devices with login version 2 [\#1731](#1731) (@bm1549) - Add ENETUNREACH to non-retryable errors in XorTransport [\#1668](#1668) (@wh1t3f1r3) - Fix mop set\_waterlevel sending setCleanAttr without type field [\#1667](#1667) (@davidefiocco) - Fix SMARTCAM Time module and update tests [\#1659](#1659) (@ZeliardM) - Fix camera login version in CLI [\#1658](#1658) (@ZeliardM) - Allow SSL connections to older devices [\#1654](#1654) (@kad) - waterleaksensor: use parent's Time for alert timestamp [\#1614](#1614) (@rytilahti) - Add hold state to thermostatstate [\#1609](#1609) (@rytilahti) - Fix thermostat idle reporting on low battery [\#1598](#1598) (@rytilahti) - Add shutdown \(summer mode\) to thermostatstate [\#1588](#1588) (@rytilahti) - Fix iotstrip child device time handling [\#1584](#1584) (@ZeliardM) **Added support for devices:** - Add C200 device fixture [\#1760](#1760) (@juherr) - Add P125M fixture for firmware 1.4.4 [\#1746](#1746) (@HarryPehkonen) - Add fixtures for KH100, KE100 and KE110 and simulate TRV states [\#1726](#1726) (@Krotu) - Add L530EA\(EU\) device fixture [\#1694](#1694) (@ZeliardM) - Add C101 test fixture [\#1673](#1673) (@ijaron) - Add LB130\(US\) device fixture [\#1669](#1669) (@ZeliardM) - Add KL110B\(UN\) device fixture [\#1657](#1657) (@ZeliardM) - Add TS15\(US\) device fixture [\#1649](#1649) (@ZeliardM) - Add Tapo C460 support [\#1645](#1645) (@markvanpraet) - Add P105\(US\) device fixture [\#1644](#1644) (@ZeliardM) - Add L430C\(EU\) device fixture [\#1643](#1643) (@ZeliardM) - Add L430P\(EU\) device fixture [\#1607](#1607) (@LostLuma) - Add S500\(US\)\_1.0\_1.2.0 fixture [\#1569](#1569) (@ZeliardM) - Add device fixture for P316M\(US\) [\#1568](#1568) (@TheLinuxGuy) - Add L535E\(EU\) 3.0 1.1.8 fixture [\#1545](#1545) (@fantandrea) - Adding KL400L10\(US\)\_1.0\_1.0.10 fixture [\#1539](#1539) (@mjbohr) - Add TP10\(IT\) 1.0 1.2.5 fixture [\#1538](#1538) (@emanueleg) - Add LB100\(US\)\_1.0\_1.8.11 fixture file [\#1515](#1515) (@ZeliardM) - Add KS225\(US\)\_1.0\_1.1.1 and L930-5\(EU\)\_1.0\_1.2.5 [\#1509](#1509) (@ZeliardM) **Documentation updates:** - How to hash credentials to make use of --credentials-hash flag? [\#1517](#1517) - docs: modernize docstrings across the repository [\#1682](#1682) (@ZeliardM) - Add a note to emeter guide being kasa-only [\#1512](#1512) (@rytilahti) **Project maintenance:** - Fix PyPI publishing for packages with metadata 2.5 [\#1779](#1779) (@rytilahti) - tests: add type annotations to top-level test files [\#1688](#1688) (@ZeliardM) - tests: add type annotations to CLI, protocol, and smartcam tests [\#1687](#1687) (@ZeliardM) - tests: add type annotations to Smart tests [\#1686](#1686) (@ZeliardM) - tests: add type annotations to IoT tests [\#1685](#1685) (@ZeliardM) - tests: add type annotations to transport tests [\#1684](#1684) (@ZeliardM) - tests: centralize transport and session cleanup in conftest [\#1683](#1683) (@ZeliardM) - ci: pin all GitHub Actions to SHA hashes and update versions [\#1681](#1681) (@ZeliardM) - tests: fix typos, child device subtype, CLI patch path, and deprecation test logic [\#1677](#1677) (@ZeliardM) - Update GitHub Workflows and Actions [\#1622](#1622) (@ZeliardM) - Use log-level debug for smartdevice query error reporting [\#1587](#1587) (@rytilahti) - Use Device instead of SmartDevice where feasible [\#1585](#1585) (@ZeliardM) **Closed issues:** - Python 3.14 Support [\#1597](#1597) - HS300 Child State - Time Module Error [\#1445](#1445)
) _execute_multiple_query only disables batching on JSON_DECODE_FAIL_ERROR / INTERNAL_UNKNOWN_ERROR (python-kasa#1025). This change applies the same pattern to a TimeoutError raised while sending a batch: set the batch size to 1 and raise _RetryableError. --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
## [0.11.0](https://github.com/python-kasa/python-kasa/tree/0.11.0) (2026-10-04) [Full Changelog](python-kasa/python-kasa@0.10.2...0.11.0) **Release summary:** 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 [\python-kasa#1551](python-kasa#1551) - SslAesTransport: handshake again when a camera answers 401 to passthrough [\python-kasa#1771](python-kasa#1771) (@freeKC) - Add LastAlertDetection module for smartcam devices [\python-kasa#1762](python-kasa#1762) (@juherr) - Add KL420 to TPLINK\_KELVIN color temperature ranges [\python-kasa#1757](python-kasa#1757) (@Ikstar) - Do not authenticate with a credentials\_hash from a different transport [\python-kasa#1749](python-kasa#1749) (@nopoz) - Expose the light transition state change flag [\python-kasa#1745](python-kasa#1745) (@nopoz) - Add strip segment module for configurable light strip length [\python-kasa#1744](python-kasa#1744) (@nopoz) - Add KL400L5 color temperature range [\python-kasa#1719](python-kasa#1719) (@loganrosen) - Update smartcam credential handling and tests [\python-kasa#1664](python-kasa#1664) (@ZeliardM) - Add support for V2 Energy Monitoring for S515D [\python-kasa#1663](python-kasa#1663) (@ZeliardM) - Add selective room cleaning to vacuum clean module [\python-kasa#1660](python-kasa#1660) (@epg-pers) - New Wi-Fi handling for SMARTCAM devices [\python-kasa#1639](python-kasa#1639) (@ZeliardM) - Add support for tapo login\_version 3 in sslaestransport [\python-kasa#1638](python-kasa#1638) (@ZeliardM) - Add preset support for Tapo cameras [\python-kasa#1615](python-kasa#1615) (@mrwogu) - Add python 3.14 to supported versions [\python-kasa#1599](python-kasa#1599) (@rytilahti) - Add discovery port 20004 [\python-kasa#1595](python-kasa#1595) (@alams154) - Implement IOT Time Module Failover [\python-kasa#1583](python-kasa#1583) (@ZeliardM) - Add bare bones homekit module for iot devices [\python-kasa#1566](python-kasa#1566) (@ZeliardM) - Extend smartcam detection support [\python-kasa#1552](python-kasa#1552) (@gpongelli) **Fixed bugs:** - Time module unavailable for waterleak sensor [\python-kasa#1613](python-kasa#1613) - 'No time zone found with key EST' in debian 13 [\python-kasa#1579](python-kasa#1579) - Discovery: accept cameras that only send the encrypt\_type list [\python-kasa#1770](python-kasa#1770) (@freeKC) - Classify IOT devices via sysinfo regardless of transport \(fixes \python-kasa#1740\) [\python-kasa#1769](python-kasa#1769) (@bluntman001) - Fall back to UTC for iot time when the device clock is not set [\python-kasa#1768](python-kasa#1768) (@tk1475) - Add UNKNOWN\_USERNAME \(-60502\) camera error code [\python-kasa#1761](python-kasa#1761) (@juherr) - Disable multi requests on timeout during multi-request [\python-kasa#1759](python-kasa#1759) (@KaloyanNaumov) - Add ECDHE-RSA-AES256 cipher for newer Tapo firmware [\python-kasa#1755](python-kasa#1755) (@darylldelfin) - Map iot timezone index 18 to America/New\_York instead of EST [\python-kasa#1743](python-kasa#1743) (@monteccarlos) - fix: use KLAP v2 transport for IOT devices with login version 2 [\python-kasa#1731](python-kasa#1731) (@bm1549) - Add ENETUNREACH to non-retryable errors in XorTransport [\python-kasa#1668](python-kasa#1668) (@wh1t3f1r3) - Fix mop set\_waterlevel sending setCleanAttr without type field [\python-kasa#1667](python-kasa#1667) (@davidefiocco) - Fix SMARTCAM Time module and update tests [\python-kasa#1659](python-kasa#1659) (@ZeliardM) - Fix camera login version in CLI [\python-kasa#1658](python-kasa#1658) (@ZeliardM) - Allow SSL connections to older devices [\python-kasa#1654](python-kasa#1654) (@kad) - waterleaksensor: use parent's Time for alert timestamp [\python-kasa#1614](python-kasa#1614) (@rytilahti) - Add hold state to thermostatstate [\python-kasa#1609](python-kasa#1609) (@rytilahti) - Fix thermostat idle reporting on low battery [\python-kasa#1598](python-kasa#1598) (@rytilahti) - Add shutdown \(summer mode\) to thermostatstate [\python-kasa#1588](python-kasa#1588) (@rytilahti) - Fix iotstrip child device time handling [\python-kasa#1584](python-kasa#1584) (@ZeliardM) **Added support for devices:** - Add C200 device fixture [\python-kasa#1760](python-kasa#1760) (@juherr) - Add P125M fixture for firmware 1.4.4 [\python-kasa#1746](python-kasa#1746) (@HarryPehkonen) - Add fixtures for KH100, KE100 and KE110 and simulate TRV states [\python-kasa#1726](python-kasa#1726) (@Krotu) - Add L530EA\(EU\) device fixture [\python-kasa#1694](python-kasa#1694) (@ZeliardM) - Add C101 test fixture [\python-kasa#1673](python-kasa#1673) (@ijaron) - Add LB130\(US\) device fixture [\python-kasa#1669](python-kasa#1669) (@ZeliardM) - Add KL110B\(UN\) device fixture [\python-kasa#1657](python-kasa#1657) (@ZeliardM) - Add TS15\(US\) device fixture [\python-kasa#1649](python-kasa#1649) (@ZeliardM) - Add Tapo C460 support [\python-kasa#1645](python-kasa#1645) (@markvanpraet) - Add P105\(US\) device fixture [\python-kasa#1644](python-kasa#1644) (@ZeliardM) - Add L430C\(EU\) device fixture [\python-kasa#1643](python-kasa#1643) (@ZeliardM) - Add L430P\(EU\) device fixture [\python-kasa#1607](python-kasa#1607) (@LostLuma) - Add S500\(US\)\_1.0\_1.2.0 fixture [\python-kasa#1569](python-kasa#1569) (@ZeliardM) - Add device fixture for P316M\(US\) [\python-kasa#1568](python-kasa#1568) (@TheLinuxGuy) - Add L535E\(EU\) 3.0 1.1.8 fixture [\python-kasa#1545](python-kasa#1545) (@fantandrea) - Adding KL400L10\(US\)\_1.0\_1.0.10 fixture [\python-kasa#1539](python-kasa#1539) (@mjbohr) - Add TP10\(IT\) 1.0 1.2.5 fixture [\python-kasa#1538](python-kasa#1538) (@emanueleg) - Add LB100\(US\)\_1.0\_1.8.11 fixture file [\python-kasa#1515](python-kasa#1515) (@ZeliardM) - Add KS225\(US\)\_1.0\_1.1.1 and L930-5\(EU\)\_1.0\_1.2.5 [\python-kasa#1509](python-kasa#1509) (@ZeliardM) **Documentation updates:** - How to hash credentials to make use of --credentials-hash flag? [\python-kasa#1517](python-kasa#1517) - docs: modernize docstrings across the repository [\python-kasa#1682](python-kasa#1682) (@ZeliardM) - Add a note to emeter guide being kasa-only [\python-kasa#1512](python-kasa#1512) (@rytilahti) **Project maintenance:** - tests: add type annotations to top-level test files [\python-kasa#1688](python-kasa#1688) (@ZeliardM) - tests: add type annotations to CLI, protocol, and smartcam tests [\python-kasa#1687](python-kasa#1687) (@ZeliardM) - tests: add type annotations to Smart tests [\python-kasa#1686](python-kasa#1686) (@ZeliardM) - tests: add type annotations to IoT tests [\python-kasa#1685](python-kasa#1685) (@ZeliardM) - tests: add type annotations to transport tests [\python-kasa#1684](python-kasa#1684) (@ZeliardM) - tests: centralize transport and session cleanup in conftest [\python-kasa#1683](python-kasa#1683) (@ZeliardM) - ci: pin all GitHub Actions to SHA hashes and update versions [\python-kasa#1681](python-kasa#1681) (@ZeliardM) - tests: fix typos, child device subtype, CLI patch path, and deprecation test logic [\python-kasa#1677](python-kasa#1677) (@ZeliardM) - Update GitHub Workflows and Actions [\python-kasa#1622](python-kasa#1622) (@ZeliardM) - Use log-level debug for smartdevice query error reporting [\python-kasa#1587](python-kasa#1587) (@rytilahti) - Use Device instead of SmartDevice where feasible [\python-kasa#1585](python-kasa#1585) (@ZeliardM) **Closed issues:** - Python 3.14 Support [\python-kasa#1597](python-kasa#1597) - HS300 Child State - Time Module Error [\python-kasa#1445](python-kasa#1445)
## [0.11.0.1](https://github.com/python-kasa/python-kasa/tree/0.11.0.1) (2026-10-04) [Full Changelog](python-kasa/python-kasa@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 [\python-kasa#1551](python-kasa#1551) - SslAesTransport: handshake again when a camera answers 401 to passthrough [\python-kasa#1771](python-kasa#1771) (@freeKC) - Add LastAlertDetection module for smartcam devices [\python-kasa#1762](python-kasa#1762) (@juherr) - Add KL420 to TPLINK\_KELVIN color temperature ranges [\python-kasa#1757](python-kasa#1757) (@Ikstar) - Do not authenticate with a credentials\_hash from a different transport [\python-kasa#1749](python-kasa#1749) (@nopoz) - Expose the light transition state change flag [\python-kasa#1745](python-kasa#1745) (@nopoz) - Add strip segment module for configurable light strip length [\python-kasa#1744](python-kasa#1744) (@nopoz) - Add KL400L5 color temperature range [\python-kasa#1719](python-kasa#1719) (@loganrosen) - Update smartcam credential handling and tests [\python-kasa#1664](python-kasa#1664) (@ZeliardM) - Add support for V2 Energy Monitoring for S515D [\python-kasa#1663](python-kasa#1663) (@ZeliardM) - Add selective room cleaning to vacuum clean module [\python-kasa#1660](python-kasa#1660) (@epg-pers) - New Wi-Fi handling for SMARTCAM devices [\python-kasa#1639](python-kasa#1639) (@ZeliardM) - Add support for tapo login\_version 3 in sslaestransport [\python-kasa#1638](python-kasa#1638) (@ZeliardM) - Add preset support for Tapo cameras [\python-kasa#1615](python-kasa#1615) (@mrwogu) - Add python 3.14 to supported versions [\python-kasa#1599](python-kasa#1599) (@rytilahti) - Add discovery port 20004 [\python-kasa#1595](python-kasa#1595) (@alams154) - Implement IOT Time Module Failover [\python-kasa#1583](python-kasa#1583) (@ZeliardM) - Add bare bones homekit module for iot devices [\python-kasa#1566](python-kasa#1566) (@ZeliardM) - Extend smartcam detection support [\python-kasa#1552](python-kasa#1552) (@gpongelli) **Fixed bugs:** - Time module unavailable for waterleak sensor [\python-kasa#1613](python-kasa#1613) - 'No time zone found with key EST' in debian 13 [\python-kasa#1579](python-kasa#1579) - Discovery: accept cameras that only send the encrypt\_type list [\python-kasa#1770](python-kasa#1770) (@freeKC) - Classify IOT devices via sysinfo regardless of transport \(fixes \python-kasa#1740\) [\python-kasa#1769](python-kasa#1769) (@bluntman001) - Fall back to UTC for iot time when the device clock is not set [\python-kasa#1768](python-kasa#1768) (@tk1475) - Add UNKNOWN\_USERNAME \(-60502\) camera error code [\python-kasa#1761](python-kasa#1761) (@juherr) - Disable multi requests on timeout during multi-request [\python-kasa#1759](python-kasa#1759) (@KaloyanNaumov) - Add ECDHE-RSA-AES256 cipher for newer Tapo firmware [\python-kasa#1755](python-kasa#1755) (@darylldelfin) - Map iot timezone index 18 to America/New\_York instead of EST [\python-kasa#1743](python-kasa#1743) (@monteccarlos) - fix: use KLAP v2 transport for IOT devices with login version 2 [\python-kasa#1731](python-kasa#1731) (@bm1549) - Add ENETUNREACH to non-retryable errors in XorTransport [\python-kasa#1668](python-kasa#1668) (@wh1t3f1r3) - Fix mop set\_waterlevel sending setCleanAttr without type field [\python-kasa#1667](python-kasa#1667) (@davidefiocco) - Fix SMARTCAM Time module and update tests [\python-kasa#1659](python-kasa#1659) (@ZeliardM) - Fix camera login version in CLI [\python-kasa#1658](python-kasa#1658) (@ZeliardM) - Allow SSL connections to older devices [\python-kasa#1654](python-kasa#1654) (@kad) - waterleaksensor: use parent's Time for alert timestamp [\python-kasa#1614](python-kasa#1614) (@rytilahti) - Add hold state to thermostatstate [\python-kasa#1609](python-kasa#1609) (@rytilahti) - Fix thermostat idle reporting on low battery [\python-kasa#1598](python-kasa#1598) (@rytilahti) - Add shutdown \(summer mode\) to thermostatstate [\python-kasa#1588](python-kasa#1588) (@rytilahti) - Fix iotstrip child device time handling [\python-kasa#1584](python-kasa#1584) (@ZeliardM) **Added support for devices:** - Add C200 device fixture [\python-kasa#1760](python-kasa#1760) (@juherr) - Add P125M fixture for firmware 1.4.4 [\python-kasa#1746](python-kasa#1746) (@HarryPehkonen) - Add fixtures for KH100, KE100 and KE110 and simulate TRV states [\python-kasa#1726](python-kasa#1726) (@Krotu) - Add L530EA\(EU\) device fixture [\python-kasa#1694](python-kasa#1694) (@ZeliardM) - Add C101 test fixture [\python-kasa#1673](python-kasa#1673) (@ijaron) - Add LB130\(US\) device fixture [\python-kasa#1669](python-kasa#1669) (@ZeliardM) - Add KL110B\(UN\) device fixture [\python-kasa#1657](python-kasa#1657) (@ZeliardM) - Add TS15\(US\) device fixture [\python-kasa#1649](python-kasa#1649) (@ZeliardM) - Add Tapo C460 support [\python-kasa#1645](python-kasa#1645) (@markvanpraet) - Add P105\(US\) device fixture [\python-kasa#1644](python-kasa#1644) (@ZeliardM) - Add L430C\(EU\) device fixture [\python-kasa#1643](python-kasa#1643) (@ZeliardM) - Add L430P\(EU\) device fixture [\python-kasa#1607](python-kasa#1607) (@LostLuma) - Add S500\(US\)\_1.0\_1.2.0 fixture [\python-kasa#1569](python-kasa#1569) (@ZeliardM) - Add device fixture for P316M\(US\) [\python-kasa#1568](python-kasa#1568) (@TheLinuxGuy) - Add L535E\(EU\) 3.0 1.1.8 fixture [\python-kasa#1545](python-kasa#1545) (@fantandrea) - Adding KL400L10\(US\)\_1.0\_1.0.10 fixture [\python-kasa#1539](python-kasa#1539) (@mjbohr) - Add TP10\(IT\) 1.0 1.2.5 fixture [\python-kasa#1538](python-kasa#1538) (@emanueleg) - Add LB100\(US\)\_1.0\_1.8.11 fixture file [\python-kasa#1515](python-kasa#1515) (@ZeliardM) - Add KS225\(US\)\_1.0\_1.1.1 and L930-5\(EU\)\_1.0\_1.2.5 [\python-kasa#1509](python-kasa#1509) (@ZeliardM) **Documentation updates:** - How to hash credentials to make use of --credentials-hash flag? [\python-kasa#1517](python-kasa#1517) - docs: modernize docstrings across the repository [\python-kasa#1682](python-kasa#1682) (@ZeliardM) - Add a note to emeter guide being kasa-only [\python-kasa#1512](python-kasa#1512) (@rytilahti) **Project maintenance:** - Fix PyPI publishing for packages with metadata 2.5 [\python-kasa#1779](python-kasa#1779) (@rytilahti) - tests: add type annotations to top-level test files [\python-kasa#1688](python-kasa#1688) (@ZeliardM) - tests: add type annotations to CLI, protocol, and smartcam tests [\python-kasa#1687](python-kasa#1687) (@ZeliardM) - tests: add type annotations to Smart tests [\python-kasa#1686](python-kasa#1686) (@ZeliardM) - tests: add type annotations to IoT tests [\python-kasa#1685](python-kasa#1685) (@ZeliardM) - tests: add type annotations to transport tests [\python-kasa#1684](python-kasa#1684) (@ZeliardM) - tests: centralize transport and session cleanup in conftest [\python-kasa#1683](python-kasa#1683) (@ZeliardM) - ci: pin all GitHub Actions to SHA hashes and update versions [\python-kasa#1681](python-kasa#1681) (@ZeliardM) - tests: fix typos, child device subtype, CLI patch path, and deprecation test logic [\python-kasa#1677](python-kasa#1677) (@ZeliardM) - Update GitHub Workflows and Actions [\python-kasa#1622](python-kasa#1622) (@ZeliardM) - Use log-level debug for smartdevice query error reporting [\python-kasa#1587](python-kasa#1587) (@rytilahti) - Use Device instead of SmartDevice where feasible [\python-kasa#1585](python-kasa#1585) (@ZeliardM) **Closed issues:** - Python 3.14 Support [\python-kasa#1597](python-kasa#1597) - HS300 Child State - Time Module Error [\python-kasa#1445](python-kasa#1445)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.