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

Successfully downloaded C420 camera recordings. #57

Open
GracefulTabby opened this issue Jun 2, 2023 · 0 comments
Open

Successfully downloaded C420 camera recordings. #57

GracefulTabby opened this issue Jun 2, 2023 · 0 comments

Comments

@GracefulTabby
Copy link

GracefulTabby commented Jun 2, 2023

I have successfully downloaded the video recorded by the C420 via the H200 Hub.
Unfortunately, I could not achieve this with the current code as it is, and a few modifications were necessary.

Here is the code I modified.

https://github.com/GracefulTabby/pytapo
GracefulTabby@e144ae8
https://github.com/GracefulTabby/pytapo/blob/main/experiments/DownloadRecordingsViaHub.py

I am not good at writing clean code like you guys.
If possible, can someone create a pull request as a good code?

Of course, it can be used as is. I have successfully backed up my camera with this code.
I was able to work with the latest firmware.
C420 : V1.27 Build 20230426 rel.34233
H200 : 1.2.18 Build 20230510 rel.65350

I have tried the following and got to this point.
I put a proxy (mitmproxy) between the iPhone and the H200 and monitored between port 443 and port 8800.

Basically, everything is communicated through the Hub, specifying the ChildID to the Hub.
To get a list of recorded videos, the C420 seemed to use searchVideoWithUTC and searchDetectionList while other cameras seemed to use searchVideoOfDay.
I have made sure to use getRecordingsUTC when C420 is used for the camera.
Also, when retrieving the stream, it seems necessary to give a query parameter instead of a POST parameter.
Something called PlayerID also needs to be included in the query parameter or header, but this was a constant value when communicating between the iPhone and H200.
It is probably the UUID assigned to the Tapo account.
For some reason, this PlayerID also worked with a randomly generated UUID. There does not appear to be any particular check.

This is as far as I was able to go with my capabilities.

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

1 participant