Generic Camera Device using local connection (new version now available)

Which android version? If you don’t mind, try force quiting the app and relaunching it see if cameras work again on android. Sometimes the image carousel glitches.

Hopefully it will get better soon.

What camera BTW?

Restarting the app on my Nexus 5 phone doesn’t make any difference (carousel just displays the SmartThings logo), but trying it on my Nexus 7 tablet works as expected. Both are running 5.1.

The camera is a Sharx Security SCNC2900W.

Still not working for me on Android 1.7.2 / Samsung Galaxy S5 (5.0). Logs show everything working and image is being uploaded to S3.

I have heard from support that the 3s has been fixed. There is a bug with Android 1.7.2 with the image Carousel.

Hopefully this will be fixed shortly, if not, I’ll try to update the code for a workaround.

I was excited to see a new Android release this evening, but unfortunately it didn’t seem to fix the camera support :frowning:. Can you share the workaround?

For those still having issues, please upgrade to the latest android 1.7.3 just released:

and let me know if it isn’t working still. Mine started working with this release. Plus the images are now in the correct order.

If you are still having issues, please let me know make and model of your android device (os as well) and make and model of your camera and path you are using to image and if its post or get and if it requires auth or not.

Thanks for your patience… ST thanks for getting this fixed

My setup works fine on my wife’s iPad, and always has. It still does not work with the latest 1.7.3 version on my Verizon Samsung Galaxy S5 on Android 5.0, or my wife’s S4 that was just upgraded to 5.0.1 this week. So it does not look as if the carousel issues are fixed for all platforms. Since the images show on IOS, I take that as to mean that the device type code works fine, and the images show up where they should. I can’t see how the device code can “fix” the Android issue, unless it has to do with the naming of the image. Please correct me if I misunderstand something.

FWIW, I use a derivation of what I assume is the original IP device type that uses digest auth with a GET.

I tried Android 1.7.4 that was released in the last day or so, but still no joy on my S5/Lollipop :frowning:

Logs from an attempt:

12:31:08 PM: debug Storing smartthings-device-conn-temp, 440b163d-f003-456d-85a2-b002232809ac
12:31:08 PM: debug Uploading the picture to amazon S3
12:31:08 PM: debug Parsing output: 'index:01, mac:0016…2, ip:C…, port:0050, bucket:smartthings-device-conn-temp, key:440b163d-f003-456d-85a2-b002232809ac’
12:31:04 PM: debug Response: 44059a13…8 ===== org:ce…75:8548f8…d:64:da0ad139:auth:9dd…47707c9
12:31:04 PM: debug HA2: 9dd3…9 ===== org:GET:/cgi-bin/video.cgi?msubmenu=jpg&resolution=2
12:31:04 PM: debug HA1: cef5…75 ===== org:admin:iPolis:xxxxxx
12:31:04 PM: debug state: [nc:63, auth:[realm:iPolis, nonce:8548…d, qop:auth]]
12:31:04 PM: debug The device id configured is: c…
12:31:04 PM: debug IP address entered is 192… and the converted hex code is …

@Dan999 What brand name camera are you using? Foscam etc. I have an S5 and no problems.

I have a couple of Samsung cameras. What device type code are you using for your Foscam?

I had an older Android phone that I used to use as an IP camera, and it worked better - pictures would show in the carousel but not without a refresh. That camera device type did not use the local connection, which is what I use for the Samsung IP cameras.

As mentioned earlier, things work fine on the wife’s iPad. I don’t what other conclusion to draw other than the issue is with the Android app.

Finally success! I spent another couple hours messing with this over the weekend and it started working when I changed the picture name. I noticed the function that was used, makes the picture name by combining the DNI with a UID. The DNI has a ‘:’ in the name. I took out the DNI from the picture name and the pictures started showing up in my Android app carousel. Go figure.

Good catch. I’ll update my github with this fix. For some reason my code on my server already had this, but apparently never made it to the github.

Was able to easily add my linux “motion” webcam to ST using this device type - working (with the edit posted above for the image name) on my Android phone. Thanks. Now to add a few Android stick - based cams :smile:

I finally got the URL to get my new HD (1920x1080) Samsung camera to operate with a derivation of this device type that supports digest authentication.

However, most of the time I don’t get a full image. In that case, the next time I press the Take button, I will never get an image. If I then go off the device screen and back in, it will work the next time. So it basically works, then does not work, then works again, etc. (works = takes a photo and displays it in the carousel). A couple times I got full photos and then the device type works as expected.

When I look in the logs, I don’t see the parse() function called when it does not work, and I do see the parse() function called when it does work.

Is there some kind of size limit or timeout that applies to this? When I invoke the URL in the browser, the camera generally responds within a second or so. I also do not have this issue on the other cameras set up with the same device type. They are 640x480. I haven’t found a way to get smaller snapshots from the HD camera yet, although I did read earlier in this thread where even larger images do work.

Has anyone seen this before?

Yeah, there are a couple undocumented timeouts that can cause issues.

Here is why images in ST just sucks via cameras and local hubaction.

The request from the app has to go up to the cloud.

Cloud sends request to hub to request local hubaction.

hub waits for a response.

Hub gets response, has to relay response (in this case, bytestream of the image) back up to cloud. (hub has tiny amount of memory to process bytestream)

Cloud has to store bytestream into Amazon S3 and get key and bucket.

Cloud fires parse function

Cloud relays key / bucket back down to mobile app.

Mobile app uses key / bucket to access image in Amazon S3.

If the hub loses packets, or S3 times out, the image will not display, parse won’t fire, etc.

Wifi camera’s are notorious for interupting the static image with the next static image. They were never really meant for still frame grabbing.

Hopefully this will get better with hub v2 and ST’s video services.

Thanks for the reply. I guessed as much about the timeouts.

I’ve got a request out to Samsung Techwin to see if they can provide me with the HTTP request parameters to set the image size. I’m not holding my breath, though…

I don’t need a 1920x1080 picture for the camera, and reducing the size seems to make the device much more reliable.

Hey @pstuart - I have been using your generic camera device for past few months with great success! Past 1week my camera is no longer viewable in the generic camera app. Has something changed with the code? I use a Mobotix camera… can still access image capture via all settings I have entered in the app.

Edit Also wanted to note, I used to have a custom image saved for the button in my ‘Things’ and that no longer appears, the default dropcam looking icon is now there

Yeah st broke it again. Please open a support ticket with st

So here’s the weird thing… I have 3 hubs on my account all setup the same way. The sercom camera off the NJ hub has been working FLAWLESSLY since day one (and it is still working today). Yet the same camera, running the same code in VT is NOT working.

The VT hub is the same version of hub, setup with the same router/firewall, same Sercom camera, same device code from Patrick (thanks again by the way). Manually go to the IP/port/image and it shows the pic as it should.

When I look at the ST log for the VT hub camera, it says the ‘take’ command was sent, but I never see a reply.

Any thoughts ?

The camera is a sercom (I think it is a sercom 8021) :
IP 10.0.1.13
Port 80
No authentication required.
Image path is: /img/snapshot.cgi?size=3

THANKS

When I use the IDE to test with the NJ camera ( the one that WORKS ) I see one additional like in the debug output that I don’t see on the VT camera (which isn’t working):

debug: Parsing 'index:01, mac (my MAC & port) device-conn-temp: key…

That line does NOT show up on the VT camera (which isn’t working).