Groups and Geofences and Devices not linked

Marc6 years ago

Hello --

Running Traccar for a while, using the mysql database. I am happy so far.

However whenever I add a new geofence and add it to a group, I'd expect all the devices in the group to be linked to the geofence. Turns out they aren't. They only are when I manually add the geofence to the devices one by one.

Looking at the device_geofence table in mysql, I do notice that these relations do not seem to get set automatically. So I wonder if there's a bit missing someplace. Maybe I am missing some mysql configuration that should do this? Where should I start looking?

Cheers

abyss6 years ago

I'd expect all the devices in the group to be linked to the geofence

No, they will not be linked. But all devices in the group will produce enter/exit events.

Marc6 years ago

@abyss - that bit I do not understand. The devices are in the group, and the geofences are in the group. However the devices will not be linked to the geofences.
And the devices will still make the events? What precisely would be different then, if the the devices were linked to the geofences?

I have a bit of a hard time understanding the logic of the relations within traccar. :)

abyss6 years ago

There is no group of geofences, there are only groups of devices. I believe it is described in documentation https://www.traccar.org/documentation/geofences/

Marc6 years ago

@abyss - got it. I have to admit I read over that the first two times. I do think the UI is a bis misleading here - when you click on the geofence button on the user list, you get a list of geofences to click at. At that moment it was not clear to me that although the geofences are not active on the user, they would still trigger events based on the group. Might be worth a thought to highlight that in the interface - e.g. by giving a different background color to group geofences.

Or maybe I am just thick :)