User - Geofence association issue

Enirh6 years ago

Hi Anton,

I am stuck with a configuration issue here. My use case is something like this -

  1. Multiple devices mapped to a group
  2. One device is linked to multiple users
  3. One one connected to multiple geo-fences
  4. Multiple geofences are mapped to one group

Now, let's say a geofence-entry or geofence-exit event is generated by the device, will all users having access to the geofence get notifications?

kaykor6 years ago

I'm confused to what you want to achieve. You provided a setup example but not the required outcome.

Your question I think is about notification: https://www.traccar.org/documentation/notifications/

So how is your notification setup for groups and users. Do you notify the group when geofence enter or exit is determined or do you notify individual users?

Enirh6 years ago

If my understanding of the documentation was correct, then, if a geofence is associated with a group, then all devices in that group have the ruleset of that geofence. Now let's assume, multiple users are given access to one device. Then when a device triggers a geofence cross alert, will all users having access to that event receive a notification via WebSocket?

kaykor6 years ago

I'm going to agree with that logic but I do not know. Groups is to make it easier to assign the same thing to many devices at the same-time.

But you can test it, set up a notification for a geofence and assign it to a group create/assign users to the same group with email address and see what happens.(of course a device will need to create an event) For the webhooks you will need multiple open browser windows with the different users logged in. Depending on how many users you use in the test you should get that many emails.

What is it that you want? Everybody to be notified or just certain individual.

Anton Tananaev6 years ago

I have just had a quick look at the code. There is a special check to see if user has access to the geofence before event is sent via WebSocket.

Enirh6 years ago

So if a user has access to a geofence, and has access to the device as well, will that user be able to receive all geofence related events triggered by that device?

Anton Tananaev6 years ago

Yes.