I am having trouble getting the Hikvision controls working and I was getting an command = undefined error. I ran perl HikVision.pm and got the following:
/usr/share/perl5/ZoneMinder/Control$ perl HikVision.pm
WARNING: ZoneMinder configuration file found but is not readable. Check file permissions on /etc/zm/zm.conf
WARNING: ZoneMinder configuration file found but is not readable. Check file permissions on /etc/zm/conf.d/zmcustom.conf
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in pattern match (m//) at /usr/share/perl5/ZoneMinder/Config.pm line 93.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_HOST"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 102.
Use of uninitialized value $ZoneMinder::Config::Config{"ZM_DB_NAME"} in concatenation (.) or string at /usr/share/perl5/ZoneMinder/Config.pm line 117.
DBI connect('database=;host=','',...) failed: Access denied for user 'pollosanto'@'localhost' (using password: NO) at /usr/share/perl5/ZoneMinder/Config.pm line 117.
Can't connect to db at /usr/share/perl5/ZoneMinder/Config.pm line 166.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Config.pm line 166.
Compilation failed in require at /usr/share/perl5/ZoneMinder/Logger.pm line 90.
BEGIN failed--compilation aborted at /usr/share/perl5/ZoneMinder/Logger.pm line 90.
Compilation failed in require at HikVision.pm line 46.
BEGIN failed--compilation aborted at HikVision.pm line 46.
Does anyone know what the problem is here? Thanks.
Having problem with HikVision.pm
Re: Having problem with HikVision.pm
check to make sure the permissions on /etc/zm/zm.conf are correct and match the Apache user !!
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Having problem with HikVision.pm
You can't call the zoneminder scripts or binaries from the command line as a normal user. They will only run as the root user or the web account user.
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/
All of these can be found at https://zoneminder.blogspot.com/
Re: Having problem with HikVision.pm
Thank you, I forgot to sudo. Regarding the problem I am having, this is the error I get when I try to use the controls. Am I missing a component in my install?
2019-03-27 14:21:45 zmcontrol 2301 FAT Can't load ZoneMinder::Control::Can't locate ZoneMinder/Control/.pm in @INC (you may need to install the ZoneMinder::Control:: module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl/5.26/Module/Load.pm line 77.Can't locate ZoneMinder/Control/ in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl/5.26/Module/Load.pm line 77.
2019-03-27 14:21:45 zmcontrol 2301 FAT Can't load ZoneMinder::Control::Can't locate ZoneMinder/Control/.pm in @INC (you may need to install the ZoneMinder::Control:: module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl/5.26/Module/Load.pm line 77.Can't locate ZoneMinder/Control/ in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl/5.26/Module/Load.pm line 77.
Re: Having problem with HikVision.pm
Ok, got it working! The protocol wasn't set in the control definition for HikVision. Thanks for the help, much appreciated!
Re: Having problem with HikVision.pm
what is the protocol please and where do I have to enter this?
Re: Having problem with HikVision.pm
sorry, was absent for some time.
I got it to work. in the "Control" tab, I used the name the hikvision camera gave me under the system tab of the camera as the "control device" and I selected "Hikvision" from "Control Type" and checked "Controllable" ." Control Address" ist username:password@ip address, e.g. gordon:password@192.168.1.12
I got it to work. in the "Control" tab, I used the name the hikvision camera gave me under the system tab of the camera as the "control device" and I selected "Hikvision" from "Control Type" and checked "Controllable" ." Control Address" ist username:password@ip address, e.g. gordon:password@192.168.1.12