Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

PyAlro login issue #114

Open
itskvad opened this issue Mar 21, 2020 · 20 comments
Open

PyAlro login issue #114

itskvad opened this issue Mar 21, 2020 · 20 comments

Comments

@itskvad
Copy link

itskvad commented Mar 21, 2020

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.

@thejeffreystone
Copy link

Seeing this issue as well.

@mberry73
Copy link

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

@yoooou
Copy link
Contributor

yoooou commented Mar 21, 2020

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.

@Zaschii
Copy link

Zaschii commented Mar 21, 2020

same here

@vzlgdu
Copy link

vzlgdu commented Mar 22, 2020

Same for me... Help please...

@yoooou
Copy link
Contributor

yoooou commented Mar 22, 2020

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

@vzlgdu
Copy link

vzlgdu commented Mar 22, 2020

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

@yoooou
Copy link
Contributor

yoooou commented Mar 22, 2020

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.

@Zaschii
Copy link

Zaschii commented Mar 22, 2020

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.

@jwillaz
Copy link
Collaborator

jwillaz commented Mar 23, 2020

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

@mberry73
Copy link

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. :-)

@vzlgdu
Copy link

vzlgdu commented Mar 23, 2020

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

@jwillaz
Copy link
Collaborator

jwillaz commented Mar 23, 2020

@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

@vzlgdu
Copy link

vzlgdu commented Mar 23, 2020 via email

@itskvad
Copy link
Author

itskvad commented Mar 27, 2020

Using https://github.com/twrecked/pyaarlo/ now.

@madhatter007
Copy link

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

@itskvad
Copy link
Author

itskvad commented Mar 29, 2020

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

@madhatter007
Copy link

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?

@fermulator
Copy link

fermulator commented Aug 23, 2020

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

@zuyezheng
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants