zmtrigger does not always return all events

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
phils01
Posts: 6
Joined: Fri Mar 19, 2021 5:04 pm

zmtrigger does not always return all events

Post by phils01 »

hi All

I have found a weird issue I cannot seem to fathom.

I have a script that is triggering zmtrigger.pl passing it 10 differnt triggers "1|on|1|cause|notes<CR>1|on|1|cause|notes<CR>3|on|1|cause|notes........etc", but *somtimes* zmtrigger does not always return ALL the events event tho it is starting them correctly.

xmtrigger.log shows all the On commands are being received.

If I send 10 start commands to the cameras, sometimes it will start 10 events but only return 2 or 3 to my script.

I need the returned event numbers to store in a database, which is then used to monitor the events progress.

Has anyone else noticed similar issues, or know how I could start tracking down why it does not always return them all.

Thanks
Phil.
User avatar
iconnor
Posts: 2896
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: zmtrigger does not always return all events

Post by iconnor »

I think the likely issue is that we aren't waiting for the off condition. You send 1|on|1, then another 1|on|1. If we are in an event from the first, the second won't create a new event, it will just add data to the first.

Although you said all the events are created.....

Another thought is that if the event ended before we returned from handleMessage we would miss it. How long are these events lasting for? Your message implies that they are fairly long.

Hmmm
phils01
Posts: 6
Joined: Fri Mar 19, 2021 5:04 pm

Re: zmtrigger does not always return all events

Post by phils01 »

sorry I think I was probably not very descriptive in my message.

I have 8 cameras all recording a mahcine in a factory.

When they start the machine, a zmtrigger is sent to zonemidner starting an event on each camera (and setting an OSD message in the timestamp), for exmple :
35|on|1|triggered|OSD TEXT|TEXT
36|on|1|triggered|OSD TEXT|TEXT
37|on|1|triggered|OSD TEXT|TEXT
38|on|1|triggered|OSD TEXT|TEXT
etc.....

These events wil last from a hour upto a full day, then an equivalent "35|cancel" message is sent for each camera.

Zoneminder starts all 8 events happily but sometimes/often only returns 1 or more lines of event numbers, like :
35|on|1617973100|356
35|off|1617973100|356

Event 356 is still hapily recording, and so are the other 7 cameras I triggered at the same time.

I tried to swap to using the API to trigger the events - using : <ip>/zm/api/monitors/alarm/id:35/command:on.json?token=XXXX
But that just returns "" and does not start any events.

Thanks for any advice

Phil.
User avatar
iconnor
Posts: 2896
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: zmtrigger does not always return all events

Post by iconnor »

I think we are talking some fixes here. I'll take a closer look.
phils01
Posts: 6
Joined: Fri Mar 19, 2021 5:04 pm

Re: zmtrigger does not always return all events

Post by phils01 »

Thank you - if I can provide any more information or test any fixes let me know.

Am I correct in thinking "<IP>/zm/api/monitors/alarm/id:35/command:on.json" should do a similar thing to zmtrigger? as I cannot get that to work.

Phil.
Post Reply