Do not know how to grab Dropcam image


(Matthew Hartley) #1

We implemented “capbility.imageCapture” and the “take()” command and tested it with our Dropcam device and see a filename of the image but we don’t know how to acquire the image from the SmarThings API:

0: {
name: "image"
value: "smartthings-smartsense-camera: afb8d849-dc2b-41c8-a736-d9b487b1ed15.6f3e262cfdaa4a1591143c7c630ae1c6_e27f4075dfdb4d449caffb701d224b2a.jpg"
unit: null
date: "2015-02-01T15:23:41.416Z"
unixTime: 1422804221416
type: null
}


(Harper) #2

Did you make progress here?


(Harper) #3

The url is:
https://graph.api.smartthings.com/api/s3/smartthings-smartsense-camera/[imagename]

so

https:// graph.api.smartthings.com/api/s3/smartthings-smartsense-camera/afb8d849-dc2b-41c8-a736-d9b487b1ed15.6f3e262cfdaa4a1591143c7c630ae1c6_e27f4075dfdb4d449caffb701d224b2a.jpg

nice cymbols


(Matthew Hartley) #4

harper, thanks you saw my crappy Peal traveler drum set…LOL…classic

dude this is very cool…we needed that…

THANK YOU


(Matthew Hartley) #5

Harper,

We aren’t able to access the suggested REST API below for camera image using the OAuth Token that is negotiated for access to our SmartApp. Specifically, the OAuth Token that was successfully obtained with the “https://graph.api.smartthings.com/api/smartapps/endpoints” API.

Suggested REST API for camera image:
https://graph.api.smartthings.com/api/s3/smartthings-smartsense-camera/afb8d849-dc2b-41c8-a736-d9b487b1ed15.6f3e262cfdaa4a1591143c7c630ae1c6_425259bc8f1e4f5b86f619c63040da5d.jpg

Returns the following response using SmartApp auth token:
{
error: true
type: "AccessDenied"
message: “This request is not authorized by the specified access token”
}

How do we get by this?


SmartApp OAuth token not working on external REST API's
(Matthew Hartley) #6

Yup…we are doing that no problem.

When we query the SmartApp for the Dropcam image using the we get back just the file name for the Dropcam image:

value: “smartthings-smartsense-camera: afb8d849-dc2b-41c8-a736-d9b487b1ed15.6f3e262cfdaa4a1591143c7c630ae1c6_e27f4075dfdb4d449caffb701d224b2a.jpg”

We inquired about how to access this image file and Harper directed us to this URL below which is outside of the SmartApp url scheme. This URL works in the context of a USER but not in the context of a SMARTAPP.

https://graph.api.smartthings.com/api/s3/smartthings-smartsense-camera/[imagename1]

How do we access a Dropcam file in the context of a SmartApp?


(nir Dweck) #7

Hi,
I run into the same problem.
Have you made any progress?
Thanks,
N.


(Matthew Hartley) #8

The response we received from ST a couple weeks ago is that this is not supported and they are working on a solution.