Skip to content
New issue

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

get_child_device_list() capped at 10 devices? #322

Open
nathanja opened this issue Dec 13, 2024 · 2 comments
Open

get_child_device_list() capped at 10 devices? #322

nathanja opened this issue Dec 13, 2024 · 2 comments

Comments

@nathanja
Copy link

I recently expanded the number of tapo devices I have connected to my hub to 12, and now note that even though my new devices are showing up, two of my older devices are no longer visible in the data returned from my H100 hub.

What is interesting is that hub.get_child_device_list_json() has a returned parameter "sum" which is 12, but the object only includes 10 devices.

I can confirm that the sensors are online and working correctly (one motion sensor T100, one temperature sensor T315).

Coincidence? Or something more fundamental?

@mihai-dinculescu
Copy link
Owner

Congratulations on having a substantial number of child devices. You are the first user of this library to encounter (or at least report) this issue.

Upon closer examination of the decompiled Tapo app, I noticed that the get_child_device_list method includes a start_index parameter. This likely indicates that the request is paginated.

The implementation will need to be updated to accommodate this. I believe it would be best to internalize a mechanism for fetching subsequent pages, so the caller doesn't have to manage this themselves.

@mihai-dinculescu mihai-dinculescu added help wanted Extra attention is needed good first issue Good for newcomers labels Dec 13, 2024
mihai-dinculescu added a commit that referenced this issue Dec 17, 2024
@mihai-dinculescu mihai-dinculescu removed help wanted Extra attention is needed good first issue Good for newcomers labels Dec 17, 2024
@mihai-dinculescu
Copy link
Owner

This has been implemented on main. Could you try it out and let me know how it works for you? I've only got 7 devices :)

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

No branches or pull requests

2 participants