Did anyone figure out the hikvision camera’s lack of working with this (or indeed any number of devices people have posted in other threads that look like this)? I’ve tried this, the one Scott wrote from the dlink thread (modified) and the foscam one from examples (with hardcoded paths and no auth). It’s driving me slightly nuts since I know the IP and path result in a jpeg (curl works fine), yet in all cases this or others never result in parse being called (by logs) and it just hangs on taking just as @RichardH and @sgonsalves have found.
I’m also toying with trying my hand at a zoneminder device with the cameras as child devices, it looks like the sort of thing that was made for.
@pstuart I try this and having a problem of the image not showing up? Maybe I missing the path can you explain to me what I should use as a path for the image. I try to use the examples but no luck so far?
@llcanada Sorry, not enough info, the path is whatever you would put in a web browser to access an image from the camera.
So get it working in a web browser and then paste that URL in here, its everything to the right of the IP address.
@pstuart here is what I get
if I understand correctly I should be able to use
and get the snapshot but I don’t?? if your offer still stand I have teamviewer and I will let you on my system? I just missing something?
You’ll need to login to the web interface and create a new user account for the foscam. Then login with that user account and when you are viewing the feed there will be a “snapshot” option. CLick that and it will give you the link you need.
@tslagle13 thanks that did the trick. I would have never thought about that.
@tslagle13 and @pstuart are we able to use this why we are away from our home? is there someway to set up motion for this and have it take snapshots?
Following along as I have a set of YCam 1080ps in and around the house. I also use SecuritySpy on a Mac mini to record when motion is detected. It has a nice restful interface that allows one to access each camera attached. Going to have to find the time to try it out with this setup.
I’m working on this. Its gonna be hacked together with a third party app but I’ve got a setup working currently I think I like… I’ll be sharing soon.
So, still no luck with hikvision. Other cams work fine.
Does anyone know if it’s possible to get debug out of the hubAction stuff? Just a hunch, but the big difference is in the response header Content-Type…the hikvision cameras append a character set definition:
HTTP/1.1 200 OK
Content-Type: image/jpeg; charset="UTF-8"
vs just a simple image/jpeg…I’m thinking they might be trying to match on that i.e. ^Content-Type: image/jpeg$ or something similar.
You may be right, the outputMsgToS3 method appears to be a CoreAPI method I’m taking advantage of.
It might be only parsing that…
You could try sending in the headers a Request Content-Type for only jpeg…
Another thing occurred to me, the hikvision is replying with http/1.1 where as the cam I have that’s working is 1.0, can someone else verify the headers from cams they have that are working please? Specifying requested Content-Type didn’t change anything, I didn’t expect much from a FW based web server, not to mention the response header is valid.
Being as I am a newb to the SmartThings community, is there a way to try to get someone from ST to comment on the functionality of outputMsgToS3?
Originally as a test I setup a small script based “proxy” on one of my servers so I could manipulate the Content-Type header. Sure enough it worked. I followed by making the Content-Type the same and it still works. The image remains the same as I’m just streaming it through. While there are PLENTY of headers different in this setup, the only one that makes sense to me at this point is date. The working cam returns a date header as does the crazy proxy script, but hikvision doesn’t.
I was just going to say, “screw it” and just pipe the cameras through that, but the second camera plus throw an error and their images go into the carousel tile of the first…I’m pretty sure it’s a conspiracy. As I have a few of these Trendnet cams that are rebranded hikvisions and a few actual hikvisions, I’d love to get them integrated so I can easily take a burst on motion and have it all right there.
I’ve emailed support to try and get some clarity on how hubAction and specifically outputMsgToS3 work in this scenario. I’m thinking from the frequency I’ve seen a Smartthings person respond to forum messages that they’re still small enough to send my question to someone who writes the code.
I have a D-Link 932L that I used the “Generic Camera” code on.
I cannot see the camera on the ST app. The D-Link app works normally.
Just to clarify: I will not be able to see camera feed on Android, correct?
I think I have set it up correctly ~
IP = 192.168.0.20 port 80
I entered a dummy device ID of C1, assuming that the below ID will over right it.
This is from my log:
752a9660-74c8-4f48-86b7-2114d9f6fa9e 12:48:30 PM: debug GET /image/jpeg.cgi HTTP/1.1
752a9660-74c8-4f48-86b7-2114d9f6fa9e 12:48:30 PM: debug The method is GET
752a9660-74c8-4f48-86b7-2114d9f6fa9e 12:48:30 PM: debug The Header is
752a9660-74c8-4f48-86b7-2114d9f6fa9e 12:48:30 PM: debug Uses which method: Get
752a9660-74c8-4f48-86b7-2114d9f6fa9e 12:48:30 PM: debug Requires Auth: true
752a9660-74c8-4f48-86b7-2114d9f6fa9e 12:48:30 PM: debug path is: /image/jpeg.cgi
752a9660-74c8-4f48-86b7-2114d9f6fa9e 12:48:30 PM: debug The device id configured is:
752a9660-74c8-4f48-86b7-2114d9f6fa9e 12:48:30 PM: debug
752a9660-74c8-4f48-86b7-2114d9f6fa9e 12:48:30 PM: debug IP address entered is
Does this look correct?
Looks correct, please remove the Authorization lines from your post, that is your username and password.
You will be able to use the Take button in the Android app and see the image as long as you stay in the app thing.
Older photos are not accessible in android.
Everything looks right, if you go to the device and list events you should see images?
@pstuart, No images in the list events area. Nor do they come up on the ST app. I would like to be able to see the images on the ST app instead of using the D-Link app. This way I can remove the DL app off my cell. Is there a step I’m missing?
Thanks for the advice and help!!
@cathyth3, if you followed the instructions, and you have the browser url correct, not much more I can do for you.
Any errors in the console.log when trying to take a photo?
It looks like this is designed for cameras that use MJPEG for the video stream rather than H.264. Will this work with an H.264 Foscam camera like the ones in the 9000 series? I have one coming today and need to figure out which code to use.
@zj4x4, this devicetype has nothing to do with the video stream, since it uses the ability of a camera to serve up a static image at a url.
As long as you can get a url for the image, you can use this devicetype.
Smartthings does not have support for video streams at this point.
So I have this going, I think, but I’m not getting an image in the ST app. Here is the log from when I click the Take button.
99cf5e4e-4e1a-4d90-8170-1f54fe76bd55 11:16:45 AM: debug GET /cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=removed&pwd=removed HTTP/1.1
User-Agent: Linux UPnP/1.0 SmartThings
99cf5e4e-4e1a-4d90-8170-1f54fe76bd55 11:16:45 AM: debug The method is GET
99cf5e4e-4e1a-4d90-8170-1f54fe76bd55 11:16:45 AM: debug The Header is [HOST:10.0.0.10:443]
99cf5e4e-4e1a-4d90-8170-1f54fe76bd55 11:16:45 AM: debug Uses which method: GET
99cf5e4e-4e1a-4d90-8170-1f54fe76bd55 11:16:45 AM: debug Requires Auth: false
99cf5e4e-4e1a-4d90-8170-1f54fe76bd55 11:16:45 AM: debug path is: /cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=removed&pwd=removed
99cf5e4e-4e1a-4d90-8170-1f54fe76bd55 11:16:45 AM: debug The device id configured is: 0a00000a:01bb
99cf5e4e-4e1a-4d90-8170-1f54fe76bd55 11:16:45 AM: debug 01bb
99cf5e4e-4e1a-4d90-8170-1f54fe76bd55 11:16:45 AM: debug IP address entered is 10.0.0.10 and the converted hex code is 0a00000a
No errors in the log at all but it’s not working. Any ideas? The camera is a Foscam 9804 and the snapshot URL works great from a browser.