Reduce the frequency of emails regarding entry and exit from a virtual fence.

Turbovix7 months ago

Hello everyone, how do I reduce the frequency of emails regarding entry and exit from a virtual fence, the device in question is a smartphone. I believe that the smartphone should turn off/reduce location accuracy, making the device enter and leave the virtual fence several times.

I thought about using the following parameter:

<entry key='event.ignoreDuplicateAlerts'>true</entry>

This parameter would be correct for this purpose.

Thank you in advance.

Anton Tananaev7 months ago

Traccar shouldn't send duplicate alerts about the same event. If you do get frequent events, it means that the device is getting in and out of the geofence repeatedly. It could happen if the location is right on the edge of a geofence.

Turbovix7 months ago

Hi Anton,
Yes, you are correct, the issue is the device, since it is a smartphone, and I think that because it goes into low power mode, it turns off or reduces accuracy, making it look like it has left the virtual fence.
So directly in Traccar I won't be able to reduce these emails.
I'm going to go to plan "B", which is to use node-red to carry out this control.

Thanks.

Anton Tananaev7 months ago

Our standard recommendation is to increase the geofence area. That way even if there are small jumps due to accuracy, the device will still stay in the zone.

Turbovix7 months ago

Yes, I am aware, however from what I analyzed the jumps are long/far from the correct point. Therefore, if I make this change it turns out that these virtual fences don't make sense, as it involves monitoring teenagers in schools.
Customer stuff, you know... lol...