MisterWil / abodepy

A thin Python wrapper for the Abode alarm API
MIT License
49 stars 17 forks source link

Camera capture method broken #58

Closed shred86 closed 4 years ago

shred86 commented 4 years ago

The camera.py module's capture method no longer works. When trying to call the capture method, I get:

2019-11-04 18:27:11 WARNING (SyncWorker_8) [abodepy.devices.camera] Failed to capture image: Request failed

I believe PR #47 is what caused it to stop working. When I view the request using developers tool while logged into the Abode web app, I see the following when requesting an image with the Iota camera:

:method: PUT
:scheme: https
:authority: my.goabode.com
:path: /api/v1/cams/XF:b0c5caxxxxxx/capture

Which is what CAMS_ID_CAPTURE_URL use to be. However, with PR #47, it changed capture to snapshot.

@milad-soufastai Where did you see the path change to capture? I'm wondering if maybe the put request path is different depending on the type of camera you have.

milad-soufastai commented 4 years ago

@shred86 I saw the path change when I was using the developers tool in chrome while on the Abode website. Looking at the ID for my camera it looks like things match with yours but I was getting errors when trying to use the capture URL.

With that being said, I recently unplugged my camera and replaced it with a Wyze cam since the quality is so much better then Abode's.

shred86 commented 4 years ago

Would you be able to check the path you're seeing now when taking a photo from the web app? I realize this requires you reinstalling your Abode camera. ;) Just need to confirm if it's /api/v1/cams/XF:b0c5caxxxxxx/capture or /api/v1/cams/XF:b0c5caxxxxxx/snapshot with the Abode camera. I have the Iota camera and I'm showing it's capture. If it is in fact capture, I'll create PR to change it back to how it was previously.

MisterWil commented 4 years ago

Fixed in 0.16.7