Removal of Undocumented Device Type Data Storage Option - 1/19/2017

I was hoping that this new update would fix the issue, but, sadly, no. The carousel also does not display any images older than the actual session you’re in. For example, if I open the camera and snap three pictures, I can rotate through them. When I close the app on the phone and re-open it, there are no images in the carousel.

3 Likes

The tickets I made are still in our mobile team’s backlog unfortunately :disappointed:

The carousel also does not display any images older than the actual session you’re in. For example, if I open the camera and snap three pictures, I can rotate through them. When I close the app on the phone and re-open it, there are no images in the carousel.

Can you confirm that this bug was correlated with your mobile apps update to 2.3.0?

No, the bug predates this week’s update.

Mmhmm interesting. I’ll look into it and update this thread with my findings. Thanks for reaching out!

3 Likes

So I don’t have a camera to test this out with, but DTH I made to test this functionality is working as expected.

What mobile client are you using?

FWIW: When you open up a device our mobile app asks our cloud services for a list of events for the respective device. Events only last for 7 days within our system. When a photo is stored via the storeImage or storeTemporaryImage methods an event is generated that directs our mobile clients to ask our cloud services for the stored image. It seems that functionality is working correctly, so I would guess the issue is your DTH or client.

Some verification that cloud functionality is working :grin:

1 Like

Android or iOS? It seem to be fine in iOS (both showing the historical pictures and showing up in the recently tab, althought the image overlaps the text in the recently tab)

Thanks for looking into this. I believe that the issue is Android
specific. My wife’s IPhone seems to have no problem with the photos in the
Recent tab. I’m afraid I haven’t been able to check the carousel on her
phone. It seems that, perhaps, the Android client is not looking back to
where the image is stored.
Is the “storeTemporaryImage” function for when you are in session and, say,
take a few snaps and the “StoreImage” function more for holding archival
pictures?
THanks for your help.
Love the cats! :slight_smile:

*“God, how we get our fingers in each other’s clay. That’s friendship, each
playing the potter to see what shapes we can make of each other.” *
― Ray Bradbury https://www.goodreads.com/author/show/1630.Ray_Bradbury,
Something
Wicked This Way Comes https://www.goodreads.com/work/quotes/1183550

1 Like

Is the “storeTemporaryImage” function for when you are in session and, say,
take a few snaps and the “StoreImage” function more for holding archival
pictures?

Not exactly, maybe the names of those methods should be changed. I can see how that would be confusing.

storeImage - takes an image as a parameter
storeTemporaryImage - copies an image to the same place where images are stored from the storeImage method from a temporary location (put there by the service responsible for talking with the hub since we don’t want to put images in our messaging queue).

Althought the image overlaps the text in the recently tab

I have made a ticket already for this as well @RBoy, feel free to contact support to help it get prioritized.

I can post images as well, but I’m seeing the same selection of images in version 2.3.0 of the Android client. So I’m not really sure what is happening here. If you want to PM your ST email and shard, I would be happy to check our logs to see if something weird is happening with your account on our cloud services.

Otherwise reaching out to support would help get you in contact with the mobile team if there is a bug you exposed in the Android client.

2 Likes

Maybe I’m missing the right page in the Docs, Luke (@jim?) but are these official new capability commands?

http://docs.smartthings.com/en/latest/capabilities-reference.html#image-capture

We have a lot of ActionTiles customers that are interested in being able to trigger snapshots and display them in a Tile; but we only want to use the supported official Capabilites whenever possible.

Thanks!?

They are not command methods; just methods available inside the Device Handler.

See… I knew I was looking in the wrong section of the documentation! :blush:

But … Docs search doesn’t find them either:

http://docs.smartthings.com/en/latest/search.html?q=storeImage&check_keywords=yes&area=default#


Any examples of WWST Devices that use these methods and how they related to the ImageCapture Capability?

And I knew I should have included this important piece of info :wink:

They’re not documented yet. Hopefully in the next week or two. There are several examples in this thread if you don’t mind scrolling.

1 Like

So, I’ve had a little time to look at my wife’s Iphone, too. The Image Carousel doesn’t work on either my Android or her Iphone for this particular camera. This is the only one I have using the @RBoy Foscam device driver. So maybe that’s in play? However, the original bug we were looking at was that images that used to appear in the “Recent” tab on the camera, do appear on the Iphone and not on my Android phone. So I think that’s an Android client bug as RBoy suggested.
Honestly, I’d be happy with either one. :slight_smile:
I’ll definitely send you my ST email. What is a “shard”? I’m happy to send it.

