Multiple geofence enter/exit events and notifications

Victor Butlera year ago

Hi, I am getting some weird behavior for the geofence events and I cannot seem to figure out why this is.
In traccar and in the database the geofence records seem to be correct, still I am getting multiple events (when there shouldn't be one) and therefore multiple notifications.

Any idea what can be the issue?

Events Report -> Here you can see the multiple events with timestamps where there should be no geofence
Route Report - The geofence is not present in the Route report (correct)
Database - The geofence is not present in the database either (correct)

Anton Tananaeva year ago

Most like your device is not reporting data in the right order. That can cause this problem.

Victor Butlera year ago

No, it's chronological - always from oldest to latest. The timestamps that you see on the screenshots are the device fix times, not server time.

Anton Tananaeva year ago

Then there are probably some issues with saving data.

Daniel Höldera year ago
Victor Butlera year ago

I checked the logs, I don't see any irregularities. Also, the device data (HEX) seems to be correctly reported. Any idea what else to look for?

Daniel Höldera year ago

No, unfortunately not.

Victor Butlera year ago

Thanks for the feedback, Daniel! I think the two issues might be related (or even it could be the same root cause).

In my case, it's not just the push notifications, I also get the multiple notifications by email...and in the events report I get Geofence Exit / Geofence Enter several times after the actual event. It's like some sort of loop which repeats itself until it stops (for god knows what reason). But it's definitely not the device or the config setup.

On a side note, geofences used to run pretty smoothly just before the move of the geofences to the positions table (I think it was v5.7 or v5.8).

This is definitely a problem, since traccar records the same event 40+ times, which in turn is 40 push or email notifications....

Also, it happens both for Geofence Enter and Geofence Exit and the amount of repeats varies from anything like 10 to 40+.

Goutham10 months ago

I am facing exact same problem. It started when I upgraded to 5.12 last week from 5.6.

Anton Tananaev10 months ago

Are you going to provide any information?

Goutham10 months ago

@anton I see for the same geofence and device, I see a lot of geofenceEnter events in db.

   id    |     type      |        eventtime        | deviceid | positionid | geofenceid | attributes | maintenanceid 
---------+---------------+-------------------------+----------+------------+------------+------------+---------------
 2667131 | deviceMoving  | 2024-03-04 04:41:19     |   439277 |  301955814 |            | {}         |              
 2666944 | geofenceEnter | 2024-03-04 04:29:24     |   439277 |  301948690 |      16215 | {}         |              
 2666927 | geofenceEnter | 2024-03-04 04:28:53     |   439277 |  301948163 |      16215 | {}         |              
 2666920 | geofenceEnter | 2024-03-04 04:28:26     |   439277 |  301948020 |      16215 | {}         |              
 2666906 | geofenceEnter | 2024-03-04 04:27:56     |   439277 |  301947531 |      16215 | {}         |              
 2666903 | geofenceEnter | 2024-03-04 04:27:26     |   439277 |  301947474 |      16215 | {}         |              
 2666889 | geofenceEnter | 2024-03-04 04:26:56     |   439277 |  301947139 |      16215 | {}         |              
 2666879 | geofenceEnter | 2024-03-04 04:26:26     |   439277 |  301946774 |      16215 | {}  

Why are there so many geofence events created?

Anton Tananaev10 months ago

Have you checked logs for the same period of time? It will probably give you the answer.

Goutham9 months ago

Hi @anton... I have checked the logs in Info mode. I don't see anything that suggests problem with the duplicate geofence events. Any help is appreciated.

Goutham9 months ago

@anton I see logs something similar to below

2024-03-12 09:17:38  INFO: [T01e06e20] id: MP28G2443, time: 2024-03-12 09:17:15, lat: 21.88600, lon: 78.90827, course: 0.0
2024-03-12 09:18:05  INFO: Position filtered by Duplicate filters from device: MP28G2443
2024-03-12 09:18:37  INFO: Position filtered by Duplicate filters from device: MP28G2443
2024-03-12 09:19:06  INFO: [T7247791c] id: MP28G2443, time: 2024-03-12 09:18:49, lat: 21.88596, lon: 78.90831, course: 0.0
2024-03-12 09:19:36  INFO: [T970ad976] id: MP28G2443, time: 2024-03-12 09:19:19, lat: 21.88596, lon: 78.90831, course: 0.0
2024-03-12 09:20:05  INFO: [T326863bb] id: MP28G2443, time: 2024-03-12 09:19:49, lat: 21.88596, lon: 78.90831, course: 0.0
2024-03-12 09:20:36  INFO: [T3d0ea4fb] id: MP28G2443, time: 2024-03-12 09:20:15, lat: 21.88515, lon: 78.90936, speed: 25.0, course: 0.0
2024-03-12 09:21:08  INFO: [T3e9b97ee] id: MP28G2443, time: 2024-03-12 09:20:50, lat: 21.88434, lon: 78.91114, speed: 25.0, course: 0.0
2024-03-12 09:21:36  INFO: Event id: MP28G2443, time: 2024-03-12 09:21:24, type: deviceMoving, notifications: 0
2024-03-12 09:21:36  INFO: [T7ae2f2e8] id: MP28G2443, time: 2024-03-12 09:21:24, lat: 21.88418, lon: 78.91421, speed: 36.0, course: 0.0
2024-03-12 09:22:06  INFO: [T9c465824] id: MP28G2443, time: 2024-03-12 09:21:54, lat: 21.88366, lon: 78.91740, speed: 35.0, course: 0.0
2024-03-12 09:22:36  INFO: [T4a325810] id: MP28G2443, time: 2024-03-12 09:22:22, lat: 21.88254, lon: 78.91930, speed: 24.0, course: 0.0
2024-03-12 09:23:08  INFO: [T4727479f] id: MP28G2443, time: 2024-03-12 09:22:50, lat: 21.88172, lon: 78.92023, speed: 9.0, course: 0.0
2024-03-12 09:23:36  INFO: [T2f296d9b] id: MP28G2443, time: 2024-03-12 09:23:06, lat: 21.88157, lon: 78.92057, course: 0.0
2024-03-12 09:24:05  INFO: [T96ea1ef9] id: MP28G2443, time: 2024-03-12 09:23:28, lat: 21.88158, lon: 78.92056, course: 0.0
2024-03-12 09:24:37  INFO: [T53afe48c] id: MP28G2443, time: 2024-03-12 09:24:16, lat: 21.88153, lon: 78.92101, speed: 22.0, course: 0.0
2024-03-12 09:25:06  INFO: [Tef03680e] id: MP28G2443, time: 2024-03-12 09:24:53, lat: 21.88156, lon: 78.92233, speed: 8.0, course: 0.0
2024-03-12 09:25:36  INFO: [Tb852b865] id: MP28G2443, time: 2024-03-12 09:25:01, lat: 21.88152, lon: 78.92239, course: 0.0
2024-03-12 09:26:09  INFO: [T37f4f516] id: MP28G2443, time: 2024-03-12 09:25:51, lat: 21.88132, lon: 78.92285, speed: 7.0, course: 0.0
2024-03-12 09:26:37  INFO: [T1a0ca9a5] id: MP28G2443, time: 2024-03-12 09:26:21, lat: 21.88132, lon: 78.92285, course: 0.0
2024-03-12 09:27:04  INFO: [T1dadab6d] id: MP28G2443, time: 2024-03-12 09:26:51, lat: 21.88132, lon: 78.92285, course: 0.0
2024-03-12 09:27:38  INFO: [T29ed055e] id: MP28G2443, time: 2024-03-12 09:27:12, lat: 21.88124, lon: 78.92300, speed: 9.0, course: 0.0
2024-03-12 09:28:04  INFO: [T2279e40c] id: MP28G2443, time: 2024-03-12 09:27:38, lat: 21.88122, lon: 78.92302, course: 0.0
2024-03-12 09:28:38  INFO: [T5e02b9b1] id: MP28G2443, time: 2024-03-12 09:28:12, lat: 21.88122, lon: 78.92302, course: 0.0

Not sure how to infer what is wrong

Goutham9 months ago
2024-03-12 10:15:38  INFO: Event id: MH19CY9518, time: 2024-03-12 10:15:09, type: geofenceEnter, notifications: 2
2024-03-12 10:16:05  INFO: Event id: MH19CY9518, time: 2024-03-12 10:15:09, type: geofenceEnter, notifications: 2
2024-03-12 10:16:36  INFO: Event id: MH19CY9518, time: 2024-03-12 10:16:09, type: geofenceEnter, notifications: 2
2024-03-12 10:17:05  INFO: Event id: MH19CY9518, time: 2024-03-12 10:16:09, type: geofenceEnter, notifications: 2
2024-03-12 10:17:33  INFO: Event id: MH19CY9518, time: 2024-03-12 10:17:09, type: geofenceEnter, notifications: 2
2024-03-12 10:18:07  INFO: Event id: MH19CY9518, time: 2024-03-12 10:17:09, type: geofenceEnter, notifications: 2
2024-03-12 10:18:36  INFO: Event id: MH19CY9518, time: 2024-03-12 10:18:09, type: geofenceEnter, notifications: 2
2024-03-12 10:19:08  INFO: Event id: MH19CY9518, time: 2024-03-12 10:18:09, type: geofenceEnter, notifications: 2
2024-03-12 10:19:33  INFO: Event id: MH19CY9518, time: 2024-03-12 10:19:10, type: geofenceEnter, notifications: 2
2024-03-12 10:20:02  INFO: Event id: MH19CY9518, time: 2024-03-12 10:19:10, type: geofenceEnter, notifications: 2
2024-03-12 10:20:37  INFO: Event id: MH19CY9518, time: 2024-03-12 10:20:10, type: geofenceEnter, notifications: 2
2024-03-12 10:21:07  INFO: Event id: MH19CY9518, time: 2024-03-12 10:20:10, type: geofenceEnter, notifications: 2
2024-03-12 10:21:35  INFO: Event id: MH19CY9518, time: 2024-03-12 10:21:10, type: geofenceEnter, notifications: 2
2024-03-12 10:22:03  INFO: Event id: MH19CY9518, time: 2024-03-12 10:21:10, type: geofenceEnter, notifications: 2
2024-03-12 10:22:39  INFO: Event id: MH19CY9518, time: 2024-03-12 10:22:10, type: geofenceEnter, notifications: 2
2024-03-12 10:23:07  INFO: Event id: MH19CY9518, time: 2024-03-12 10:22:10, type: geofenceEnter, notifications: 2
2024-03-12 10:23:42  INFO: Event id: MH19CY9518, time: 2024-03-12 10:23:10, type: geofenceEnter, notifications: 2
2024-03-12 10:24:07  INFO: Event id: MH19CY9518, time: 2024-03-12 10:23:10, type: geofenceEnter, notifications: 2
2024-03-12 10:24:38  INFO: Event id: MH19CY9518, time: 2024-03-12 10:24:10, type: geofenceEnter, notifications: 2
2024-03-12 10:25:06  INFO: Event id: MH19CY9518, time: 2024-03-12 10:24:10, type: geofenceEnter, notifications: 2
2024-03-12 10:25:38  INFO: Event id: MH19CY9518, time: 2024-03-12 10:25:10, type: geofenceEnter, notifications: 2
2024-03-12 10:26:08  INFO: Event id: MH19CY9518, time: 2024-03-12 10:25:10, type: geofenceEnter, notifications: 2
2024-03-12 10:26:39  INFO: Event id: MH19CY9518, time: 2024-03-12 10:26:10, type: geofenceEnter, notifications: 2
2024-03-12 10:27:03  INFO: Event id: MH19CY9518, time: 2024-03-12 10:26:10, type: geofenceEnter, notifications: 2
2024-03-12 10:27:37  INFO: Event id: MH19CY9518, time: 2024-03-12 10:27:10, type: geofenceEnter, notifications: 2