Digest authentication? (script for Trendnet TV-IP672PI)

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
TheKorn
Posts: 135
Joined: Fri Aug 02, 2013 12:39 pm

Digest authentication? (script for Trendnet TV-IP672PI)

Postby TheKorn » Wed Sep 04, 2013 8:32 pm

So after successfully creating a control script for my TV-IP651, figured I'd take a crack at making one for my TV-IP672. Natch, they're completely different. Time to break out wireshark.

Long story short, I have it boiled down so that if you execute the following curl command, the camera will move to the left:

Code: Select all

curl --digest -u "username:password" "http://ip.address/cgi/ptdc.cgi?command=set_relative_pos&posX=-10&posY=0"


But I'm having a problem trying to figure out how to hack that into a zoneminder control script. Specifically, I can't quite figure out if zoneminder supports digest authentication, which this camera requires for movement commands. You can get video with regular (in the clear) authentication, but for some reason pointing the camera a different direction requires digest authentication. (Go figure!) If you drop the --digest option, the curl request will fail with a 401 unauthorized message every time.

SO... anybody have any snappy ideas on how to do this, or an example I could look at?

Thanks much!

User avatar
knnniggett
Posts: 1415
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Digest authentication? (script for Trendnet TV-IP672PI)

Postby knnniggett » Wed Sep 04, 2013 8:42 pm

zoneminder does not currently support digest authentication.

It has been previsouly added to the issues list on github:
https://github.com/ZoneMinder/ZoneMinder/issues/30
I only respond to technical support requests through forum topics. Please do not pm support requests to me.

Using the ESP8266 WiFi chip as an external trigger source.
http://zmtrigger.blogspot.com/

TheKorn
Posts: 135
Joined: Fri Aug 02, 2013 12:39 pm

Re: Digest authentication? (script for Trendnet TV-IP672PI)

Postby TheKorn » Wed Sep 04, 2013 8:58 pm

knnniggett wrote:zoneminder does not currently support digest authentication.

It has been previsouly added to the issues list on github:
https://github.com/ZoneMinder/ZoneMinder/issues/30

Well, I guess that kills this control script dead! Thanks for the info. If zoneminder adds support for it in the future, maybe someone can pick up the ball where I left it. Had to chuckle to myself at the suggestion of using libcurl! :D

User avatar
knnniggett
Posts: 1415
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Digest authentication? (script for Trendnet TV-IP672PI)

Postby knnniggett » Thu Sep 05, 2013 12:36 am

Oh you know what, I apologize. I should have read your post more closely. One cannot retrieve a video stream via digest authentication. However, ptz control is done via a Perl module which means one can do just about anything. For starters, take a look at how christophe_y2k's perl script handles authentication for the FI8620. It uses LWP::UserAgent, which does support digest authentication.

You will have to scroll down a ways to get to the script:
viewtopic.php?f=9&t=21218
I only respond to technical support requests through forum topics. Please do not pm support requests to me.

Using the ESP8266 WiFi chip as an external trigger source.
http://zmtrigger.blogspot.com/

TheKorn
Posts: 135
Joined: Fri Aug 02, 2013 12:39 pm

Re: Digest authentication? (script for Trendnet TV-IP672PI)

Postby TheKorn » Fri Sep 06, 2013 5:52 pm

knnniggett wrote:Oh you know what, I apologize. I should have read your post more closely. One cannot retrieve a video stream via digest authentication. However, ptz control is done via a Perl module which means one can do just about anything. For starters, take a look at how christophe_y2k's perl script handles authentication for the FI8620. It uses LWP::UserAgent, which does support digest authentication.

You will have to scroll down a ways to get to the script:
viewtopic.php?f=9&t=21218

Hey that's OK, everybody makes mistakes. Thanks for the point in the right direction! I'll take a look and hopefully be able to hack something together at some point.


Return to “User Contributions”

Who is online

Users browsing this forum: No registered users and 1 guest