zmtrigger.pl

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
BiloxiGeek
Posts: 240
Joined: Tue Feb 11, 2014 2:04 pm

zmtrigger.pl

Post by BiloxiGeek » Tue Sep 25, 2018 11:30 am

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?

User avatar
knight-of-ni
Posts: 2228
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmtrigger.pl

Post by knight-of-ni » Tue Sep 25, 2018 10:16 pm

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.
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/

BiloxiGeek
Posts: 240
Joined: Tue Feb 11, 2014 2:04 pm

Re: zmtrigger.pl

Post by BiloxiGeek » Wed Sep 26, 2018 10:36 am

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.

rockedge
Posts: 1105
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA
Contact:

Re: zmtrigger.pl

Post by rockedge » Wed Sep 26, 2018 2:57 pm

I see this also. plus some of this thread still applies as well in some cases

viewtopic.php?f=37&t=27523

User avatar
knight-of-ni
Posts: 2228
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmtrigger.pl

Post by knight-of-ni » Fri Sep 28, 2018 1:21 pm

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.
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/

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests