How To import new PTZ control script info to an existing dB

Forum for questions and support relating to the 1.27.x releases only.
Post Reply
User avatar
knight-of-ni
Posts: 2275
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

How To import new PTZ control script info to an existing dB

Post by knight-of-ni » Mon Mar 17, 2014 1:33 pm

In time I will be posting additional documentation regarding the different things you can do with the new zmcamtool.pl script. For starters, you can use zmcamtool to get new ptz control script information into your database.

While new versions of zoneminder will copy new ptz control script files onto your file system during an upgrade, your existing database remains untouched. You won't see the new scripts listed in the UI.

Here's how to fix that:

Code: Select all

sudo zmcamtool.pl --import
If you want to overwrite existing ptz control scripts in your database, issue this command:

Code: Select all

sudo zmcamtool.pl --import --overwrite
You can even import this information from a sql file exported from another system (more on this later):

Code: Select all

sudo zmcamtool.pl --import /full/path/to/sql/file.sql
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

basketcase
Posts: 31
Joined: Thu Aug 22, 2013 10:04 pm

Re: How To import new PTZ control script info to an existing

Post by basketcase » Mon Mar 24, 2014 10:10 am

I tip my hat to you guys, upgrade is great, lower CPU usage and two of cams crashing to red screens are now solved!

I have one niggling error... My Foscam FI8910W's PTZ, previously working on 1.26.5 before yesterdays update

Firstly received this error:

Code: Select all

2014-03-24 18:52:50.765629	web_php	2949	ERR	/usr/bin/zmcontrol.pl --autostop --command=moveConDown --id=5=>	/usr/share/zoneminder/www/includes/functions.php
Then found this post and ran:

Code: Select all

[dt@Centos ~]$ sudo zmcamtool.pl --import
[sudo] password for dt:
Number of ptz camera controls added: 2
Number of existing ptz camera controls skipped: 11
Number of existing presets skipped: 66
Still can't get PTZ to work and now receive this error, which indicates a bad password, but none of that has changed from yesterday when it all worked and I've checked it again just in case.

Code: Select all

Error check failed: '401 Unauthorized' for URL http://192.168.0.23/decoder_control.cgi?command=92&user=admin&pwd=user=operator&pwd=operatorpw
along with

Code: Select all

2014-03-24 20:08:36.222038	zmc_m5	26208	ERR	Unable to get response	/builddir/build/BUILD/ZoneMinder-1.27.0/src/zm_remote_camera_http.cpp	1110
2014-03-24 20:08:36.171784	zmc_m5	26208	ERR	Unable to read subheader	/builddir/build/BUILD/ZoneMinder-1.27.0/src/zm_remote_camera_http.cpp	938
2014-03-24 20:08:36.121703	zmc_m5	26208	ERR	Select error: Interrupted system call	/builddir/build/BUILD/ZoneMinder-1.27.0/src/zm_remote_camera_http.cpp	162
My Controls are all still listed and look the same as they were on 1.26.5

Edit: I gather second error is related to the fact I installed the update from http://bauerhaus.dyndns.org/linux zoneminder-1.27.0-1.el6.x86_64.rpm rather than building from source?

Any thoughts?

basketcase
Posts: 31
Joined: Thu Aug 22, 2013 10:04 pm

Re: How To import new PTZ control script info to an existing

Post by basketcase » Wed Mar 26, 2014 10:47 am

After a bit of mucking around I got this to work.

Checking the bundled FI8908W.pm it takes a different string for the Control Device: user and password, in this case delimited by a colon : rather than an ampersand in my existing script...

I've started work on re-writing my FI8910W script using lessons from the FI8908W script, because the 08 doesn't have saved presets which are very handy.

The strangest behavior though as I've been testing and re testing every now and then zmcontrol reverts back to my Control Device variable = "user=operator&pwd=operatorpw" and passing that which gives the above unauthorized failure... it will do this despite me changing and saving the setting many times over, then suddenly it will work again. Restarting ZM doesn't seem to fix the issue, I gather it gets cached somewhere... If someone can educate me on how to clear those presets it'd make testing the new protocol script much easier.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests