Page 1 of 1

Vehicle direction detection with two zones

Posted: Tue Sep 12, 2023 1:56 am
by mrd
I am running 1.37 with a monitor configured with two zones in order to detect vehicle direction on a road.
It works mostly very well so far, but occasionally I have both zones show as the "cause".
I have tried changing the zone type to exclusive, which seemed like a better choice than "active", but it did not resolve the issue.
I had a small gap between the zone areas, that I have now removed, but I'm assuming there is a better way to make sure the second zone does not alarm, if the first one has already alarmed recently or is still in alarm state.

Any advice would be appreciated.

Re: Vehicle direction detection with two zones

Posted: Thu Sep 14, 2023 4:20 pm
by mrd
I solved this with a workaround where I went back to two Active zones on each end of the perpendicular roadway.
I examine the alarmed frames and grab the first alarm frame and then its associated zone id.

Just add this script to your "Recording" option "Event Start Command" in your monitor config. (ZM 1.37 and later)
https://gist.github.com/mdetweiler/9449 ... 9290fcf0d3

Seems to work well and is flexible enough for other uses.