jeffreydwalter / arlo

Python module for interacting with Netgear's Arlo camera system.
Apache License 2.0
520 stars 123 forks source link

full screen snapshots are in 1280x720 instead of 1980x1080 (Arlo GO) #121

Closed psypol closed 5 years ago

psypol commented 5 years ago

Reporting here my request made as a commit comment :

"working on a Arlo GO i still have a problem with the full screen snapshot. While the dashboard makes snaps with a resolution of 1980x1080 .. the function gives me a picture with a resolution of 1280x720

Am i doing something wrong ? my snaps looks like this and i make no further changes on the file snapshot.jpg

arlo = Arlo(USERNAME, PASSWORD) cameras = arlo.GetDevices('camera') snapshot_url = arlo.TriggerFullFrameSnapshot(cameras[0], cameras[0]) # ArloPro IS Camera AND basestation arlo.DownloadSnapshot(snapshot_url, 'snapshot.jpg')

snapshop.jpg is desperately at 1280x720 and not the expected awesome 1980x1080 the cam can provide Thanks in advance for any help"

==== jeffrey's answer : "You need to inspect the browser requests and see what it's doing when you trigger a snapshot" If you paste those requests here I can update the library."

So here comes the browser request :

takeSnapshot

Request URL: https://my.arlo.com/hmsweb/users/devices/takeSnapshot
Request Method: POST
Status Code: 200 OK
Remote Address: 54.76.56.198:443
Referrer Policy: no-referrer-when-downgrade
Accept-Language: pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7,fr;q=0.6
Cache-Control: no-cache, no-store, must-revalidate
Connection: keep-alive
Content-Type: application/json;charset=UTF-8
Date: Mon, 13 May 2019 12:00:54 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Server: Server
Strict-Transport-Security: max-age=63072000; includeSubDomains
transfer-encoding: chunked
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-UA-Compatible: IE=edge
X-XSS-Protection: 1; mode=block
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7,fr;q=0.6
Authorization: {Masked}
Connection: keep-alive
Content-Length: 89
Content-Type: application/json;charset=UTF-8
Cookie: JSESSIONID={Masked}; 
AWSELB={Masked}; 
_vwo_uuid_v2={Masked}; 
_fbp=fb.1.{Masked};
 _ngSupportStartTime=%7B%22date%22%3A%222019-04-24T08%3A54%3A37.000Z%22%2C%22surveySeen%22%3Afalse%2C%22startURL%22%3A%22https%253A%252F%252Fcommunity.arlo.com%252Ft5%252FArlo-Smart-Home-Security%252Fct-p%252FArlo%22%2C%22startDate%22%3A%222019-04-24T08%3A54%3A37.000Z%22%7D; sso=2_5K-pY9BvL6PGsTgKq8nT14yNHSDzMpSJDAW25IFx3UwFmdsUPffi6FPVowf_Y4JgYvplpCJ0x4VKgwwcGTF7PuVB1BLNr2yQASF8UH7xoCWaYb4nKpz7EGD_IkvcdxPp-8HtpS2sEai0oARE1gM6YUXQxV9GXlsiPQpEl7VMstwM; 
token={Masked}; 
_gid=GA{Masked}; 
_gat=1
Host: my.arlo.com
Origin: https://my.arlo.com
Referer: https://my.arlo.com/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
xcloudId: X27V-1700-277-110665942

response is : {"success":true}

i hope this is the expected output. Otherwise please let me know thanks

jeffreydwalter commented 5 years ago

Hi @psypol, that's helpful, but I also need to see the request payload (a.k.a. request body or form data) that was sent with that http request. You can see it at the bottom of the Headers tab in the network tab of your browser's developer tools.

image

psypol commented 5 years ago

Hi. sorry for the answer delay.

here comes the requested info :

{parentId: "51D2837VAxxxx", deviceId: "51D2837VAxxxx", olsonTimeZone: "Europe/Belgrade"}
deviceId: "51D2837VAxxxx"
olsonTimeZone: "Europe/Belgrade"
parentId: "51D2837VAxxxx"
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

psypol commented 5 years ago

up

molotov6969 commented 5 years ago

hi psypol, i'm new to all this and was wondering if i could enlist your help on how to snapshot each of my arlo cameras either when the image changes (ie motion is detected). is that what you're doing or maybe you're doing it every X minutes? either way, any help

jeffreydwalter commented 5 years ago

@molotov6969 check out the wiki: https://github.com/jeffreydwalter/arlo/wiki/Subscribe-to-Motion-Events https://github.com/jeffreydwalter/arlo/wiki/Record-Video-and-Triggering-Snapshots https://github.com/jeffreydwalter/arlo/wiki/Taking-Full-Screen-Snapshots

molotov6969 commented 5 years ago

@jeffreydwalter thank you so much! i used the code from "Taking-Full-Screen-Snapshots" and it is executing but returning an error. i do have more cameras than the arlo account limit allows but i leave them deactivated and switch them around as needed. is there a way your code can accommodate for this scenario?

Request (POST https://my.arlo.com/hmsweb/users/devices/fullFrameSnapshot) failed: {'data': {'error': '2222', 'message': "Your account does not support the addition of another device. Now's a great time to upgrade your account. Or you can remove one of your other devices.", 'reason': 'Device Not Provisioned'}, 'success': False}

jeffreydwalter commented 5 years ago

@molotov6969, in the code, you'll need to check the "state": "provisioned", attribute of your camera before attempting to use it.

molotov6969 commented 5 years ago

honestly i have no idea how to modify the Taking-Full-Screen-Snapshots script to do that.

jeffreydwalter commented 5 years ago

@molotov6969 I recommend you read up on Python and figure it out. GetDevices() returns a Python collection of all your Arlo devices. GetDevices("camera") returns a collection of camera objects, GetDevices("basestation") returns a collection of basestation objects.

The basic idea, is that you need to check to see if your device is provisioned, here is a contrived example of checking your camera:

if camera[0].state == "provisioned":
     # camera provisioned, do stuff
else:
    # camera not provisioned, don't do stuff
molotov6969 commented 5 years ago

i appreciate the vote of confidence. i'll give it my best shot. thanks!

molotov6969 commented 5 years ago

as a test, i removed my 2 extra cameras that were over the limit. however, i'm sill getting the exact same error as before.

jeffreydwalter commented 5 years ago

@molotov6969 please don't hijack other people's issues for support. If you want help with this open your own github issue and provide all of the requested information.

jeffreydwalter commented 5 years ago

@psypol I haven't forgotten about you... You might try using TriggerFullFrameSnapshot(). It calls a different endpoint which returns a full-frame snapshot.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.