Page 1 of 1

Trendnet TV-IP672PI pan/tilt controls

Posted: Mon Apr 21, 2014 8:08 pm
by captainarcain
Hey there,

Running ZM Ver. 1.2.7 with the Trendnet TV-IP672PI. Do any of the default control scripts work with this camera? If not, is there one floating around out there? I've been searching Google like a madman and haven't found anything.

Has anyone gotten the pan/tilt controls to work with this thing?

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Thu Apr 24, 2014 5:45 pm
by captainarcain
Oooookaaaay,

Not seeing a lot of action on this one. Anyone interested in maybe helping me make a script for this if there isn't one already?

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Sun Apr 27, 2014 7:47 pm
by TheKorn
I have the TV-IP672PI working perfectly with 1.26, including IR on/off/auto. Haven't upgraded to 1.27 yet, but will be doing so shortly. So I'd say if you can hang on a bit until I get my upgrade situation resolved, I'd be happy to share!

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Mon Apr 28, 2014 4:55 pm
by captainarcain
Hah! And JUST as I was plowing through the control scripts and using wireshark to record the commands too :) That's awesome!

If you can get this working, it'd be a huge load off my back. I thank you, Sir! Hell, I'd even be happy to add to the functionality if I can (or if need be). I think I understand what the control scripts are doing now, so I'm going to tinker as well.

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Mon Apr 28, 2014 5:51 pm
by TheKorn
That's always the best way to learn! The real PITA with the TV-IP672PI was that it requires both digest authentication and a post for PTZ, which is a combination I couldn't find in any control script I looked at. So I kind of ass-backwards learned how to do that in perl along the way, which isn't such a horrible thing when you get right down to it. :)

I have a handle on my upgrade problem and hopefully will be upgrading later today. Fingers crossed, and such.

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Tue Apr 29, 2014 4:40 pm
by TheKorn
Got my upgrade done successfully, and quickly tested out my script under 1.27, seems no changes are necessary for 1.27. So I added it to the wiki.

I intend to use zmcamtool to add it to the official zoneminder PTZ repository, along with a few other PTZ scripts I've written.

Let me know how you make out! Was a royal PITA getting IR & presets working, but glad I went through it!

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Wed Apr 30, 2014 4:43 pm
by captainarcain
#1. You totally f**king rock.

#2. I sense now that I have another issue:

Error:

Control response was status = undefined
message = /usr/bin/zmcontrol.pl --tiltstep=0 --command=moveRelDown --id=2=>

Syslog:

Apr 30 12:30:59 zoneminder zmcontrol[676]: INF [Starting control server 2/672pi]
Apr 30 12:30:59 zoneminder zmcontrol[679]: INF [Control server 2/672pi starting at 14/04/30 12:30:59]
Apr 30 12:31:09 zoneminder zmcontrol[676]: FAT [Can't connect: No such file or directory]
Apr 30 12:31:09 zoneminder web_php[465]: ERR [/usr/bin/zmcontrol.pl --tiltstep=0 --command=moveRelUp --id=2=>]


#3. I believe I can add the RESET function to the script as well. Provided, that is, that I can get it to work.

So, yes; I've checked the file permissions in the /Zoneminder/Control/ directory. Checked and rechecked the control configurations and script names, etc. Possibly you've experienced a similar error?

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Wed Apr 30, 2014 6:25 pm
by captainarcain
I believe the following code should work for rebooting the whole camera.

sub cameraReset
{
# Reboot the Camera

my $self=shift;
my $url = "/eng/admin/reboot.cgi";
my $cmd = "reboot=true";

Debug("Camera Reboot");

$self->sendCmdPost ($url,$cmd);
}

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Thu May 01, 2014 12:46 am
by TheKorn
Well, I'd start by turning on debugging for zmcontrol, and seeing what gets put in the debug logs. (I put in a lot of debug statements, so you should get at least *something* if the script is running.)

If that doesn't illuminate anything, since you mentioned wireshark I'd sniff the connection between the camera and zoneminder, see what's being sent/received. My hunch is that nothing is being sent at all. (Filter by port 80 so you don't accidentally sniff the video traffic. ;) )