Thanks.

I’m having a problem detecting hubAction failures. It seems that hubActions with the outputMsgToS3 flag set to true will return a tempImageKey even if it failed to get an image.

Synology’s Surveillance Station returns something like this is there is an authentication error:

{“error”:{“code”:105},“success”:false}

But I’m not getting this from the hubAction callback. Instead I’m getting something like this:

index:17, mac:0011X261XXXX, ip:XXA80X43, port:1388, requestId:77feXX72-3421-4=Xe5-9a87-0154a4fbXXXX, tempImageKey:4ed287a5-c089-XX36-8342-45ce9a909XXX

I can’t detect failures with a response like this and no way to get access to the image data.

If my SS restarts, the session dies. It can’t reconnect unless I can detect the failure. This is what lead me to think that the storeTempImage call was broken. . . .

Can someone verify that you get a tempImageKey even when there are failures. (Perhaps not all failures are the same. It might just be the way that SS is reporting them that causes a problem.)

I am having some issues with this and a little confused on how this works:

My question is the getPictureName method. What is the format for the picture name. I have seen a couple of different examples.

Is it:
"image" + "_$pictureUuid" + ".jpg" or device.deviceNetworkId + "_$pictureUuid" + ".jpg"

here is part of my code:

private hubGet(def apiCommand) {
	//Setting Network Device Id
    def iphex = convertIPtoHex(ip)
    def porthex = convertPortToHex(port)
    device.deviceNetworkId = "$iphex:$porthex"
    log.debug "Device Network Id set to ${iphex}:${porthex}"

	log.debug("Executing hubaction on " + getHostAddress())
    def uri = "/cgi-bin/CGIProxy.fcgi?" + getLogin() + apiCommand
    log.debug uri
    def hubAction = new physicalgraph.device.HubAction(
    	method: "GET",
        path: uri,
        headers: [HOST:getHostAddress()]
    )
    if(device.currentValue("hubactionMode") == "s3") {
    	log.debug "hubactionMode: s3"
        hubAction.options = [outputMsgToS3:true]
        sendEvent(name: "hubactionMode", value: "local");
    }
	hubAction
}

def parse(String description) {
	log.debug "Parsing '${description}'"

def map = [:]
def retResult = []
def descMap = parseDescriptionAsMap(description)
    
if (descMap["tempImageKey"]) {
	log.debug "Sending to storeTemporaryImage()"
		try{
			storeTemporaryImage(descMap["tempImageKey"],getPictureName())
		} 
		catch(Exception e) {
			log.error e
		}
	}
}
def parseDescriptionAsMap(description) {
	log.debug "description: '${description}"
return description.split(',')*.trim()*.tokenize(':').collectEntries()
 }

private getPictureName() {
  def pictureUuid = java.util.UUID.randomUUID().toString().replaceAll('-', '')
  def picName = "image" + "_$pictureUuid" + ".jpg"
  log.debug picName
  return picName
  //device.deviceNetworkId + "_$pictureUuid" + ".jpg"
}

private getHostAddress() {
	return "${ip}:${port}"
}

Log
image_032a6a4390fa4ac88002d467a36cf9ba.jpg
Sending to storeTemporaryImage()
description: 'index:17, mac:E8ABFA64ABF6, ip:C0A801CA, port:0058, requestId:e0a1eb26-995a-4e08-b384-bc45e91d27cd, tempImageKey:4b7cf271-be83-4c9e-9299-751a1eac3e71
Parsing 'index:17, mac:E8ABFA64ABF6, ip:C0A801CA, port:0058, requestId:e0a1eb26-995a-4e08-b384-bc45e91d27cd, tempImageKey:4b7cf271-be83-4c9e-9299-751a1eac3e71’
hubactionMode: s3
/cgi-bin/CGIProxy.fcgi?usr=xxx&pwd=xxx&cmd=snapPicture2
Executing hubaction on 192.168.1.202:88
Device Network Id set to c0a801ca:0058
Taking Photo

This is fine, you didn’t say what your issue was.

The image is not showing on the tile… Is the overall issue

What’s your camera?

i have a foscam c1

one thing i should is, i do see the SmartThings Iris Logo. I can scroll through just fine, but I don’t see any camera images.

Am wondering if you’re facing a similar issue another foscam user is facing related to a BOM in the camera response for the image. @gausnes

Did you check your IDE for any errors?