Skip to content

H500 hub fixture#1718

Open
jimboca wants to merge 8 commits into
python-kasa:masterfrom
jimboca:H500Hub
Open

H500 hub fixture#1718
jimboca wants to merge 8 commits into
python-kasa:masterfrom
jimboca:H500Hub

Conversation

@jimboca

@jimboca jimboca commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

I've added the H500 fixture and confirmed all tests pass.

I have cameras added to the hub and it reports it has children, but doesn't actually list the children. I can't figure out if there is another way to get that information. Let me know if you have any suggestions.

jimboca and others added 4 commits July 8, 2026 09:18
Explain that getDeviceInfo.child_num can disagree with an empty
getChildDeviceList over LAN, add Read the Docs hub guide, warn in
dump_devinfo and SmartCamDevice when that happens, and ship an H500
hub-only fixture with matching test/fake-protocol guards.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore getConnectionType and getFirmwareAutoUpgradeConfig from a
successful dump_devinfo run so H500 parametrized tests pass. Handle
wedged-hub dumps with no successful probes, and tolerate H500 list
responses that omit child list fields.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes pre-commit ruff-format failure on PR python-kasa#1718.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pretty-format the H500 smartcam fixture JSON and regenerate
README.md and SUPPORTED.md for the new hub entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.24%. Comparing base (88e1c27) to head (c81a2a8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1718      +/-   ##
==========================================
+ Coverage   93.21%   93.24%   +0.02%     
==========================================
  Files         157      157              
  Lines        9819     9838      +19     
  Branches     1005     1011       +6     
==========================================
+ Hits         9153     9173      +20     
  Misses        472      472              
+ Partials      194      193       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jimboca and others added 3 commits July 8, 2026 10:39
Cover warning paths in smartprotocol, smartdevice, and smartcamdevice
so codecov patch checks pass for PR python-kasa#1718.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes ruff-format pre-commit failure on PR python-kasa#1718.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cast malformed hub response dicts passed to _create_delete_children so
pre-commit mypy passes on PR python-kasa#1718.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimboca jimboca mentioned this pull request Jul 8, 2026
@jimboca

jimboca commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Update on H500 child enumeration (live hub, FW 1.3.18)
I probed alternate ways to get the paired camera list from the hub. Short version: no LAN hub API on H500 1.3.18 returns the roster, even though getDeviceInfo reports child_num=6 and the Tapo app shows all 6 cameras.
LAN APIs tested (all empty or unsupported on H500 1.3.18):

  • getChildDeviceList / getChildDeviceComponentListsum=0, no list field (same after factory reset + re-pair)
  • getGeneralDeviceListUNSUPPORTED_METHOD (this exists on H200 FW 1.6.x+ per pytapo #194, but not on H500 yet)
  • getScanChildDeviceList → empty (pairing scan, not roster)
  • generalCameraManage, tssDeviceManage, hubPlayback, etc. → UNSUPPORTED_METHOD
  • admin vs email username → both auth OK; same empty child list
    What does work:
  1. Tapo Cloud getDeviceList — returns all 6 cameras with full deviceId and MAC (matches child_num=6). This is likely what the Tapo app uses for the roster.
  2. Direct LAN IP per camera when on user WiFi (e.g. CamInGarage @ 192.168.1.118 connects fine via python-kasa; hub @ .150 still shows children=0).
  3. controlChild through the hub — works if you already have a child deviceId (from cloud or app); it doesn't help with discovery.
    Cloud passthrough of getChildDeviceList to the hub failed (error -20571), so cloud can't proxy the local hub roster API — but getDeviceList already has the camera list.
    Conclusion: This looks like an H500 firmware limitation (or missing feature), not a python-kasa parsing bug. The PR's defensive handling + warnings are the right approach for now. A future hub FW update may add getGeneralDeviceList (as H200 got in 1.6.x). Until then, integrations needing the camera roster should use cloud getDeviceList or direct camera IPs rather than hub LAN enumeration.
    Related: #1578

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant