IPCC MPO720W

Pulled this out of my post on adding a camera (IPCC MPO720W) Found out that vera is sending name/password as part of url.
Camera does not handle authentication that way. Sniffed packets on IP Cam viewer on my Android phone and
saw that it talks very differently to the camera. Below are snippets from Vera to camera, and my android phone (which
works with the camera).

I am sure this is not the only camera that handles authentication this way. Where can I tell vera to use a different method
to authenticate. I am on ui5 and trying to add a camera via the gui ends up with nothing. Added this one through the manual method, so I may have screwed up from the start.

10 11/22/13 19:46:53.756 Generic_IP_Camera_Manager::REQ_Image diff1:3121152 diff2:3121152 timeout:10 starting http://10.144.144.11/tmpfs/auto.jpg user:XXXX pass:XXXXX <0x2d7bf680>

02 11/22/13 18:12:12.087 Generic_IP_Camera_Manager::ReturnImage /etc/cmh-lu/bad_auth.jpg=6657 <0x2e141680>
02 11/22/13 18:12:12.329 write_data_header aborting with 0/401 0x48 0x54 0x54 0x50 0x2f 0x31 0x2e 0x31 0x20 0x34 0x30 0x31 0x20 0x55 0x6e 0x61 0x75 0x74 0x68 0x6f 0x72 0x69 0x7a 0x65 0x64 0xd 0xa (HTTP/1.1 401 Unauthorized\r\n) <0x2e141680>

and camera throws back a 401 Unauthorized…

So its passing user and password on command line, looks like the camera does not handle this kind of authentication.

I am no expert how vera is told to try to authenticate to a camera, but seems I need to use some alternative method.

I captured this from my ipcam app on my android talking to the camera directly… its using 'basic access authentication where name/password are encoded in the Auth Basic string and passed to the camera that way from the android… this is what I need to do on vera, anyone point me in a direction as to what needs to be done here?

GET /tmpfs/auto.jpg HTTP/1.0
Host: *******
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1)
Accept: /
Referer: http:****************/tmpfs/auto.jpg
Connection: close
Authorization: Basic *********************=

LuaUPnP passes the username and password using:

curl_easy_setopt(curl, CURLOPT_USERNAME, username); curl_easy_setopt(curl, CURLOPT_PASSWORD, password);
which are sent as Basic HTTP Authentication.

This is the only method of authentication supported by LuaUPnP in UI5.

So any camera that can’t take name & password as options in the URL to it is not going to work with vera?

You could modify the snapshot URL by adding the username and password as arguments. For example, VistaCam HD doesn’t support basic HTTP authentication either, the credentials must be added as arguments in the URL like this: http://CAMERA_IP/cgi-bin/snapshot.cgi?user=USERNAME&pwd=PASSWORD
So we set the snapshot and streaming URLs to have the credentials too.

Check your camera’s manual, or find how the authentication is made for your camera using your browser’s web developer console or FireBug, and set the snapshot URL as required.

I am confused…

You can see that when passed username and password as you describe on the url its throwing a 401 not authorized…

Yet when using http “Basic Authorization” in another capture of an android ipcam app that does talk , that works just fine…

See it in the capture when its talking to an IPCAM app on Android… (bottom of first post).
Authorization: Basic *********************= (where the *** are base 64 encoded name/password )

That is HTTP Digest Authentication, which is not supported by Vera in UI5 (we added support for Digest Auth in UI6). If the camera supports authentication by passing the credentials in the URL, you can use that, otherwise I’m afraid it’s not possible to use the camera with Vera without a plugin. Maybe someone else knows of a workaround to make the camera work with Vera…

@mcvflorin

Sounds good, thanks for explaining…

I know enough about this subject to break things and get in trouble. :wink:

Okay, I am reviving this old thread… I am now on latest UI7 on a Vera3. Still no luck with my camera.
Its an IPCC MPO720W.

The only way I have been able to get an image with a single URL is
http://username:password@ipaddress/tmpfs/snap.jpg

Camera does support ONVIF and live video works fine with my Android
The auto detect on the Android app found that it responds like a Convision CC-6400 (RTSP) works great for live video.

Seems the generic ip camera add in UI7 still wants to pass the name/password on the right side of the url instead of before the ip address if you know what I mean.

Any ideas on what I can tweak or try?