This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -80,6 +80,12 @@ You can also execute the script against a network by using `--target`: `python -
The script will run queries against the device, and prompt at the end if you want to save the results.
If you choose to do so, it will save the fixture files directly in their correct place to make it easy to create a pull request.
```{note}
Some Tapo hubs (notably H500) report paired children in ``getDeviceInfo.child_num`` but
return an empty ``getChildDeviceList`` over LAN. ``dump_devinfo`` will save a
hub-only fixture in that case — see {ref}`Tapo / Kasa hubs and child devices <topics-hub-children>`.
```
```{note}
When adding new fixture files, you should run `pre-commit run -a` to re-generate the list of supported devices.
You may need to adjust `device_fixtures.py` to add a new model into the correct device categories. Verify that test pass by executing `uv run pytest kasa`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The library builds {attr}`~kasa.Device.children` **only** from
{code}`getChildDeviceList.child_device_list`. Each entry must include at least a
{code}`device_id` and {code}`category` so python-kasa can construct the correct
child device class and route hub-proxied requests.
Pairing new devices uses a different API surface ({code}`startScanChildDevice`,
{code}`getScanChildDeviceList`, {code}`addScanChildDeviceList`) via the
{mod}`~kasa.smartcam.modules.childsetup` module. That path is for **adding**
devices, not listing ones that are already paired.
## `child_num` vs `getChildDeviceList`
These fields answer different questions and **must not be treated as equivalent**.
| Field | Source | Meaning |
|-------|--------|---------|
| {code}`child_num` | {code}`getDeviceInfo` → {code}`basic_info` | Metadata: how many children the hub believes are paired (often cloud/account state) |
| {code}`sum` / {code}`child_device_list` | {code}`getChildDeviceList` | Enumeration: which children are exposed to this LAN session right now |
On some hubs (notably **H500** with current firmware), live testing shows:
- {code}`child_num` may be greater than zero (for example {code}`6`)
- {code}`getChildDeviceList` returns {code}`sum: 0` and an empty or omitted
{code}`child_device_list`
In that case {attr}`~kasa.Device.children` is empty after {meth}`~kasa.Device.update()`
even though the Tapo app shows paired cameras. This is **hub firmware behaviour**,
not a python-kasa parsing bug. The library logs a warning when it detects the
mismatch.
Other hub models can show the opposite pattern. For example the **H200** fixture
in the test suite has {code}`child_num: 0` while {code}`getChildDeviceList.sum` is
{code}`5` with five list entries. Do not use {code}`child_num` as a substitute for
the list API on any model.
## No LAN "reason code"
There is currently **no documented LAN method** that explains *why*
{code}`getChildDeviceList` is empty while {code}`child_num` is non-zero. Probing
has not found an alternate roster API: category-filtered
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
H500 hub fixture #1718
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
H500 hub fixture #1718
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.