Page 1 of 1

zmtrigger.pl

Posted: Tue Sep 25, 2018 11:30 am
by BiloxiGeek
Turned the zmtrigger option on, I can telnet localhost 6802 and it connects.

Tried:

Code: Select all

echo "103|on+30|5|manual_trigger|test_text2|test_OSD2" | telnet localhost 6802
Got no event, nothing changed on the on screen display (yes I aded %Q to the timestamp string). The monitor ID is correct. From what I've read this should have caused an event to be recoded on that camera for 30 seconds. There was nothing output to the log durring this. What am I missing here?

Re: zmtrigger.pl

Posted: Tue Sep 25, 2018 10:16 pm
by knight-of-ni
Using telnet they way you are didn't work for me. One would probably have to use something like expect to get telnet to send a one-liner.

Try using ncat instead of telnet:

Code: Select all

echo "3|on+30|5|manual_trigger|test_text2|test_OSD2" | ncat odroidxu4 6802
When I send that command, I get the following event in the log and the system goes into alarm. I also see "test_OSD2" in the timestamp:

Code: Select all

2018-09-25 16:25:50.129260	zmtrigger		6577	INF	Trigger 'on' 'manual_trigger'	zmtrigger.pl
If that doesn't work, try restarting zoneminder. I think I just discovered that zmtrigger ignores a monitor if that monitor is restarted for any reason. Needs further testing.

Re: zmtrigger.pl

Posted: Wed Sep 26, 2018 10:36 am
by BiloxiGeek
knight-of-ni wrote:
Tue Sep 25, 2018 10:16 pm
Try using ncat instead of telnet:
Yep that does work quite a bit better.
If that doesn't work, try restarting zoneminder. I think I just discovered that zmtrigger ignores a monitor if that monitor is restarted for any reason. Needs further testing.
Don't have enough testing to prove that but I think you're on to something there. If I change the timestamp string to add the %Q and then try to cause an event with a comment on screen it doesn't seem to work at all. But after restarting zoneminder it will work.

Re: zmtrigger.pl

Posted: Wed Sep 26, 2018 2:57 pm
by rockedge
I see this also. plus some of this thread still applies as well in some cases

viewtopic.php?f=37&t=27523

Re: zmtrigger.pl

Posted: Fri Sep 28, 2018 1:21 pm
by knight-of-ni
I have posted a fix for the issue with zmtrigger "forgetting" about monitors that have changed state recently.
See: https://github.com/ZoneMinder/zoneminder/pull/2225

Could each of you edit zmtrigger.pl on your systems accordingly and test?

I'm sure this will resolve the immediate problem, but what I am most interested in at this point is whether this causes any new problems that only manifest after the system has been running for a while.