View unanswered posts | View active topics It is currently Sun May 26, 2013 3:13 am



Reply to topic  [ 11 posts ] 
zmtrigger.pl 
Author Message

Joined: Tue Jan 24, 2006 9:35 pm
Posts: 19
Post zmtrigger.pl
Hi,

I am trying to get zmtrigger.pl to work. I have some external sensors connected to insteon devices and my goal is to get my Isy controller to cause events using zmtrigger.

So far I am just testing the basics. Starting zmtrigger.pl and then using telnet to connect to port 6802 and type in the command by hand. Sadly however, so far I haen't been able to get an event to fire off.

When I use telnet I enter the command:

Code:
1|on+30|255|cause|text|showtext


I see the following in the window where zmtrigger.pl is running in the foreground:

Code:
Use of uninitialized value $data in pack at /usr/share/perl/5.12.4/ZoneMinder/Memory.pm line 460.


However, I do see the following in the logs:

Code:
2012-05-10 15:30:41.448200   zmtrigger   7081   INF   Trigger 'on' 'cause'


However no event is created. Whats interesting is that if I do the same thing with monitor 2 I get an error in the logs, despite the fact I do have a monitor 2.

Code:
2012-05-10 15:32:20.733360   zmtrigger   7081   WAR   Can't find monitor '2' for message '2|on+30|255|cause|Text|showtext'   zmtrigger.pl


The same happens if I use the name rather than the id.

I am using mastertheknife's version which is 1.25.0. I was wondering if perhaps the Perl error could be caused by the fact I am using a ramdisk and mapped memory rather than shared memory.

If anyone has some pointers I'd appreciate it.

Thanks,
Simon


Thu May 10, 2012 8:36 pm
Profile

Joined: Wed Dec 16, 2009 5:32 pm
Posts: 553
Location: Israel
Post Re: zmtrigger.pl
Its an error in my version. I fixed that recently, re-download the source.
See here: viewtopic.php?p=74534#p74534

mastertheknife

_________________
Kfir Itzhak.


Sat May 12, 2012 11:40 am
Profile

Joined: Tue Jan 24, 2006 9:35 pm
Posts: 19
Post Re: zmtrigger.pl
Hey,

I installed the latest version as you recommended and it seems a bit better, however zmtrigger.pl will not stay running.

In the logs I get:

Code:
May 15 01:48:24 hawk zmdc[17993]: ERR ['zmtrigger.pl ' exited abnormally, exit status 9]


Multiple times. I guess zmdc is trying to start zmtrigger.pl. I turned on debug logging for zmtrigger and the following ends up in the logs:

Code:
12-05-15 01:43:53.208758 zmtrigger[17477].DBG [LogOpts: level=DBG/DBG, screen=OFF, database=INF, logfile=DBG->/mnt/zm/log/zm_debug.log.17477, syslog=INF]
12-05-15 01:43:53.208862 zmtrigger[17477].INF [Trigger daemon starting]
12-05-15 01:43:53.211181 zmtrigger[17477].INF [Opening connection 'Chan1']
12-05-15 01:43:53.212574 zmtrigger[17477].INF [Opening connection 'Chan2']
12-05-15 01:43:53.215110 zmtrigger[17477].INF [Opening connection 'Chan4']


Seems like its really close to working.

If I run zmtrigger.pl from the command line it works, but I can't only send commands to monitor 1. When I try monitor 2 it doesn't recognize it. From the debug log I think some extra parameters are passed by zmdc to get zmtrigger to see the other monitors, but I'm not positive about this.

I've only started trying to debug why zmtrigger won't stay running, or what exit with status 9 means so I don't have anything beyond this. If anyone has some ideas I'd appreciate them.

Simon


Tue May 15, 2012 6:52 am
Profile

Joined: Tue Jan 24, 2006 9:35 pm
Posts: 19
Post Re: zmtrigger.pl
So with a bit more digging I figured out the reason was that zmtrigger.pl wants to access the serial port. I use Ubuntu so I added www-data to the dialout group and restart. Now zmtrigger.pl stays running! Progress.

So I tested the following command:

Code:
1|on+30|255|cause|text|showtext


Which worked great. However, it's monitor 2 I want to trigger based my external sensor, so next I tested:

Code:
2|on+30|255|cause|text|showtext


However in the logs I get:

Code:
Can't find monitor '2' for message '2|on+30|255|cause|text|showtext'


