Closed alessiozanutta closed 5 months ago
Hi the first error with none - your environment value is not properly loaded.
for the second error try using ‘admin’ and your TP-Link cloud password.
Additionally your output dir value as well as host and date from os environ is probably wrong
Hardcode everything at first and when it works try with the os environment values etc to rule out mistakes
Thank you Juraj, I have already tried ADMIN as written above with no luck. What do you mean HARDCODE?
You are using actual values inside os.environ. Put them directly as a string.
Admin with TP-Link cloud password not rtsp password.
thank you for spotting this, however I'm having no luck in downloading correctly the recordings. Even if now I am able to connect to the camera with:
# mandatory
outputDir = "/Users/alessiozanutta/Documents/" # directory path where videos will be saved
date = "20240330" # date to download recordings for in format YYYYMMDD
host = "10.0.1.144" # change to camera IP
password_cloud = "cloud-password" # set to your cloud password
# optional
window_size = "50" # set to prefferred window size, affects download speed and stability, recommended: 50
print("Connecting to camera...")
tapo = Tapo(host, "admin", password_cloud, password_cloud)
NOTE-1: the error was using the camera-account password and not the tapo app password (namely the password of the account)
I am not able to download all the files in the SD card.
The ERROR-outcome is now:
could not convert string to float: b'N/A\n'
Warning: Could not calculate length from stream.
Server did not send a new chunk in 10.0 sec (sequence 5105, session 45), assuming the stream is over
Server did not send a new chunk in 10.0 sec (sequence 23088, session 46), assuming the stream is over
Giving up /Users/alessiozanutta/Documents/2024-03-31 14_04_38-2024-03-31 14_09_25.mp4...
do you know what could be the cause or where I can retrieve a log or something with more informations on the error?
Make sure you have ffmpeg dependencies installed
Thank you! all settled after having installed ffmpeg into the VENV used to run the script (previously I had installed ffmpeg only system-wide).
However sometimes I still got
could not convert string to float: b'N/A\n' Warning: Could not calculate length from stream.
on some files. How should I check to have ALL the ffmpeg dependencies installed? is there a list of packages that I should force to install?
You need ffmpeg and ffprobe.
checked an it's all fine with the dependencies. still...
Connecting to camera...
Getting recordings...
could not convert string to float: b'N/A\n'
Warning: Could not calculate length from stream.
could not convert string to float: b'N/A\n'
Warning: Could not calculate length from stream.
Downloading /Volumes/SMB_some-video-recordings/20240331/2024-03-31 14_02_13-2024-03-31 14_03_49.mp4...
could not convert string to float: b'N/A\n'
Warning: Could not calculate length from stream.
I am writing to seek assistance with pytapo since I've encountered an issue while trying to connect my Tapo C220 camera to my MacBook to download the saved recordings through DownloadRecordings.py. I am facing an error when attempting to execute the code in PyCHARM with the installed pytapo 3.3.19 package. The error message is as follows:
I have tried using both my username and "admin" as credentials, as you have suggested in the README. Additionally, I have set the following environment variables in the DownloadRecordings.py file:
Despite these settings, the error persists and, also attempting to run the simpler:
returns an error on both username conditions (admin or myusername):
Could you please guide me on what might be going wrong? Any help you can provide would be greatly appreciated.
NOTE: in Frigate I am able to get videos using the following:
Thank you for your time and assistance.