I’ve finally gotten around to rewriting my old Trendnet PTZ controller for Zoneminder 1.22.x to support the new API for Zoneminder 1.23.x. It includes all the old features (moving the camera in horizontally, vertically, diagonally, and going to preset and home position) as well as a new bonus feature: move the camera simply by clicking a point in the live video that you want the camera to recenter on. This is not extremely accurate, but good enough for most uses, and faster than having to click an arrow 20 times.
Here’s the basic steps on how to get this Trendnet TV-IP400 / IV-IP400W driver to work in ZoneMinder:
- Make sure you have indeed version 1.23.x. You can see this in the title of the main console window. If you are still using version 1.22.x, either upgrade your ZoneMinder or use my old driver.
- Download the driver file here, and store it in the right directory. For me (having compiled Zoneminder from source on ubuntu) that location is /usr/local/perl/5.8.8/ZoneMinder/control. If that location doesn’t exist on your system, you can do a search for another camera driver such as Visca.pm and store the TVIP400.pm file in the same location.
- Create a new camera for your TV-IP400 if you haven’t already done so. The source tab looks something like this:

Make sure you change the IP address and port number if necessary. You will need to make sure that access control is turned off by the way.
If you had enabled the ZM_OPT_CONTROL setting in the system options screen, you will also see a control tab in the camera config window. This tab should look like this:

Again, make sure you set the correct IP address (the same as what you set in the source tab). You won’t have a TV-IP400 option yet in the Control Type dropdown, so click on ‘edit’ there and let’s create one.
In the Control Capabilities window, click ‘Add New Control’. Then set the settings in the Main and Move tabs as follows:


In the Pan tab, only check the ‘Can Pan’ option and leave the rest blank.
In the Tilt tab, only check the ‘Can Tilt’ option.
All options in the Zoom, Focus, White and Iris tabs can be left blank since none of these features are supported.
The Presets tab should be set as follows:

