Trendnet TV-IP410 pan and tilt control

Forum for questions and support relating to the 1.24.x releases only.
Locked
SneakyPete
Posts: 16
Joined: Sat May 30, 2009 11:58 pm
Location: Central Time USA

Trendnet TV-IP410 pan and tilt control

Post by SneakyPete »

I held out on creating this issue in order to try to resolve this on my own, but I've gone through 5 days with no solution. The cameras are fullly functional from the web browser interface.

I have 2 cameras on my network at this time. One camera has most of its default settings to simplify for testing. Admin account has admin password, port 80, etc.

I cannot get the test camera to be controllable. I discovered that the IP410 is similar to the Airlink SkyIPCam according to research done by user "Setarcos". I followed his instructions but could not get the camera to pan or tilt.

I've attempted to troubleshoot via looking at my error logs, but I cannot decipher what some of the errors mean. I've Googled many of them, but some are either too common or non existent. Yes, I am a noob with linux, but I love working with this stuff so it doesn't bother me to know more an more with every speed bump or brick wall I hit.

I followed the Ubuntu Vanilla 32Bit procedure with a few alterations in order to function with desired settings for ffmpeg and for running on 64Bit OS and for use of ffmpeg in other applications. The alterations I performed were derived from this site along with these changes:
x264:
(Failure to perform this step resulted in make error in ffmpeg)
./configure --enable-pic --enable-shared
ffmpeg:
./configure --enable-gpl --enable-shared --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid

I do believe that I had to execute:
ldconfig
(Prior to make make call of zoneminder for ffmpeg)
Here is the info and logs necessary for troubleshooting:
OS = Ubuntu AMD64 9.04 desktop
Phenom CPU
4 GB RAM

Zoneminder Console settings:
Control Tab:
Controllable: checked
Control device: blank
Control Address: tried many combinations, now set to admin:admin@172.16.16.202
Auto Stop Timeout: 0.0
Track Motion: unchecked
Track Delay: 0
Return Location: Home
Return Delay: 20

ZM Options:
OPT_CONTROL: checked

Logs (I have not turned on debugging yet):
#Edit; I didn't add this block as code previously as I should have.
zmaudit.log

Code: Select all

