Issue with camera take photo action

Hi,

I am using 2 different device handlers for my various cameras. One is rboy’s foscam specific device handler, the other one is a generic camera handler.
they were both supplying fine results a few weeks ago when I used the “take photo” action.
I was able to see the last photos taken on the thing main screen.
now both types can not display any taken photos.

I believe something about saving the photo on cloud might have changed.
does anyone else notice same issue ?
any solutions ?

thx.

I think you’ll need to get updated device handlers, ST changed the way images are stored. See this thread.

I think most of the popular camera device handlers have been updated accordingly.

4 Likes

thanks. it is saying that I have to use

ByteArrayInputStream getImage(String name)

but instead of which statement ?
couldn’t find that…

ok. I made some changes and now it works. but I really didn’t understand what is related with the ByteArrayInputStream. it is not given in any modifications.

here’s what I have changed mainly:

//	def descMap = parseDescriptionAsMap(description)
	//Image
//	if (descMap["bucket"] && descMap["key"]) {
//		putImageInS3(descMap)
//	} 
     	def mapx = stringToMap(description)
        	if (mapx.tempImageKey) {
    	log.info "Saving picture to SmartThings"
		try {
			storeTemporaryImage(mapx.tempImageKey, getPictureName())
        } catch(Exception e) {
			log.error e
		}
	}

The two required changes were using storeTemporaryImage instead of putImageInS3 and tempImageKey instead of key.

2 Likes

thanks.
as I wrote Ive updated my device handlers.
but now I see a problem with the officially supported “photo burst when…” app.
It was showing the photo in activity feed. now it does not.
any idea why ?

Sorry, can’t help there

Yeah it’s a bug in the ST phone app, when using storeImage and storeTemporaryImage it’s stopped showing the picture in the recently app for Android phones, I’ve reported it in the BETA section of the community but feel free to send in your own report to ST support so they can prioritize it.

2 Likes

thanks. Btw, recent changes to your camera device handler is very nice. Thanks for continuous support.

1 Like