Though you can’t actually set presets through ZoneMinder, you can move the camera to presets that you’ve configured through the Trendnet web interface. I’m only using 5 presets but I believe you could access all 24 presets that the Trendnet supports.
That’s all! Save the configuration, and give your new controllable camera a spin in ZoneMinder. Let me know how you like it.
Thanks to Armando Oritz for his help in testing this driver.
September 22nd, 2008 on 9:14 am
I am unable to get a screen other than black on the video input. Does this have to do with ffmpeg? Ive tried other distros/reloading/livecd. Still the same. I have the TV-IP400 and upgraded it to latest firmware also. Am i missing something?
September 22nd, 2008 on 9:25 am
if you don’t get any video, you might want to try disabling the option ZM_NETCAM_REGEXPS in the option panels. This apparently fixed the issue for several other people in the ZoneMinder forums.
September 22nd, 2008 on 11:28 am
Sorry to be a pest. I believe i have all the other bugs worked out but the control doesnt work. I have the file in the correct location and ran chmod 775 on the file. At a loss it doesnt work via clicking arrows or the image.
Thanks a ton for your help.
September 22nd, 2008 on 12:16 pm
are you seeing the controls in the ZM video page at all? If so, double check that you have access control turned off on your TV-IP400. If you set all the properties as I’m suggesting above it should work. Actually, just went through my notes and remembered that I had to install PHP::Serialization (with CPAN) on my Ubuntu distro. Appeared to be a new dependency required for the latest ZM. So double check that you have that lib installed, and check your log files for any specific error messages…
September 25th, 2008 on 8:44 pm
Hi Peter, thank you very much for another wonderful contribution to the ZM community. I’ve just set up the driver on a 1.23.x ZM, and it seems to be working. However, after moving the camera and returning to the camera view, the image doesn’t refresh anymore. Any ideas on what may be causing this? The only woraround i’ve found so far is to uncheck the “controllable” option, and then the live image starts to refresh normally. Before this, I had this same camera working on a 1.22.x ZM with your old driver, and never had a single problem. I’m not sure if it is just a browser issue (the problem i’ve described happens both on FF and on IE using the Cambozola Java applet).
October 10th, 2008 on 5:41 am
This control work with TV-IP422W model?
October 15th, 2008 on 1:36 pm
No it doesn’t, as it’s running completely different firmware. There’s a thread on the Zoneminder forums about this camera though: http://www.zoneminder.com/forums/viewtopic.php?p=42758&sid=598875ff3a87d15ba62379ca4b0b99c4
October 27th, 2008 on 1:54 pm
tks
November 2nd, 2008 on 10:07 am
Alex, I haven’t seen the problem you’re mentioning here. I’ve never used the Cambozola applet… it may be related to a problem with that applet. In any case it sounds like it may be a bug in ZoneMinder… I would search the Zoneminder forums or post a message there if you can’t find the solution there either…
January 3rd, 2009 on 3:48 pm
I should have asked first, but I’ve ordered one of these devices in the hopes that your walk-through will work with the newest 1.24 RC1. Would it be safe to assume it’s going to work?
January 21st, 2010 on 8:27 am
Aaron,
I have tried it on v1.24.x without any luck. There may be some differences from 1.23 and 1.24 that may cause issues.
I am a newbee, so I am not the best source of info.
BTW, the video quality of the trendnet 400 sucks.
Joe
January 22nd, 2010 on 5:59 am
Aaron: I was just trying this with 1.24.1 and it does not seem to work. The TVIP400 driver does not show up in the “Control Type” list.
January 27th, 2010 on 7:08 pm
Any change on ZM 1.24.x support?
February 23rd, 2010 on 1:56 pm
Yes! This drive does work with 1.24.1 !
January 13th, 2011 on 1:23 pm
Clean install of Ubuntu 10.10 and zoneminder installed via Software Center GUI. Watching logs, install looked OK. PHP Serialization already appears installed. I have the TV-IP400 driver working well enough to see video but cannot pan/tilt. Followed your instructions verbatim for setting up the driver. I can see the pan tilt control arrows below the video but when I try to pan or tilt the error on screen is ” Control response was status = undefined ” message=/usr/bin/zmcontrol.pl-panstep=0command=moveRe(Right-id=1=>.
Syslog says: zmcontrol[PID] INF..Control server starting… zmcontrol[PID]FAT Can’t connect no such file or dir…
Any suggestions?
January 16th, 2011 on 3:06 pm
Got it – filename issue and file missing
August 5th, 2011 on 10:05 am
@Davis Computer ~ If you don’t mind, would you share your resolution? I get the same error. Which filename was missing and what other filename issue was it?
Thanks!
August 10th, 2011 on 1:17 am
I have not used Linux before, but a friend will help with the setup of that. I’m thinking of using Ubuntu and Zoneminder rather than the IE on $indows to run my 8 IP cameras, but I’m looking for suggestions from those of you who know these programs. Most of my cameras are Trendnet (TV-IP410, TV-IP422W, TV-IP501W, TV-IP501P, and TV-IP512P). The TV-IP422W and TV-IP410 have PTZ. All but the TV-IP410 have either 1 way audio or 2 way audio. Can you tell me if the PTZ and audio will work with this setup? Thanks…
December 21st, 2011 on 11:08 am
Hi !
Thx Peter for the drivers !
I have been using your old driver for my old Ubuntu server with great luck. Never a probem.
The problem arrived when I did a new installation in my server soft.
Using now Ubuntu 11.10
Installed Zoneminder from GUI, no failure and started straight away as it should.
I installed your new driver for the TV-IP400W as you have described.
Seems like its not working properly, but it can be something else that is wrong too.
I cant get in touch with the camera.
I can insert all driver details, all the rest as you described, but still no picture and contrl.
The IP adress is red marked, so I dont think Im in contact with the camera at all.
Checked IP and all, it works from windows with the same IP.
Any good tips here ?
@Stu, how did you set yours up, as I can see you got it up ok. ?
Have a nice Christmas from Norway
@
October 3rd, 2012 on 4:34 pm
I just have a new installation of 1.25 on Ubuntu 12.04 and have video working without a glitch. The cameras are running firmware version 3.47 with no usernames or passwords.
When it comes to PTZ I always get the following two errors:
Message: /usr/bin/zmcontrol.pl –panstep=0 –command=moveRelRight –id=1=>
File: /usr/share/zoneminder/includes/functions.php
Line: 2322
FAT
Message: Can’t connect: No such file or directory
File: zmcontrol.pl
I checked the files and made sure that the permissions were all 755. Am I missing something here?