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

I’m starting to think there is something different about the Foscam 9804 which causes both this device type and the one that @skp19 has written to not work properly. With both of them the camera reboots itself when I click the “Take” button. Manually browsing to the snapshot URL always works.

Any ideas on how to troubleshoot this? The log on the camera is completely useless.

Update: Changing from the SSL port to a non-SSL port fixed the reboot issue but snapshots still don’t work.

This worked PERFECTLY with a Sercom 821 and a 10.x address.
MANY thanks for saving me a ton of cash !****

Question: Is there some code already out there that lets me take a pic when an event happens ?
I’m looking to be able to say “when this contact opens, take a pic”. I have the code already to page and such when the contact opens, I’m just missing the command to execute a pic.

Again, thank you SO MUCH for the camera device code.

  • Brian

I just wanted to say thanks to everyone for their work on these plugins. I was able to setup both a knock off foscam fi8918w inverted/reverse no less, and a couple of Trendnet TV- IP551W in under an hour with everyone’s posting and instructions.

So the cameras work, I’m getting images etc… except on my wife’s iPhone. Serious issues as you can imagine.

The main Graph account setup is in my name and on my account. My wife uses a separate account for her ST access so that we can use the presence features on each iPhone. No issues there.

This is the first Graph extended device type I’ve create, so while she gets object blobs in her Things Dashboard (i.e. I she sees that there is a device), she does not see the device type icon (a camera icon in this case), nor when you pull up the devices does she get any of the device type attributes (i.e. option to click Take, or use the PTZ controls for the Foscams).

I’ve looked through the Graph interface and I can see where my account is linked to the hub, but there does not appear to be an option to enter her account, so my guess is that’s the underlying issue. Just looking for others with experience using extensions like these an multiple accounts. Does this work yet, or is it an area we are all still waiting on?

Cheers, and thanks again!

Does anyone have an Axis camera. My web link is like this http://mycam.axiscam.net:9000/view/viewer_index.shtml?id=62

From here i can watch a live stream but i tried this for path /view/viewer_index.shtm and use Auth true
but it does not capture any image anything im doing wrong?

The camera is a http://www.amazon.com/P5512-E-Surveillance-Network-Camera-Monochrome/dp/B0058IDDMQ
and i am running the AXIS Internet Dynamic DNS Service

I am using the local ip 192.168.0.90 port 9000 path /view/viewer_index.shtml True GET username and password

@michaelalden,

You need a url / path to a single image from the camera, not a stream of video. Hopefully there is one.

I found this http://www.axis.com/files/manuals/vapix_video_streaming_52937_en_1307.pdf
does this help

I found this in the pdf

5.2.3.2 Bitmap image (snapshot) CGI request
Request a bitmap image with the specified properties.

Method: GET

Syntax:

http:///axis-cgi/bitmap/image.bmp
[?=[&=…]]
with the following parameters and values

= Values Description
resolution= 768x576, 4CIF, 704x576, 704x480, VGA, 640x480, 2CIFEXP, 2CIF, 704x288, 704x240, 480x360, CIF, 384x288, 352x288, 352x240, 320x240, 240x180, QCIF, 192x144, 176x144, 176x120, 160x120 1 Specifies the resolution as times number of pixels of the returned image.
camera= 1 … 41
quad1 The camera source.
Applies only to video servers with more than one video input.

squarepixel= 0, 1 Enable/disable square pixel correction.
Applies only to video servers.

1 Product-dependent. See the product’s specification.

Example: Request a bitmap image from camera 1 with a resolution of 320x240.

http://myserver/axis-cgi/bitmap/image.bmp?resolution=320x240&camera=1

Okay good news http://mycam.axiscam.net:9000/axis-cgi/bitmap/image.bmp? Does shoot out an image from the website but smarthings doesnt show it. I tried this for the path /axis-cgi/bitmap/image.bmp?

here is information from Insepecting object

Request URL:http://aldencam.axiscam.net:9000/language/default/language_platoon.xml?timestamp=1412373349504
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:/
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Authorization:Digest username=“root”, realm=“AXIS_00408”, nonce=“00091375Y5691429295f563e2ba10ea9fabfacda4f3593”, uri="/language/default/language_platoon.xml?timestamp=1412373349504", response=“3898e1d30247753c139d843288d30901”, qop=auth, nc=00000017, cnonce=“f012c61bc41bea34"
Cache-Control:max-age=0
Connection:keep-alive
Host:aldencam.axiscam.net:9000
Referer:http://aldencam.axiscam.net:9000/view/snapshot.shtml?picturepath=/jpg/1/image.jpg
User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
Query String Parametersview sourceview URL encoded
timestamp:1412373349504
Response Headersview source
Accept-Ranges:bytes
Authentication-Info:qop=auth, rspauth=0cca79918b91163c6”, cnonce=“f012c61bc41bea34”, nc=00000017
Connection:close
Content-Length:5455
Content-Type:application/xml
Date:Fri, 17 Aug 2001 14:08:49 GMT
Last-Modified:Thu, 18 Apr 2013 06:51:59 GMT

@mmlabelle I would try logging out and back in on her phone and/or killing the app and restarting. Sometimes it doesn’t refresh new items without doing truly resetting the app in one of these ways.

