pyaarlo icon indicating copy to clipboard operation
pyaarlo copied to clipboard

Unable to retrieve videos

Open ajcooper72 opened this issue 4 years ago • 3 comments

I'm attempting to get the last videos from each camera and I'm unable to get the API to list what is available. There are no errors reported just no videos returned even though there are some available on the camera.

print("captured {}".format(camera.unseen_videos))
print("captured today {}".format(camera.captured_today))`
for video in camera.last_n_videos(5):
    print("url {} ".format(video.video_url))

For one of my cameras, the unseen_videos is correctly reporting 102. I have manually captured a video today but captured_today is reporting zero, and last_n_videos is None.

Can you advise if there is any additional debug I need to add to see whats going on? I have verbose_debug set to True.

ajcooper72 avatar May 09 '20 09:05 ajcooper72

I'll take a look. Sorry for the delay, real life has been getting in the way!

twrecked avatar May 20 '20 04:05 twrecked

It's a startup/timing issue. The startup returns before everything is ready. I will fix this.

You can work around this for now by adding a time.sleep(30) before your camera code. Horrible, I know, but I will fix the real issue.

twrecked avatar May 20 '20 05:05 twrecked

Thanks for the response, as you've fixed the corresponding bug in the Home Assistant version I've shifted over to that (which is where I wanted to be anyway!). I will test your suggestion however when I get to my PC. Thanks for looking into it.

ajcooper72 avatar May 20 '20 08:05 ajcooper72