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

Possible to download videos from base station storage? #86

Open
phene opened this issue Jan 18, 2022 · 10 comments
Open

Possible to download videos from base station storage? #86

phene opened this issue Jan 18, 2022 · 10 comments

Comments

@phene
Copy link
Contributor

phene commented Jan 18, 2022

Is it possible to download video files saved to the base station using this library?

@Jeff-Rand
Copy link

I can use this library to do a lot of things with my Arlo cameras, but unfortunately, it doesn't seem to have any functions to download the videos stored on the base station. Another user came up with a proof of concept here: https://github.com/jesserockz/python-arlo-ratls-poc
It was apparently written before the change to using 2FA security, so I haven't been able to make it work. I've tried to incorporate it into this library on my own but haven't been successful due to my lack of python knowledge.

As a workaround, I bought a WIFI storage card and use it in my base station. I've written a program that polls the SD card for new files and downloads them to my webserver. It is quite a kludge. This is not ideal but at least I can view the videos.

@phene
Copy link
Contributor Author

phene commented Jan 18, 2022

Thanks for the lead! I bet I can get that working with this library.

@twrecked
Copy link
Owner

Let me know how this goes. I want to get this integrated into Pyarlo - or made a requirement so I can hook into it - I've just been busy elsewhere for the last few weeks.

@phene
Copy link
Contributor Author

phene commented Jan 21, 2022

I actually got this working to the point of automatically downloading videos from my base station, but I suspect there's some refactoring that needs to be done to better fit with the existing code base. I'll try to clean it up a bit this weekend and submit a PR.

Through this I learned that not all of my recordings are being uploaded to the cloud...

@Jeff-Rand
Copy link

Sounds awesome, I would love to get rid of my external WiFi solution. And you are correct about some recordings not uploading to the cloud. I had the same issue and decided to get the recordings straight from the base station and eliminate the need to pay for the cloud. I've been running without a cloud subscription for a year now.

@Jeff-Rand
Copy link

I just had a chance to try phene's support-ratls branch, but I'm getting ModuleNotFoundError: No module named 'cryptography'

Could someone point me to where I can find the cryptography module on GitHub? Sorry, I'm a total newb.

@phene
Copy link
Contributor Author

phene commented Jan 27, 2022

I just added it to the requirements.txt -- sorry about that!

https://pypi.org/project/cryptography/

@Jeff-Rand
Copy link

Thanks! I have cryptography installed now and I tried your example. I get the messages:
Connecting to base station Arlo Base: A283087RA0E9F
Downloading media from Arlo Base...
request-error=URLError

followed by a long error message ending in:
line 321, in _fetch_library
if "data" in data:
TypeError: argument of type 'NoneType' is not iterable

@phene
Copy link
Contributor Author

phene commented Jan 27, 2022

@Jeff-Rand are there any days in which you don't have videos within the library_days period? I've pushed a fix for that specific error, but I'm concerned about the details of that URLError.

Consider adding self._arlo.warning(f"Downloading {self.video_url} to {filename}...") to the top of both download_video methods in media.py. I wonder if you have non-2k videos on your base station, which is causing it to load the wrong object. If you can send me some some of the output, I could probably mitigate it.

Also, can we move this discussion to the PR?

@phene
Copy link
Contributor Author

phene commented Jan 27, 2022

@Jeff-Rand I've updated the branch to support non-2k videos on the base station.

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

3 participants