05/30/09 19:01:17.749694 zmaudit[3264].FAT [Can't execute: MySQL server has gone away]
zmcontrol.log

Code: Select all

05/30/09 18:47:36.576352 zmcontrol[4466].FAT [Can't connect: No such file or directory]
05/30/09 18:51:20.234270 zmcontrol[4991].INF [Starting control server 2/SkyIPCam7xx ]
05/30/09 18:51:20.235416 zmcontrol[4992].INF [Control server 2/SkyIPCam7xx  starting at 09/05/30 18:51:20]
05/30/09 18:51:30.236281 zmcontrol[4991].FAT [Can't connect: No such file or directory]
05/30/09 19:58:21.530826 zmcontrol[9735].INF [Starting control server 2/SkyIPCam7xx ]
05/30/09 19:58:21.531909 zmcontrol[9736].INF [Control server 2/SkyIPCam7xx  starting at 09/05/30 19:58:21]
05/30/09 19:58:31.532721 zmcontrol[9735].FAT [Can't connect: No such file or directory]
05/30/09 19:58:34.118142 zmcontrol[9738].INF [Starting control server 2/SkyIPCam7xx ]
05/30/09 19:58:34.119253 zmcontrol[9739].INF [Control server 2/SkyIPCam7xx  starting at 09/05/30 19:58:34]
05/30/09 19:58:44.120120 zmcontrol[9738].FAT [Can't connect: No such file or directory]
zmdc.log

Code: Select all

05/31/09 22:06:51.165181 zmdc[3228].ERR ['zmtrack.pl -m 1' exited abnormally, exit status 255]
05/31/09 22:14:46.366273 zmdc[3228].ERR ['zma -m 1' exited abnormally, exit status 214]
05/31/09 22:14:46.366446 zmdc[3228].INF [Starting pending process, zma -m 1]
05/31/09 22:14:46.366952 zmdc[3228].INF ['zma -m 1' starting at 09/05/31 22:14:46, pid = 24071]
05/31/09 22:16:51.098340 zmdc[3228].INF [Starting pending process, zmtrack.pl -m 1]
05/31/09 22:16:51.098994 zmdc[3228].INF ['zmtrack.pl -m 1' starting at 09/05/31 22:16:51, pid = 24382]
05/31/09 22:16:51.196474 zmdc[3228].ERR ['zmtrack.pl -m 1' exited abnormally, exit status 255]
05/31/09 22:26:51.090096 zmdc[3228].INF [Starting pending process, zmtrack.pl -m 1]
05/31/09 22:26:51.113744 zmdc[3228].INF ['zmtrack.pl -m 1' starting at 09/05/31 22:26:51, pid = 25361]
05/31/09 22:26:51.216770 zmdc[3228].ERR ['zmtrack.pl -m 1' exited abnormally, exit status 255]
tail: cannot open `zmdc.sock' for reading: No such device or address
zmfilter.log

Code: Select all

05/30/09 18:46:17.051419 zmfilter[3262].INF [Scanning for events]
05/30/09 18:52:22.159805 zmfilter[3262].FAT [Can't execute 'select * from Filters where Background = 1 and (AutoArchive = 1 or AutoVideo = 1 or AutoUpload = 1 or AutoEmail = 1 or AutoMessage = 1 or AutoExecute = 1 or AutoDelete = 1) order by Name': MySQL server has gone away]
05/30/09 18:52:22.287370 zmfilter[4994].INF [Scanning for events]
zmpkg.log

Code: Select all

05/30/09 18:46:12.483605 zmpkg[3218].INF [Command: start]
zmswap-m1

Code: Select all

tail: error reading `zmswap-m1': Is a directory
zmswap-m2

Code: Select all

tail: error reading `zmswap-m2': Is a directory
zmupdate.log

Code: Select all

05/31/09 03:46:17.847294 zmupdate[3269].INF [Checking for updates]
05/31/09 03:46:18.446940 zmupdate[3269].INF [Got version: '1.23.3']
zmwatch.log

Code: Select all

05/30/09 18:46:16.903877 zmwatch[3266].INF [Watchdog starting]
05/30/09 18:46:16.904049 zmwatch[3266].INF [Watchdog pausing for 30 seconds]
05/30/09 19:19:37.035789 zmwatch[3266].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
#Edit End
I appreciate any troubleshooting suggestions that will reveal what the problem is with my setup or with my configuration for controls. I'm thinking that I have not set permissions for specific files with "chmod". I have made these settings for permissions:
sudo chmod 4755 zmfix
sudo chmod 755 * (for contents of /usr/local/share/perl/5.10.0/ZoneMinder/Control)
sudo chmod 744 zmpkg.pl[/code]
I've taken the path of least resistance and it is sharp!
SneakyPete
Posts: 16
Joined: Sat May 30, 2009 11:58 pm
Location: Central Time USA

Post by SneakyPete »

I made a major change to try to stomp out at least one error. First I recalculated my settings for shmmax. Originally I had thought only 2 cameras for testing with lower than actual resolution and with no 10% fudge factor. I recalculated with the proper recommended formula:

Code: Select all

#kernel.shmmax = ((captureResolution)*(bitColor)*(frameRing)*(NumCameras) + (10%Overhead))
And derived an answer of :

Code: Select all

#kernel.shmmax = ((640*480)*(80)*(24)*(5)*(1.1)
kernel.shmmax = 3244032000
Which now should resolve this error at the least:

Code: Select all

05/30/09 19:19:37.035789 zmwatch[3266].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory] 
 
I looked up some of my other errors and I noticed that my msql database was prematurely killing itself or being told to kill itself. Indicated by this log:

Code: Select all

05/30/09 18:52:22.159805 zmfilter[3262].FAT [Can't execute 'select * from Filters where Background = 1 and (AutoArchive = 1 or AutoVideo = 1 or AutoUpload = 1 or AutoEmail = 1 or AutoMessage = 1 or AutoExecute = 1 or AutoDelete = 1) order by Name': MySQL server has gone away] 
Is that a global setting that can be removed in mysql? It seems the timeout can be set for more than the default of 8 hours, but can it be turned off indefinitely or just set for a timer. Can the timer be tickled to keep the database live?

Another error I just noticed that was not logged before started showing up after making the shared memory fix:

I searched this error and found only one possible relevant hit indicating that PHP was not configured correctly before calling make. I'm not running Gentoo like those discussing the topic, but this might apply to me. Here is the main highlight of that conversation:
Some cunning diagnostics revealed that line 844 of zm_actions.php calls the function socket_create().

This function is only available if you compile PHP with --enable-sockets (in Gentoo set the use flag "sockets").

On my system this was failing, and sure enough, I had compiled PHP without this option enabled.

Re-emerge php with sockets enabled, restart apache, and control works as expected.
Anyway, I'll look more into the PHP socket recompilation later. I'm happy at this point that the setup is stable and functional, but I would be beside myself if it were fully operational.
I've taken the path of least resistance and it is sharp!
SneakyPete
Posts: 16
Joined: Sat May 30, 2009 11:58 pm
Location: Central Time USA

Post by SneakyPete »

What perl scripts require Read, Write, or Execute privileges? I see this error listed:

Code: Select all

06/03/2009 19:26:49.110784 zmdc[29531].WAR [Can't find process with command of 'zmtrack.pl -m 1']
I found two instances of the file zmtrack.pl. I'm not sure which one is required to have execute privileges.

Code: Select all

/usr/local/bin/zmtrack.pl
or
/usr/src/zm/scripts/zmtrack.pl
I've taken the path of least resistance and it is sharp!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

To check to see if sockets is enabled in php:
php -i |grep Configure

You should see "--enable-sockets" in the configure line returned.
Like wise php -i |grep sockets should return a result of the configure line.

As for zmtrack.pl your second listing is your source location witch is expected. The executable used by the system is "/usr/local/bin/zmtrack.pl"
I would suspect that your permission are likely okay else it would complain about permissions. Look to syslog and/or messages log to see if you find any useful errors there. If not you may need to manually run zmtrack to find out why it is failing.

The mysql error is concerning, check the mysql log and make sure it is not crashing and check top to make sure that your system is not overloaded if mysql gets queued into a wait state, it my not answer in time.
SneakyPete
Posts: 16
Joined: Sat May 30, 2009 11:58 pm
Location: Central Time USA

Post by SneakyPete »

Thanks for pointing me in a path to follow for troubleshooting cordel. The command:
php -i | grep Configure
returned:
The program 'php' is currently not installed. You can install it by typing:
sudo apt-get install php5-cli
bash: php: command not found

So, I guess I somehow missed my php install or it was removed somehow in the past month or so before I started configuring my PTZ functions. I will install PHP and see how many errors clear then repost.
I've taken the path of least resistance and it is sharp!
SneakyPete
Posts: 16
Joined: Sat May 30, 2009 11:58 pm
Location: Central Time USA

Post by SneakyPete »

Viewingthe procedure I followed for installing Zoneminder I see that the necessary PHP component was not included in the "install prerequisites" step.
aptitude install build-essential linux-headers-`uname -r` automake perl libnet-ssleay-perl openssl libauthen-pam-perl \
libpam-runtime libio-pty-perl libmd5-perl apache2 php5-mysql libapache2-mod-php5 mysql-server libmysqlclient15-dev \
libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libjpeg62 libjpeg62-dev libmime-perl libstdc++6 libwww-perl \
zlib1g zip unzip patch ntp openssl libpcre3-dev libssl-dev libjpeg-progs libcurl4-gnutls-dev munin munin-node libmime-lite-perl \
netpbm libbz2-dev subversion sysvconfig checkinstall
That is information for those that have followed my same path and met failure head on. The corrective action so far has not been taken.
I've taken the path of least resistance and it is sharp!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

It would seem that in your selected distro it is installed as php5 and should have install as a dependency to a couple packages listed in the install line above.
SneakyPete
Posts: 16
Joined: Sat May 30, 2009 11:58 pm
Location: Central Time USA

Post by SneakyPete »

I stand corrected! Thanks cordel. Even so, after performing the command:

Code: Select all

sudo apt-get install php5-cli
I was able to run the command:

Code: Select all

php -i | grep Configure
The results were nothing expected or desired. I ran:

Code: Select all

php -i
instead and crawled through the pages to find this:

Code: Select all

sockets

Sockets Support => enabled
As for zmtrack.pl your second listing is your source location witch is expected. The executable used by the system is "/usr/local/bin/zmtrack.pl"
I would suspect that your permission are likely okay else it would complain about permissions. Look to syslog and/or messages log to see if you find any useful errors there. If not you may need to manually run zmtrack to find out why it is failing.

The mysql error is concerning, check the mysql log and make sure it is not crashing and check top to make sure that your system is not overloaded if mysql gets queued into a wait state, it my not answer in time.
Since it looks like PHP is properly installed and configured I will now look towards the other two recommendations to focus on for troubleshooting.
I've taken the path of least resistance and it is sharp!
SneakyPete
Posts: 16
Joined: Sat May 30, 2009 11:58 pm
Location: Central Time USA

Post by SneakyPete »

I don't feel hounded in this forum to keep the thread open like many other forums I've been involved in, but I feel the need to post that I'm currently moving and haven't found time to work on this issue at home. The thread is very much still alive and I'll continue posting once I have settled at the new location. Thanks.
I've taken the path of least resistance and it is sharp!
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

SneakyPete wrote:I don't feel hounded in this forum to keep the thread open like many other forums I've been involved in, but I feel the need to post that I'm currently moving and haven't found time to work on this issue at home. The thread is very much still alive and I'll continue posting once I have settled at the new location. Thanks.
Thanks for this, when you do get the chance to get on it again we do appreciate the updates ;)
Locked