Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abode camera capture doesn't work for all Abode camera models. #29895

Closed
troycarpenter opened this issue Dec 13, 2019 · 16 comments · Fixed by #31250
Closed

Abode camera capture doesn't work for all Abode camera models. #29895

troycarpenter opened this issue Dec 13, 2019 · 16 comments · Fixed by #31250

Comments

@troycarpenter
Copy link

Home Assistant release with the issue:
0.103.0

Last working Home Assistant release (if known):
N/A (I only started using HA at 0.102.3...didn't work there either)

Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io

Integration:
Abode Integration
https://www.home-assistant.io/integrations/abode/

Description of problem:
There are two types of Abode cameras, the older streaming camera and the camera built into the IOTA base unit. Using the Developer Tools to call services, I use abode.capture_image service on the two entities.

The IOTA camera works fine and captures the image as expected.
The older streaming camera does NOT capture an image.

LOG after the failed attempt:
Thu Dec 12 2019 17:53:06 GMT-0600 (Central Standard Time)
Failed to capture image: Request failed

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

All configurations were auto-created by the Abode integration.

Traceback (if applicable):


Additional information:

@probot-home-assistant
Copy link

Hey there @shred86, mind taking a look at this issue as its been labeled with a integration (abode) you are listed as a codeowner for? Thanks!

@troycarpenter
Copy link
Author

Hi.
The Abode system downloaded new firmware about 10 minutes ago. I now have the following firmware on both the IOTA Gateway and external streaming camera:
1.0.2.22G_6.8E_homekit_2.0.9_s2 ABODE oz

I tried the snapshot again with the external camera on the new firmware, but there was no change.

@shred86
Copy link
Contributor

shred86 commented Dec 14, 2019

Unfortunately I won't really be able to look into this as I don't have the older streaming camera. Funny thing is, I actually have one at a house I own but rent out in a different state (it's sitting in a box in storage there).

I suspect the issue is with the address being used to make the PUT request. If you're familiar with how to use the Developer Tools in Chrome, it might be as easy as seeing what URL the camera is using when you make a image capture request from the Abode web app.

@MisterWil may have a better idea. I think the change might actually be in abodepy.

@shred86
Copy link
Contributor

shred86 commented Dec 14, 2019

I actually wonder if it's related to this: MisterWil/abodepy#58

Perhaps the older camera uses api/v1/cams/$DEVID$/snapshot instead of 'api/v1/cams/$DEVID$/capture? Unfortunately I can't test this without the camera. If anyone knows how to run a custom library (abodepy) in this case, it would be a really easy change to test.

@troycarpenter troycarpenter changed the title Abode camera capture doesn't work for all Abode cameras models. Abode camera capture doesn't work for all Abode camera models. Jan 19, 2020
@troycarpenter
Copy link
Author

I am still interested in getting this working, but so far I've not had time to revisit. I need to take the time to figure out how to do what you are asking, then I can make the change and test. Given that the newer IOTA camera seems to be able to do the capture implies it might actually be something as simple as the URL used...in that case, I don't know if there's any way to tell the two types of camera apart...the state attributes look the same between the two. There is an attribute called "supported_features" set to 0 which maybe can be used to determine which URL to use if indeed that is the issue.

@shred86
Copy link
Contributor

shred86 commented Jan 20, 2020

Here's the instructions using Google Chrome on Mac OS:

  1. Open Google Chrome and go to my.goabode.com (login page) and log into your account.
  2. Select View > Developer > Developer Tools. You should see separate section in the browser open up and across the top of that new section, you'll see tabs labeled Elements, Console, Sources, Network, etc.
  3. Select the Network tab then click the clear icon (next to the red circle).
  4. Click the capture image icon in the Abode web UI and in the Network developer tools window, you should see a bunch of new activity. There's one item called "capture", if you select that, you will see more information for that particular network activity.
  5. I need to know under "Request URL", if it ends with capture or snapshot and for which camera.

I have the Iota camera and it uses capture. I think the newer stand alone cameras use capture as well but I have a feeling the old first gen 720p cameras use snapshot.

Here's a screenshot to illustrate some of what I'm talking about (circles in pink):
https://drive.google.com/open?id=130kcz4DooCxvU8JC2alE9MwMg_oix_Ue

@troycarpenter
Copy link
Author

troycarpenter commented Jan 22, 2020

For the older streaming cam:
https://my.goabode.com/api/v1/cams/xxxxxxxx/snapshot

For the IOTA:
https://my.goabode.com/api/v1/cams/xxxxxxx/capture

So you are right. Older cam uses snapshot. IOTA is using capture.

So the big question is whether or not you can tell the two apart programatically in order to use the correct URL...

@troycarpenter
Copy link
Author

BTW, I see a similar difference for the recording of video (which I'm not sure there actually is an abode service for capturing video).

For older streaming cam:
https://my.goabode.com/api/v1/cams/xxxxxxxxxx/video

For IOTA:
https://my.goabode.com/api/v1/cams/xxxxxxxxxx/record

@shred86
Copy link
Contributor

shred86 commented Jan 23, 2020

Thanks for checking that. Just to make sure, is your "older streaming cam" the original square Abode 720p camera? I need someone with the "newer" circular streaming camera to check the same thing.

Also, I opened an issue over on the Abodepy repo since this is where the change will have to occur:

MisterWil/abodepy#60

@shred86
Copy link
Contributor

shred86 commented Jan 23, 2020

@troycarpenter Would you be able to provide me the JSON data for the older streaming camera? It's the same steps as I posted above, except you you log into the Abode web UI with the developer tools open, you'll see one of the Network activities labeled as "devices". Click that and select the "Response" tab in which you should see a very long line of text (it's JSON data). If you selected the entire thing, you can paste it into a JSON formatter (https://jsonformatter.org) and click "Format/Beautify" on that site to format it to a more readable format.

This will be a long list of JSON data for all of your devices. You'll need to find the one for your streaming camera specifically and paste it over in the issue I opened on the Abodepy repo:

MisterWil/abodepy#60

I'd recommend removing your camera_mac, uuid, id, control_url and control_url_snapshot fields. See my example posted over on that issue above for my Iota camera (I replaced those five fields with <redacted>).

@troycarpenter
Copy link
Author

troycarpenter commented Jan 23, 2020

Just to be sure we are talking about the same thing...this is what I have:
https://goabode.com/security-devices/security-cameras/abode-cam

So no, the one you are referring to contains a motion sensor as well. This would then be considered the newer one. My bad if I was referring to the wrong camera in the writeup...I've only had this for less than a month.

@troycarpenter
Copy link
Author

@troycarpenter Would you be able to provide me the JSON data for the older streaming camera? It's the same steps as I posted above, except you you log into the Abode web UI with the developer tools open, you'll see one of the Network activities labeled as "devices". Click that and select the "Response" tab in which you should see a very long line of text (it's JSON data). If you selected the entire thing, you can paste it into a JSON formatter (https://jsonformatter.org) and click "Format/Beautify" on that site to format it to a more readable format.

This will be a long list of JSON data for all of your devices. You'll need to find the one for your streaming camera specifically and paste it over in the issue I opened on the Abodepy repo:

MisterWil/abodepy#60

I'd recommend removing your camera_mac, uuid, id, control_url and control_url_snapshot fields. See my example posted over on that issue above for my Iota camera (I replaced those five fields with <redacted>).

I've posted the requested output at the referenced issue in the Abodepy repo.

@shred86
Copy link
Contributor

shred86 commented Jan 23, 2020

Thanks for the info! The streaming camera you have is their "newer" 1080p camera. When Abode first came out, they had a square shaped 720p streaming camera which is what I thought you had.

I already have a fix for Abodepy that will address this issue. I'll just need to get it merged into Abodepy and submit a PR to bump the Abodepy version in Home Assistant.

@troycarpenter
Copy link
Author

Thanks for moving on this. The older "camera" apparently just takes a series of photos, not true video. I kinda thought we were talking about different models, but I'm glad we got to a common understanding.

Also, am I missing a way to trigger a video recording from HA? I know this bug is about snapshots, but I don't see an "abode.capture_video" type service like there is for snapshot.

@shred86
Copy link
Contributor

shred86 commented Jan 23, 2020

That's the motion sensor with a camera. I'm talking about an actual streaming camera (different model). It was replaced with the streaming camera you have, so it's no longer sold. You can see it on Abode's Kickstarter page. It's the square black/white camera to the right of the gateway.

I created a pull request on abodepy to resolve this issue.

@troycarpenter
Copy link
Author

Indeed, I've never seen that device before. Must be very old.

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

Successfully merging a pull request may close this issue.

3 participants