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 — Keep multi requests for smartcam devices after a timeout by hugaraujo · Pull Request #1802 · python-kasa/python-kasa Conversation
Contributor
Fixes #1801. ProblemSince 0.11.0, a So a single network blip leaves the device object stuck forever. On four Tapo C100 (fw 1.5.7) in Home Assistant 2026.10.1 this meant ~30 logins/min per camera until they locked the account out ( FixA class attribute Testing
🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsA timeout during a batched request switched the protocol to batch size 1 permanently. SmartCamProtocol then sends SMART-style single requests, which cameras reject with PROTOCOL_FORMAT_ERROR (-40210); every rejection forces a new handshake, so a single Wi-Fi blip left C100 cameras re-authenticating ~30 times a minute until they locked the account out (-40404). Only fall back to single requests on protocols that support them. Fixes python-kasa#1801 Co-Authored-By: Claude Opus 5.5 <[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 #1802 +/- ## ======================================= Coverage 93.43% 93.43% ======================================= Files 159 159 Lines 10116 10120 +4 Branches 1044 1045 +1 ======================================= + Hits 9452 9456 +4 Misses 471 471 Partials 193 193 ☔ 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.
There was an error while loading. Please reload this page.
|
Confirmed on a second model. On a Tapo C510W (fw 1.3.4, AES login) with master at That is exactly the picture in home-assistant/core#186172: one of the two attached diagnostics has all 13 queries at |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hugaraujo! I did not yet test this on my test camera, but given the other reports this should be fine.
I will merge it in hopes more people can test it, and try to reproduce and test against my cam before doing a release later this week.
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.12.0](https://github.com/python-kasa/python-kasa/tree/0.12.0) (2026-10-25) This release include several compatibility fixes (updated accepted SSL ciphers, removal of Homekit from the default update cycle). The new API `Device.supports_module()` provide a way to find out if the device supports some specific module, e.g., HomeKit, without including it in the default update cycle. [Full Changelog](0.11.0.1...0.12.0) **Fixed bugs:** - Keep hub children when the child component list is missing [\#1797](#1797) (@Richardtristan) - Strip multi-word rich tags when rich is not installed [\#1807](#1807) (@wolfgang-aura) - Add Device.supports_module() and stop querying HomeKit for iot devices [\#1808](#1808) (@rytilahti) - Keep multi requests for smartcam devices after a timeout [\#1802](#1802) (@hugaraujo) - Consolidate SSL ciphers and use them in SslTransport [\#1798](#1798) (@rytilahti) - Raise UnsupportedDeviceError instead of crashing on unknown device types [\#1781](#1781) (@GhostCoder6969) **Added support for devices:** - Add TD21(EU) device fixture [\#1786](#1786) (@Smugaski) - Add P116M(IN) fixture [\#1795](#1795) (@Partha-dev01) **Project maintenance:** - Add Python 3.15 to supported versions and update pins [\#1793](#1793) (@rytilahti) - Generate the changelog with git-cliff and draft releases in CI [\#1809](#1809) (@rytilahti) - Build and check packages in CI and publish workflows [\#1782](#1782) (@rytilahti) **Other changes:** - Use the real discovery reply in the TD21 fixture [\#1800](#1800) (@Smugaski)
…#1802) Smartcam devices do not support sending individual requests, but respond always with `PROTOCOL_FORMAT_ERROR (-40210)`. This commit forces them to always use the multi-request format for requests even after receiving an error where we would otherwise fallback to individual requests.
## [0.12.0](https://github.com/python-kasa/python-kasa/tree/0.12.0) (2026-10-25) This release include several compatibility fixes (updated accepted SSL ciphers, removal of Homekit from the default update cycle). The new API `Device.supports_module()` provide a way to find out if the device supports some specific module, e.g., HomeKit, without including it in the default update cycle. [Full Changelog](python-kasa/python-kasa@0.11.0.1...0.12.0) **Fixed bugs:** - Keep hub children when the child component list is missing [\python-kasa#1797](python-kasa#1797) (@Richardtristan) - Strip multi-word rich tags when rich is not installed [\python-kasa#1807](python-kasa#1807) (@wolfgang-aura) - Add Device.supports_module() and stop querying HomeKit for iot devices [\python-kasa#1808](python-kasa#1808) (@rytilahti) - Keep multi requests for smartcam devices after a timeout [\python-kasa#1802](python-kasa#1802) (@hugaraujo) - Consolidate SSL ciphers and use them in SslTransport [\python-kasa#1798](python-kasa#1798) (@rytilahti) - Raise UnsupportedDeviceError instead of crashing on unknown device types [\python-kasa#1781](python-kasa#1781) (@GhostCoder6969) **Added support for devices:** - Add TD21(EU) device fixture [\python-kasa#1786](python-kasa#1786) (@Smugaski) - Add P116M(IN) fixture [\python-kasa#1795](python-kasa#1795) (@Partha-dev01) **Project maintenance:** - Add Python 3.15 to supported versions and update pins [\python-kasa#1793](python-kasa#1793) (@rytilahti) - Generate the changelog with git-cliff and draft releases in CI [\python-kasa#1809](python-kasa#1809) (@rytilahti) - Build and check packages in CI and publish workflows [\python-kasa#1782](python-kasa#1782) (@rytilahti) **Other changes:** - Use the real discovery reply in the TD21 fixture [\python-kasa#1800](python-kasa#1800) (@Smugaski)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
C100: one network timeout permanently disables multi-requests (0.11.0.1), single requests get -40210 → endless re-handshakes → lockout
There was an error while loading. Please reload this page.