Giter Club home page Giter Club logo

Comments (19)

Brey86 avatar Brey86 commented on June 16, 2024 1

This is the output of:

print(self.arlo.request.session.headers.get('Authorization'))

2_ofCKwDvvbStdq3tgyA................................................................................

For security reasons I censured a part of string was printed.

from arlo.

jeffreydwalter avatar jeffreydwalter commented on June 16, 2024

Uninstall sseclient-py==1.7.2

from arlo.

Brey86 avatar Brey86 commented on June 16, 2024

I have uninstalled sseclient-py

 pip uninstall sseclient-py
Found existing installation: sseclient-py 1.7.2
Uninstalling sseclient-py-1.7.2:
  Would remove:
    /usr/lib/python3.8/site-packages/sseclient/*
    /usr/lib/python3.8/site-packages/sseclient_py-1.7.2.dist-info/*
Proceed (Y/n)? Y
  Successfully uninstalled sseclient-py-1.7.2

But I have the same output:

 arlo = Arlo(USERNAME_arlo, PASSWORD_arlo)
  File "/usr/lib/python3.8/site-packages/arlo.py", line 71, in __init__
    self.Login(username, password)
  File "/usr/lib/python3.8/site-packages/arlo.py", line 144, in Login
    self.request.options(f'https://{self.AUTH_URL}/api/auth', headers=headers)
  File "/usr/lib/python3.8/site-packages/request.py", line 83, in options
    return self._request(url, 'OPTIONS', headers=headers, raw=raw)
  File "/usr/lib/python3.8/site-packages/request.py", line 59, in _request
    r.raise_for_status()
  File "/usr/lib/python3.8/site-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://ocapi-app.arlo.com/api/auth

if I try to access the URL directly (https://ocapi-app.arlo.com/api/auth)
It shows me an error 1020. (Access Denied)

from arlo.

jeffreydwalter avatar jeffreydwalter commented on June 16, 2024

@Brey86 try now with the latest release.

from arlo.

Brey86 avatar Brey86 commented on June 16, 2024

Thanks for the new version.

I have upgraded my version and now I can login, but I can't disarm de alarm.

This is mi simple code:

arlo = Arlo(USERNAME_arlo, PASSWORD_arlo)
basestations = arlo.GetDevices('basestation')
arlo.Disarm(basestations[0])

This code was working fine until Friday. Now, with the new version, when I call the Disarm function the program crashes:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/eventstream.py", line 75, in Start
    event_stream = sseclient.SSEClient('https://myapi.arlo.com/hmsweb/client/subscribe?token='+self.arlo.request.session.headers.get('Authorization').decode(), session=self.arlo.request.session)
AttributeError: 'str' object has no attribute 'decode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "AlarmaOFF.py", line 49, in <module>
    arlo.Disarm(basestations[0])
  File "/usr/lib/python3.8/site-packages/arlo.py", line 569, in Disarm
    return self.CustomMode(device, "mode0")
  File "/usr/lib/python3.8/site-packages/arlo.py", line 561, in CustomMode
    return self.NotifyAndGetResponse(device, {"from":self.user_id+"_web", "to": device.get("parentId"), "action":"set","resource":"modes", "transId": self.genTransId(),"publishResponse":True,"properties":{"active":mode}})
  File "/usr/lib/python3.8/site-packages/arlo.py", line 407, in NotifyAndGetResponse
    self.Subscribe(basestation)
  File "/usr/lib/python3.8/site-packages/arlo.py", line 340, in Subscribe
    self.event_stream.Start()
  File "/usr/lib/python3.8/site-packages/eventstream.py", line 80, in Start
    raise Exception('Failed to start eventstream thread: {0}'.format(e))
Exception: Failed to start eventstream thread: 'str' object has no attribute 'decode'
Exception ignored in: <function EventStream.__del__ at 0x7fd6091b0ca0>
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/eventstream.py", line 42, in __del__
  File "/usr/lib/python3.8/site-packages/eventstream.py", line 90, in Disconnect
  File "/usr/lib/python3.8/site-packages/eventstream.py", line 110, in Unregister
AttributeError: 'EventStream' object has no attribute 'event_stream_thread'

from arlo.

jeffreydwalter avatar jeffreydwalter commented on June 16, 2024

Unfortunately, I no longer have any Arlo devices to debug with... Can you clone this repository and run add this line print(self.arlo.request.session.headers.get('Authorization')) at eventstream.py on line 75 just above event_stream = sseclient.SSEClient('https://myapi.arlo.com/hmsweb/client/subscribe?token='+self.arlo.request.session.headers.get('Authorization').decode(), session=self. arlo.request.session)?

from arlo.

jeffreydwalter avatar jeffreydwalter commented on June 16, 2024

Seems like the auth header is either empty or already a string.

from arlo.

jeffreydwalter avatar jeffreydwalter commented on June 16, 2024

It actually looks like they Arlo devs moved away from EventStream to mqtt. If I'm reading that correctly, that's going to take a considerable amount of work to rewrite. 😢
image

from arlo.

LenShustek avatar LenShustek commented on June 16, 2024

This is somewhat off-topic, but it might be helpful to some:
After using Jeffrey's wonderful library for six years (since 2016), it all came to an end when Arlo finally forced 2FA on me.
Since my application is simple -- arming and disarming my cameras from a Raspberry Pi based on a contact closure from our ancient security systems -- I switched to using IFTTT (https://ifttt.com). They have an officially-sanctioned link to Arlo as a third-party service, so arming/disarming is simple: just send an HTTPS post request to IFTTT. But they have only a few other functions available (lights on/off, start recording, and sound siren), so it won't work for more sophisticated applications.

from arlo.

cgmckeever avatar cgmckeever commented on June 16, 2024

2FA is accounted for in the latest version .. much notes about it
https://github.com/jeffreydwalter/arlo#now-supports-mfa
#183

from arlo.

LenShustek avatar LenShustek commented on June 16, 2024

I know, I had seen that. But using IFTTT is (a) much less complicated, (b) lightening-fast, and (c) doesn't involve gmail, which I'm not a fan of.
Not for everyone, I know...

from arlo.

sceniclife avatar sceniclife commented on June 16, 2024

(c) doesn't involve gmail, which I'm not a fan of.

On this, I made a pull request for interactive login that doesn't scrape your gmail. You can choose any of your saved approved devices. (An approved cellphone arlo app will get a login notification request or another gmail including non-gmail)

But seeing that arlo moved to mqtt, it's all kina moot. 😭

from arlo.

jeffreydwalter avatar jeffreydwalter commented on June 16, 2024

I'm working on getting mqtt working. I just don't have any Arlo cameras anymore, so I'm going to bed volunteers to help me test.

from arlo.

cgmckeever avatar cgmckeever commented on June 16, 2024

Id gladly send you a camera for your continued support

from arlo.

Brey86 avatar Brey86 commented on June 16, 2024

I'm working on getting mqtt working. I just don't have any Arlo cameras anymore, so I'm going to bed volunteers to help me test.

I can help you to test what you need.

from arlo.

Brey86 avatar Brey86 commented on June 16, 2024

Any news about this?

from arlo.

jeffreydwalter avatar jeffreydwalter commented on June 16, 2024

Still working on it. Didn't have much time this past week.

from arlo.

Brey86 avatar Brey86 commented on June 16, 2024

Any news about this?

Thanks for your work!

from arlo.

axelande avatar axelande commented on June 16, 2024

This seems like an awesome library but I'm also stuck here trying to connect to the Arlo system (just running

arlo = Arlo(USERNAME, PASSWORD)
basestations = arlo.GetDevices('basestation')

creates the issue for me)
Is anyone working on the issue or where can I start looking in order to help out and contribute?

from arlo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.