zmtrigger.pl doesn't seem to do anything

Forum for questions and support relating to the 1.30.x releases only.
Locked
rand
Posts: 15
Joined: Tue Oct 03, 2017 8:50 pm

zmtrigger.pl doesn't seem to do anything

Post by rand »

I have Axis cameras and want to use their motion detection. I turned on OPT_TRIGGERS and rebooted just to be sure. ps aux shows that zmtrigger.pl is running. netstat shows perl is listening on 6802. If I connect via telnet to 6802 (via localhost) it seems to connect. I entered Purchasing|on+5|1|test|test|test and nothing was recorded. Purchasing is the name of the camera in question. Is there any kind of debugging I can turn on for this script? It doesn't seem to do anything useful at all.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmtrigger.pl doesn't seem to do anything

Post by knight-of-ni »

Turn on debugging from the Options -> Logging menu.

In ZoneMinder, what function do you have the camera in question set to?
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/
User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: zmtrigger.pl doesn't seem to do anything

Post by snake »

rand wrote: Tue Oct 03, 2017 8:55 pm If I connect via telnet to 6802 (via localhost) it seems to connect. I entered Purchasing|on+5|1|test|test|test and nothing was recorded. Purchasing is the name of the camera in question.
You enter the monitor ID, not its name. If purchasing is monitor number 5 you put 5. Some of the later fields are optional, no need to put 'test' for them. Read the zmtrigger perl script. It is in /usr/bin in Devuan. You must also be in one of modect, mocord, or nodect modes. See http://wiki.zoneminder.com/ZMTrigger
rand wrote: Tue Oct 03, 2017 8:55 pm Is there any kind of debugging I can turn on for this script?
Yes. See http://wiki.zoneminder.com/ZMTrigger
rand
Posts: 15
Joined: Tue Oct 03, 2017 8:50 pm

Re: zmtrigger.pl doesn't seem to do anything

Post by rand »

I have it running in nodect mode at the moment. Where do I get the id for each camera then?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmtrigger.pl doesn't seem to do anything

Post by knight-of-ni »

From the web console, hover over the monitor in question then look at the url that appears at the bottom of your browser.
The trailing part of the url will have "&mid=xx". xx is the id.
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/
rand
Posts: 15
Joined: Tue Oct 03, 2017 8:50 pm

Re: zmtrigger.pl doesn't seem to do anything

Post by rand »

knnniggett thanks, that got me going. I had messed around with cameras a bit and deleted them, so my first id is 9. There is absolutely no mention of id being different than name, or where to get the id, in the documentation. They all just use an example of 1 with no explanation for it.
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: zmtrigger.pl doesn't seem to do anything

Post by knight-of-ni »

The documentation does say id or name can be used. However, I've never tried to use the monitor name myself, only the id.
I think the documentation is wrong in this case because I don't see any references to the monitor name in the perl, only the id.
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/
Locked