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 — Add TD21(EU) device fixture by Smugaski · Pull Request #1786 · python-kasa/python-kasa Conversation
Contributor
Add TD21(EU) device fixtureAdds a device fixture for the Tapo TD21 doorbell, hardware 2.0 (EU), firmware 1.1.5 Build 260423 Rel.6435n. Changes
No library code changes were needed. The device connects over the existing smartcam protocol ( Notes
Testing
Not includedThe device also reports
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
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 #1786 +/- ## ========================================== + Coverage 93.41% 93.43% +0.02% ========================================== Files 159 159 Lines 10113 10116 +3 Branches 1043 1044 +1 ========================================== + Hits 9447 9452 +5 + Misses 472 471 -1 + Partials 194 193 -1 ☔ 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 a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Smugaski, I saw that you mention that the discovery information is prepared manually, this is good to know!
I think this is good to go, but we should figure out a way to mark such manually maintained items to let the readers know that it is not a real device response. I will think on it a bit before merging, but if you have an idea, please feel free to let me know and/or adjust the fixture file.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The TD21 does not answer UDP discovery, so the discovery_result block is not a real device response. Add a _comment key next to error_code and result so readers can tell. The key sits outside the result dict that is parsed into the discovery model, and the fixture round-trip and discovery tests still pass.
|
Thanks for taking a look!
I'm happy to do either, or something different if you have a convention in mind. I didn't want to invent one in a fixture-only PR. Please let me know which you'd prefer, or if you have any other ideas in mind. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Having a |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Pushed the _comment to the PR. For reference, I put it directly inside discovery_result so it stays clear of the result dict that gets parsed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The CLI prints through rich, which wraps at 80 columns when output is not a terminal. The long comment wrapped and broke the exact-match comparison in test_discover_raw. Keep the comment short enough to stay on one line.
|
Pushed a small follow-up: the first _comment was too long and failed test_discover_raw in CI. kasa discover raw prints through rich, which wraps at 80 columns when output isn't a terminal, and the test compares the output exactly. I shortened it to "Manually created, not a real device response." (the line is 64 columns). Worth knowing for the other manually built fixtures: the whole printed line, including indentation, has to stay under 80 columns, so a short generic comment works best. |
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)
Adds a device fixture for the **Tapo TD21** doorbell, hardware 2.0 (EU), firmware 1.1.5 Build 260423 Rel.6435n. The fixture's `discovery_result` block is **hand-written**, not captured. --------- Co-authored-by: Smugaski <[email protected]>
## [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.
There was an error while loading. Please reload this page.