Page 1 of 1

Digest authentication? (script for Trendnet TV-IP672PI)

Posted: Wed Sep 04, 2013 8:32 pm
by TheKorn
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!

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

Posted: Wed Sep 04, 2013 8:42 pm
by knight-of-ni
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

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

Posted: Wed Sep 04, 2013 8:58 pm
by TheKorn
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

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

Posted: Thu Sep 05, 2013 12:36 am
by knight-of-ni
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:
http://www.zoneminder.com/forums/viewto ... =9&t=21218

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

Posted: Fri Sep 06, 2013 5:52 pm
by TheKorn
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:
http://www.zoneminder.com/forums/viewto ... =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.