Documentation for Image Capture, carouselTile, and storeImage?


(Kevin) #1

I was able to figure out how to retrieve images, save them and display them using the carouselTile, but I haven’t been able to find any information that mentions the following things:

  • What’s the difference between storeImage and storeImageInS3?

  • Where are the images stored?

  • Is there a way to see all the images that have been stored?

  • Can you manually delete the stored images?

  • Do the images automatically get deleted when the device/smartapp is removed?

  • Can you use multiple carouselTiles that display different images?

  • Can you prevent the storeImage command from displaying the image in the Activity Feed?

  • When the carouselTile has multiple images, can you programmatically change which image is active?

Any information/materials you can provide would be greatly appreciated.


Where are the the photos taken by imageCapture.take() stored?
(Jason) #2

Tagging @Jim


(Roy Donaldson) #3

Could you also comment on the maximum image size please ? I’ve just been trying to use StoreImage and StoreImageinS3 and get this error back:

error
java.security.InvalidParameterException: Image size of 4120892 bytes exceeds limit of 1048576

It is from a IP security camera and unless I lower the resolution I’m not going to hit that lower number. Is there a way to have an increased size, or a conversion done to stay within the max size ?


(Jason) #4

Perhaps these will help?

http://docs.smartthings.com/en/latest/device-type-developers-guide/tiles-metadata.html?highlight=carouseltile

http://docs.smartthings.com/en/latest/ref-docs/device-handler-ref.html?highlight=carouseltile


(Jason) #5

Looks like from what you posted it’s approx 1mb or 1024kb. ((Bytes/1024)/1024) =mb


(Roy Donaldson) #6

What I’d like to know is if they have a conversion command that can convert larger images down to within their supported size, or a way to upload larger images. 1MB is useless for video cams.


(Kevin) #7

I saw those resources, but they don’t provide answers to any of the questions I listed in my first post.


(Kevin) #8

Apparently the image related commands are active, but no longer supported and ST only supports cameras that stream video so I’m pretty sure we’re on our own.

I’m basing this off of the conversation I had with slagle in the following thread:

I created a similar topic in the private lounge area and last week I was told that they would have a response to my questions this week, but so far I haven’t heard anything.


(Roy Donaldson) #9

Have they replied to you as of yet ? @slagle


(Kevin) #10

They’ve answered some of the questions, but not the important ones about where the images go, can they be managed, and if they get deleted when the DH/SmartApp is removed.

Here are the answers that I’ve received:

  • Can you save an image to state using base64 encoding and display it with the Carousel Tile without using storeImage?
    No, state is not designed to accommodate that.

  • Can you use multiple carouselTiles that display different images?
    Unknown if this is supported currently, easiest path is to hack an existing device type handler

  • When the carouselTile has multiple images, can you programmatically change which image is displayed?
    No, we’d need to add support for this

  • When you overwrite an image that the Carousel Tile is using, it doesn’t display the new image until you re-open the device. Is there a way to force the Carousel Tile to refresh?
    No, we’d need to add support for this

  • It looks like there’s a file size limit of a little over 1MB for storing images which is a problem for a lot of cameras. Are there any conversion commands that allow you to resize the image before storing it?
    At the moment we do not have conversion commands for image. We are looking at various options on best to covert image files, and the timing of this feature is still needs to be worked out.

  • Since ST supported cameras no long do images and only support live feed, is that something we can do in our own device handlers? If so, can you provide an example of how this can be done?
    It’s not clear if we can support this, the Product Manager for video is going to bring this up with the team for discussion.


I personally think they’re not responding to the image management questions because they’re concerned that users will be upset if they confirm that all the images stored are floating around out there and there’s no way to see what’s been stored or remove them.

@RBoy came up with the idea to use base64 encoding and store the image in an attribute called “imageDataJpeg”. It’s not an official attribute of the “Image Capture” capability, but we’ve both been including it in our DH’s that support images. If enough developers start using the attribute, we’re hoping that SmartTiles will support it.

I’ve stopped using the carouselTile and storeImage command and I’ve been using the custom attribute mentioned above and the htmlTile to display the encoded images. If you decide to do this, be aware that the htmlTile is not officially supported yet so the way it works could change at any time.

If you want to see how to implement that, see my Blink Camera DH and SmartApp. It’s open source and provides basic functionality, but if you want a fully featured DH for Blink Camera, it’s probably worth purchasing rboys.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #11

Has SmartThings compared their features to those offered with other streaming video Apps (Dropcam / Nestcam, Blue Iris, Samsung, IP Cam Viewer)?

This sure seems like a very weak offering compared to competitors.