Anyone use this on a q-see camera. Been having trouble to get it to work. Can grt access on home web browser direct via Ip address with name and password. Can’t seem to get the right image path I assume. Or maybe it does not have this function. It’s a nvr with 4 cameras if that helps anyone. Thanks!!

@swanny Thanks for the tip, but unfortunately that is one of the first steps I take when troubleshooting the app. Logout, reboot everything including the hub and log back in.

Can you / or anyone for that matter, confirm that it is possible to have a camera device work on multiple accounts even if the 2nd account is not registered in the graphs.api interface?

To confirm, on my wife’s phone she has “unknown” tiles that do not have the right attributes (i.e. they show up as unknown, and are not usable/configurable when you click the gear icon). All she sees is the SmartApps, Activity and Preferences tiles when you go in to configure, none of the device specific attributes (take, PTZ controls etc).

Thanks

@mmlabelle I do have a camera device that works on both my phone and my wife’s phone. It isn’t this same device type though, so I don’t know if there is some kind of device type specific issue.

When you say registered with the graphs.api interface, do you mean appearing in the “Locations List” in the IDE? My wife has her phone linked to the account for presence like you said, but she does not appear in the “Locations List” either. That may not be related.

Have you tried contacting support?

Is there a simple way to have ST hub detect a generic P2P IP camera connected to my network? The camera works great separately using its own app on my phone, but if only I could have ST access the Alerts from camera and get an image scrub and a way to have ST app detect and connect to my camera.

1 Like

Does anyone else have an issue with an iPhone using Patrick’s code as of 10 days ago ?
This worked great 10 days ago, but now an IOS update and a Smart things update later, it’s not working.

My Sercom is still on line with the same IP ( 10.0.1.92 ), using a browser to read it is fine.

The IDE live log sees the command being sent, but the iPhone shows “TAKING” and never clears up.

Any ideas ?

Here’s the log showing the event.


9626367b-5459-43e9-b355-cb09bfa03c10 12:52:59 PM EDT: debug Parsing 'index:01, mac:00C0020CC627, ip:0A00015C, port:0050, headers:SFRUUC8xLjAgMjAwIE9LDQpDYWNoZS1Db250cm9sOiBuby1jYWNoZQ0KUHJhZ21hOiBuby1jYWNoZQ0KRXhwaXJlczogTW9uLCAwNiBKYW4gMTk5MCAwMDowMDowMSBHTVQNCkNvbnRlbnQtdHlwZTogaW1hZ2UvanBlZw0KQ29udGVudC1sZW5ndGg6IDM5MTEyDQpDb25uZWN0aW9uOiBjbG9zZQ=='
9626367b-5459-43e9-b355-cb09bfa03c10 12:52:58 PM EDT: debug GET /img/snapshot.cgi?size=3 HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 10.0.1.92:80

9626367b-5459-43e9-b355-cb09bfa03c10 12:52:58 PM EDT: debug The method is GET
9626367b-5459-43e9-b355-cb09bfa03c10 12:52:58 PM EDT: debug The Header is [HOST:10.0.1.92:80]
9626367b-5459-43e9-b355-cb09bfa03c10 12:52:58 PM EDT: debug Uses which method: GET
9626367b-5459-43e9-b355-cb09bfa03c10 12:52:58 PM EDT: debug Requires Auth: false
9626367b-5459-43e9-b355-cb09bfa03c10 12:52:58 PM EDT: debug path is: /img/snapshot.cgi?size=3
9626367b-5459-43e9-b355-cb09bfa03c10 12:52:58 PM EDT: debug The device id configured is: 0a00015c:0050
9626367b-5459-43e9-b355-cb09bfa03c10 12:52:58 PM EDT: debug 0050
9626367b-5459-43e9-b355-cb09bfa03c10 12:52:58 PM EDT: debug IP address entered is 10.0.1.92 and the converted hex code is 0a00015c

New install for me, but I am seeing the same problem @gorgas99 I have checked my settings and verified I can grab a snapshot with the url from my foscam.
When I click take snapshot I get “error: an unexpected error has occurred” from the things>device

Guys, buried on another project. No idea when I will be able to look at it. But it appears the AWS side broke. Which means the only camera side that could be working is the dropcam code.

If someone wants to take a look at that code and try it in mine, feel free…

patrick, any chance you’ve worked on this again? i really would like to get my other cams on here. i tried your code above and get nothing.

http://x.x.x.x:9001/en/mjpgmain.asp

that is the url I am using, no auth.

Hi All. I have a Foscasm FI9821W V2 and I’m trying to use the Device Type code from @pstuart . How can I determine the value I should enter for Camera Path to Image? (I think I have the other Preference values figured out - I tried using the value Patrick listed - /SnapshotJPEG?Resolution=640x480&Quality=Clarity - but I’m not seeing an image in the app). Thanks!

@bjindrich
Bill, I have several Foscams, and the URLs are here.

http://www.ispyconnect.com/man.aspx?n=foscam

I was using this format for the FI9821W V2 though
http://IPADDRESS:PORT/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=[USERNAME]&pwd=[PASSWORD]

The default port is 88. That works for me.

1 Like

Thanks so much @thrash99er

I couldn’t get this working on my Windows Phone app, but I tried it on my Android tablet and it worked perfectly. (now I have another issue with the ST Windows Phone app to report)

Can I ask how you determined that URL format to use for the FI9821W V2