Geofence notifications aren't being sent

Alan2 years ago

Geofence enter/exit notifications have been configured but aren't firing.

System: Ubuntu 22.10
Traccar: 5.5

Geofences are drawn at two locations. I have two notifications configured, Geofence Entered and Geofence Exited.

I'm expecting an email to be sent when either of the two geofences are entered/exited. But nothing is sent/received.

There isn't anything in the logs showing that notifications are trying to be sent.

Notifications > Test Channels works. The test notification web alert appears and the test email is received. Notifications don't fire whether All Devices is enabled or not.

Device is the latest Android app. It is successfully tracked within the application.

When editing the device > Connections, the Geofences do not initially appear selected by default.

However, when Geofences is expanded the two geofences are listed and appear selected/highlighted.

Same with Notifications.

I feel like I'm just missing one small piece in the configuration but I can't figure out what it is. There aren't any Groups or Drivers configured. I'm currently setting this up as a proof of concept; specifically that alerts will be emailed when drivers enter/exit specific geofences. I'm testing on a barebones configuration before I really get into it and I can't seem to get this figured out.

Thanks in advance for any insight that you can offer.

Anton Tananaev2 years ago
  1. Are you sure geofences are big enough and you don't skip through them?
  2. Have you checked the events report? If it shows there, then the problem is with notifications, not events.
Alan2 years ago

Hi Anton, thanks for the quick response (and also for this great product).

  1. The fences are actually around my work and my home. I enter into the area and then I'm present there for at least 8 hours. You can see the device within my work geofence in this image. The closest boundary to the upper-right in that image is about a kilometre away.
  2. The Events Report is blank for both Geofence Entered and Geofence Exited. As far as the system is concerned it looks like it isn't seeing me cross into/out of the area, i.e. the issue most likely isn't notifications.
Anton Tananaev2 years ago

From the screenshot it looks like you added a polyline geofence instead of a polygon. Are you sure that's what you intended?

Alan2 years ago

Curiously, with the hand drawn geofence circle in my other images the shape doesn't shade itself in. Is that expected with a hand drawn LineString shape?

I've just deleted that circle around my job site and used the Polygon Tool to draw a geofence around it. The polygon shape is shaded in.

Perhaps that's the issue? I will test with the polygon geofences and report back.

Alan2 years ago

Anton, our messages just crossed each other - maybe I didn't?

Regardless, no response needed from you. I'll test with the polygon geofences.

Alan2 years ago

RESOLVED

Using the polygon tool to draw the geofence works successfully. Geofence Events are appearing and I'm receiving the email notifications as expected.

I was using the LineString tool incorrectly. Once I'd made those simple changes the notifications are now working.

ccastro832 years ago

Hi,
Rigth now I have exactly the same problem reported by Alan.
The only diferences are:

  • I have installed Traccar 5.3
  • All my geozones were made with polygon Tool.

I did all the settings reported by Alan in the geo-zone and on the devices but zero events has been reported when a device enter or exit from a geo zone.

What else I must check or looking for?

Anton Tananaev2 years ago

Have you linked your devices?

ccastro832 years ago

Hi Anton,
thank you for your fast reply.

yes, the are linked. I will try to shere a image

https://drive.google.com/file/d/1jFKIf1HvcgJk-y9YcfcvuVU9sUvkqY7l/view?usp=share_link

But yes I assigned the Geo Zone (previusly created) and the notifications ( Enter Geo Zone and Exit Geo Zone) to several devices

Anton Tananaev2 years ago

Can't open the link. You forgot to set permissions.

Navneet Choudhary6 months ago

Hi Anton,

I have created fence with linetool (Not Polygon)

  1. I have linked geofence and device
  2. I can see it is showing in events for Fence Exit and Entry
  3. I have enabled notifications for Exit and Entry

Rest all the notifications are coming to my Phone (My own app not traccar manager)
But i am unable to receive alerts for the fence

am i missing something? Please help

Anton Tananaev6 months ago

That sounds correct to me.

Navneet Choudhary6 months ago

Hi Anton,

I have analysed a patterns with notification not coming:

I have set Asia/Kolkata +5:30 time zone via preferences options so that i can see my localtime on screen.

Ignition on

eventTime: 09:45AM (Correct time)
Result => Notification work well

Speed limit exceeded

eventTime: 05:21AM (Incorrect time)
Actual time is +5:30hr ahed then this
Result => Notification did not come but it can be seen in Events

Geofence exited

eventTime: 05:31AM (Incorrect time)
Actual time is +5:30hr ahed then this
Result => Notification did not come but it can be seen in Events

so the common pattern is event where server is displaying correct time notification is working fine. but when time is behind 5:30 it is not generating notification.

Please help me to identify what is wrong with configuration.

Anton Tananaev6 months ago

This is correct behavior. We don't generate notifications for old events.