Finally, double check and make sure the protocol is TVIP672 when you were editing the control capabilities. I have a hunch you called it 672pi, which wouldn't match the specified internal name. (Take a screenshot of your control capability screen, just for giggles. :D )

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Thu May 01, 2014 12:48 am
by TheKorn
Oh yeah, while a reset button would be useful, currently I'm using the reset button as "ir auto". If you can think of a handy place to put reset (or a better/less hacky place for IR On/Off/Auto), I'm all ears! (I tend to dink with IR settings a lot more often than I need to reset my cameras! :D)

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Thu May 01, 2014 4:09 pm
by captainarcain
Yeah, there's no data being sent from the ZM server outward. The zmcontrol.pl script is grousing about tiltstep and moveRelRight (or whatever direction) as being undefined. I believe that it's just not seeing the TVIP672PI script; which I renamed to be "Trendnet_TVPI672PI.pm" and made the appropriate changes in the script it's self under:

package Zoneminder::Control::Trendnet_TVIP672PI;

Also made the changes in the Control Capability section under "Protocol" to Trendnet_TVIP672PI as well. Maybe I'm missing some kind of dynamic link?

As for the IR presets - I think it might be more useful (since this particular camera doesn't have the function anyway) that moving the IR functions to the Iris section, EG:

irisRelOpen, irisRelClose, IrisAuto.

This way you're not taking away anything that wasn't already there. :)

Hell, if we're feeling REALLY energetic about it, we could sub out the zoom and focus functions for brightness and contrast adjustments. ;)

I really wish they'd update the wiki with the newest script nomenclature. That'd be super handy.

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Fri May 02, 2014 4:03 am
by TheKorn
captainarcain wrote:Yeah, there's no data being sent from the ZM server outward. The zmcontrol.pl script is grousing about tiltstep and moveRelRight (or whatever direction) as being undefined. I believe that it's just not seeing the TVIP672PI script; which I renamed to be "Trendnet_TVPI672PI.pm" and made the appropriate changes in the script it's self under:

package Zoneminder::Control::Trendnet_TVIP672PI;

Also made the changes in the Control Capability section under "Protocol" to Trendnet_TVIP672PI as well. Maybe I'm missing some kind of dynamic link?
I think you're hitting a bug that I hit a while ago when utahjarhead and I were banging out the script for the d-link dcs-5010/5020. There, the script at some point was renamed dcs-5010 and pretty much everything broke. Once the protocol wad renamed to dcs5010, everything came right back up. So it's worth a shot renaming it without the underscore (not sure if there is a length limit as well) and give it a go.
As for the IR presets - I think it might be more useful (since this particular camera doesn't have the function anyway) that moving the IR functions to the Iris section, EG:

irisRelOpen, irisRelClose, IrisAuto.

This way you're not taking away anything that wasn't already there. :)
Good suggestion! I think I'll do that when I get back in town.
Hell, if we're feeling REALLY energetic about it, we could sub out the zoom and focus functions for brightness and contrast adjustments. ;)
I think I might leave that one for you. Not a bad idea, just not something I mess with, well, ever. :) (Once I set the camera, that's pretty much it!)

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Tue May 06, 2014 4:31 pm
by captainarcain
Well, tried renaming it to simply TVIP672PI with appropriate changes to the script and configuration with no luck.

2014-05-06 12:20:14.342200 zmcontrol 18721 INF Starting control server 4/TVIP672PI zmcontrol.pl

2014-05-06 12:20:24.380240 zmcontrol 18721 FAT Can't connect: No such file or directory zmcontrol.pl

Still searching google to see what's up with this. I'll let you know if I find anything.

Also, thank you, thank you, thank you, thank you for all the help. I am in your debt.

Re: Trendnet TV-IP672PI pan/tilt controls

Posted: Tue May 06, 2014 10:37 pm
by TheKorn
Seems like zm can't find the control script. I'd probably turn on debugging for zmcontrol just to dot the i and cross the t, and if nothing jumped out at me I'd completely nuke the 672 stuff and try it again from scratch.