tchellomello/python-arlo

PyAlro login issue

Opened this issue · 20 comments

Hi,

I have PyArlo run every 30 mins to check my Arlo base station using AzureDevOps pipelines.

Running PyArlo('username', 'passwordhere') is now giving the following error:

PyArlo('username', 'passwordhere')
Traceback (most recent call last):
File "", line 1, in
File "C:\Python38\lib\site-packages\pyarlo_init_.py", line 50, in init
self.ArloMediaLibrary = ArloMediaLibrary(self,
File "C:\Python38\lib\site-packages\pyarlo\media.py", line 29, in init
self.videos = self.load(days)
File "C:\Python38\lib\site-packages\pyarlo\media.py", line 56, in load
data = self._session.query(url,
AttributeError: 'NoneType' object has no attribute 'get'

This error is also occurring manually on execution.

Can you advise on how I can assist with getting this resolved?
Thanks.

Seeing this issue as well.

Seeing the same issue. Seems Arlo has changed the api :-(

I'm having the same problem.
In my case this query to "arlo.netgear.com/hmsweb/users/library" failed due to 401. But even before that, _authenticate() already failed silently where the query to "arlo.netgear.com/hmsweb/login/v2" failed due to 403.

same here

Same for me... Help please...

I have a PR #115 which works for me. My tests are very limited though. Thanks @thejeffreystone for the pointer.

Sorry, but I don't understand what is the solution that works for you! Please can you explain better?
Thanks

I don't really know what happened under the hood. I'm just following what this PR did. I guess we need to use a new authentication mechanism to login now so some code changes to API endpoints and requests/responses are required - see the PR for details.

yes its working with the new authentication mechanism.
it seems that its a little bit slower, but thats not a problem for me... thank you very much.
Just changed the 2 files const.py and __init__py.

Not to take away from the great work that has been done within this repo (I've even made small contributions once upon a time), but it has not been actively supported for a while and I keep seeing the notifications for issues and feature requests. I just wanted to share that there are other repos that are currently active and adjusting to these changes. Twrecked is managing this repo, along with plugin repos for Home Assistant, and they work very well: https://github.com/twrecked/pyaarlo

Thanks for fixing it guys. Will give it a try asap.
jwillaz, I had a short look into pyaarlo. A little documentation would certainly help to get people interested i guess. :-)

Hi, sorry, but I don't understand what are you done to fix this; I've uninstalled and reinstalled pyarlo, but the problem is the same. Please could you explain me step by step what should I do to solve? Thanks

@mberry73 you'll be able to find examples of leveraging the base package through the Home Assistant component, which has a lot of documentation, tips, and observations about the API: https://github.com/twrecked/hass-aarlo

So this works? Is the install the same for a Hassio version of HA?

Not quite sure what you mean. I'm just using the python module with my own scripts.

pip install git+https://github.com/twrecked/pyaarlo
import pyaarlo

Being non-technical, I followed the below getting setup at install.
https://www.home-assistant.io/integrations/arlo/

So can drop this update above on my HA install, config, and should be good getting Arlo going again?

#115 LGTM and I verified it fixes the issue -- can we just merge that in?

Seems like the issue is that the login API is now blocking requests where user agent is python-requests or more specifically ('User-Agent', 'python-requests/2.24.0') which is the default. The 1 line fix is to add something like:

headers['User-Agent'] = 'foobar'

right before this line.