Vehicle direction detection with two zones

Current Development version likely to have breaking changes
Post Reply
mrd
Posts: 269
Joined: Wed Apr 26, 2006 12:39 am
Location: Boston USA

Vehicle direction detection with two zones

Post 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.
MRD
mrd
Posts: 269
Joined: Wed Apr 26, 2006 12:39 am
Location: Boston USA

Re: Vehicle direction detection with two zones

Post 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.
MRD
Post Reply