Damn, I thought I was really close. I tried with all my other inputs and none of them work. I have 6 and only id 1 will work. The documentation says the id number of name can be used as the first parameter, but neither work for me for any monitor greater than 1.

Simon


Fri May 18, 2012 7:10 pm
Profile

Joined: Tue Jan 24, 2006 9:35 pm
Posts: 19
Post Re: zmtrigger.pl
Quick update:

Code:
5|on+30|255|cause|text|showtext


Works! I compared it with the other cameras and I don't see a difference. However, this leads me to believe it may just be a setting somewhere ... getting really close I think to making this work.

Simon


Fri May 18, 2012 7:14 pm
Profile

Joined: Tue Jan 24, 2006 9:35 pm
Posts: 19
Post Re: zmtrigger.pl
Apparently I should have done more searching on the forums. I found my answer. The camera in question needs to be in something other than Monitor for it to be usable by zmtrigger.pl I switched to Nodect, which had I not skimmed the documentation so quickly I would have learned that this is precisely what this mode is for. Once that was done I could trigger the camera.

Simon


Fri May 18, 2012 7:22 pm
Profile

Joined: Sun May 13, 2012 7:34 pm
Posts: 12
Post Re: zmtrigger.pl
Hi,
I connected an arduino board to zoneminder via ethernet to send strings.
More details in this thread: http://arduino.cc/forum/index.php/topic,88331.msg824308.html

It works until I have this same error:
"zmtrigger.pl ' exited abnormally exit status 9"

I edited zmtrigger.pl to just have the "Chan1" (ethernet) active in "my @connections".

I tried to add www-data to the dialout group like simon did. Also my cameras are in Modect mode. I keep having this error and when it happen the monitor don't leave que alarm state.

The only thing I didn't do was applying the PATCH described here because I don't have the performance patch installed (it is just for people that installed performance patch right ??).

I'm using Zoneminder 1.25.0

Any idea?


Wed Jun 13, 2012 2:41 am
Profile

Joined: Sun May 27, 2012 2:06 am
Posts: 17
Post Re: zmtrigger.pl
Same here,

when I connect to the server with telnet, port 6802, it hangs after several minutes, the message is "Connection closed by foreign host."
Is there a solution to this??


Tue Jun 19, 2012 3:37 am
Profile

Joined: Sun May 13, 2012 7:34 pm
Posts: 12
Post Re: zmtrigger.pl
coinageboy wrote:
Same here,

when I connect to the server with telnet, port 6802, it hangs after several minutes, the message is "Connection closed by foreign host."
Is there a solution to this??


Same thing. I also tested with telnet and i'm getting the same message and simultaneously the exit status 9 in the LOG window.


I saw a solution to a similar problem here:
http://www.zoneminder.com/forums/viewtopic.php?f=5&t=12390&hilit=zmtrigger.pl

I disabled the option of using zmtrigger in the zoneminder options (via web interface), restarted the computer, and started zmtrigger manually using ssh connection:

Code:
sudo /usr/local/bin/zmtrigger.pl


In Zoneminder web interface in the LOG window I see zmtrigger starting, but in ssh window it hangs for some.

Zmtrigger works perfectly and doesn't give the error "exit status 9" and I can get triggers to work via telnet.

But in the ssh window, after some minutes frozen, it gives me this:
Code:
variable is not a string at /usr/local/share/perl/5.12.4/ZoneMinder/Memory/Mapped.pm line 109.


At the same time it gives this message in the ssh window, in the telnet window it closes the telnet connection and it doesn't allow me to make another connection giving "connection refused" every time after that.

The difference is that it doesn't allow to reconnect but does not give the "exit status 9" error.


Tue Jun 19, 2012 7:22 pm
Profile

Joined: Sun May 13, 2012 7:34 pm
Posts: 12
Post Re: zmtrigger.pl
mastertheknife wrote:
Its an error in my version. I fixed that recently, re-download the source.
See here: viewtopic.php?p=74534#p74534

mastertheknife


I have the version 1.25.0. This "performance patch" isn't included in my version, right?
I was wondering if installing that patch should solve my problem.... (because simon solved this problem updating the patch).


Thu Jun 21, 2012 10:20 pm
Profile

Joined: Sun May 13, 2012 7:34 pm
Posts: 12
Post Re: zmtrigger.pl
My problem was solved:
http://www.zoneminder.com/forums/viewtopic.php?f=29&t=19318&p=76020#p76020


Tue Jul 03, 2012 6:38 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: theforce and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group