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 Device.supports_module() and stop querying HomeKit for iot devices by rytilahti · Pull Request #1808 · python-kasa/python-kasa Conversation
Member
Some legacy iot firmware stops responding when an unsupported module follows This stops querying HomeKit in
This replaces #1792, which sends the HomeKit query separately on every update. The same separate query is now done at most once, and only when a downstream asks for it.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Some legacy iot firmware stops responding when an unsupported module follows `system` in a request, which made every update time out after the HomeKit query was added (python-kasa#1791, python-kasa#1788). HomeKit is no longer queried by update(). `Device.supports_module()` checks whether the device supports a module, optional modules like HomeKit are queried on their own and the answer is remembered.
|
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 #1808 +/- ## ======================================= Coverage 93.43% 93.44% ======================================= Files 160 160 Lines 10095 10110 +15 Branches 1042 1044 +2 ======================================= + Hits 9432 9447 +15 Misses 471 471 Partials 192 192 ☔ 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.
|
@ZeliardM let me know what you think about this approach to fix the issue with some firmwares being cranky about the homekit query. It would be great to get this in to the next release, while still allowing you to check for the homekit support :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Cover the real-device unsupported answer, errors other than a timeout, modules of the device for all device types, and HomeKit.info without data.
|
@rytilahti I'm testing it now, should be good but just want to make sure. |
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.
LGTM! This will work great for how I need to check device module availability. Thanks!
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)
python-kasa#1808) Some legacy iot firmware stops responding when an unsupported module follows `system` in a request, which made every update time out once the HomeKit query was added. This stops querying HomeKit in `update()` for IOT devices and adds `Device.supports_module()` API to allow checking if some module is supported by the device.
## [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.
IoT HomeKit query ordering causes update timeouts for legacy devices in 0.11.0.1 HS110(UK) v4.1 beta firmware times out with the HomeKit probe in 0.11.0.1
There was an error while loading. Please reload this page.