-
Notifications
You must be signed in to change notification settings - Fork 34
get_battery_level() does not work for Arlo Q cameras #33
Comments
Related issue: home-assistant/core#8412 |
Can anyone with an Arlo Q camera show what the API response looks like so that we can add it to a test fixture? |
I duplicated some work with the basestation to see if I could get something working, however I'm having some initial problems with the sseclient.
data ends up being <Response> which obviously doesnt plug into the SSEClient call very well and throws an exception. Does this call return some subscription URL for the basestation? I dont know too much about the SSEClient subscription service, but I do see this call working successfully with the device through arlo.netgear.com. |
I'm blocked by this at the moment, does anyone have any insight? |
Hello @ryanwinter, what kind of error are you getting? I just ran a quick test with telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
> /home/mdemello/devel/python-arlo/pyarlo/base_station.py(49)thread_function()
-> self.__subscribed = True
(Pdb) l
44
45 def thread_function(self):
46 """Thread function."""
47
48 import rpdb; rpdb.set_trace()
49 -> self.__subscribed = True
50 url = SUBSCRIBE_ENDPOINT + "?token=" + self._session_token
51
52 data = self._session.query(url, method='GET', raw=True, stream=True)
53 self.__sseclient = sseclient.SSEClient(data)
54
(Pdb) n
> /home/mdemello/devel/python-arlo/pyarlo/base_station.py(50)thread_function()
-> url = SUBSCRIBE_ENDPOINT + "?token=" + self._session_token
(Pdb) n
> /home/mdemello/devel/python-arlo/pyarlo/base_station.py(52)thread_function()
-> data = self._session.query(url, method='GET', raw=True, stream=True)
(Pdb) url
'https://arlo.netgear.com/hmsweb/client/subscribe?token=2_5tW9XE5l3RVbbyQ<REDACTED>
> /home/mdemello/devel/python-arlo/pyarlo/base_station.py(53)thread_function()
-> self.__sseclient = sseclient.SSEClient(data)
(Pdb) data
<Response [200]>
(Pdb) n
> /home/mdemello/devel/python-arlo/pyarlo/base_station.py(55)thread_function()
-> for event in (self.__sseclient).events():
(Pdb) dir(self._ArloBaseStation__sseclient)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_char_enc', '_event_source', '_logger', '_read', 'close', 'events']
(Pdb)
(Pdb) self._ArloBaseStation__sseclient.events()
<generator object SSEClient.events at 0x7f5254bd0830> Where Does it make sense? What error are you getting? |
This makes sense, the part I'm having issues with is line 52/53. What is the purpose of line 52? I'm getting the data = "<Response [200]>", but then SSEClient throws an error with that input. I'm still trying to get my head around the debugging here, maybe I have a bad dependency?
|
Ok, so making some progress, it seems I had install sseclient, instead of sseclient-py :| |
Awesome, so this is pretty much as expected. The Arlo Q cameras act as their own base station. |
@ryanwinter oh.. good to know that!! So we will need to modify the code in order to check the try to modify its behavior. Are you working on a patch to make it fully compatible with Arlo Q camera since you own them? |
Reference: |
Arlo Q cameras does not require a base station.
We will need to treat this situation and if possible get the same attributes for Arlo Q cameras too
The text was updated successfully, but these errors were encountered: