Question for configuration of event forwarding and types

Michaela year ago

Hi,

i have recently setup traccar as a Homeassistant add-on. I was able to configure a client on my android device, which periodically sends position data to the server. I have setup notification forwarding to a nodered instance. I do receive events, but only for deviceUnknown and deviceOnline. I have setup some geo-fences (Home and Work) and notifications via traccar web-ui. I was hoping to get notifications, when entering or leaving the geofence, but as mentioned above, i only get those two events. Allthough, i can clearly see on the traccar server, that my android device is within the geo-fence region.

deviceUnknown - event

{
    "event": {
        "id": 428,
        "attributes": {},
        "deviceId": 1,
        "type": "deviceUnknown",
        "eventTime": "2023-07-02T08:40:27.394+00:00",
        "positionId": 0,
        "geofenceId": 0,
        "maintenanceId": 0
    },
    "device": {
        "id": 1,
        "attributes": {},
        "groupId": 0,
        "name": "MyAndroid Device",
        "uniqueId": "1234567890",
        "status": "online",
        "lastUpdate": "2023-07-02T08:30:27.354+00:00",
        "positionId": 5013,
        "geofenceIds": null,
        "phone": null,
        "model": "dummy",
        "contact": null,
        "category": null,
        "disabled": false,
        "expirationTime": null
    }
}

deviceOnline - event

{
    "event": {
        "id": 429,
        "attributes": {},
        "deviceId": 1,
        "type": "deviceOnline",
        "eventTime": "2023-07-02T08:40:45.031+00:00",
        "positionId": 0,
        "geofenceId": 0,
        "maintenanceId": 0
    },
    "device": {
        "id": 1,
        "attributes": {},
        "groupId": 0,
        "name": "MyAndroid Device",
        "uniqueId": "1234567890",
        "status": "online",
        "lastUpdate": "2023-07-02T08:40:45.031+00:00",
        "positionId": 5013,
        "geofenceIds": null,
        "phone": null,
        "model": "dummy",
        "contact": null,
        "category": null,
        "disabled": false,
        "expirationTime": null
    }
}

Can anyone give me an hint, what could be wrong?

Anton Tananaeva year ago

Have you linked your geofences to your device?

Michaela year ago

I don't know. How do i do that? I have checked the "all devices" check in the notifications.

Anton Tananaeva year ago

Please read the documentation.

Michaela year ago

I found it, without the docs. Within devices each device has a link icon, thats where you can assign a device to a geo fence.
Now, I'm getting also geofence events forwarded.
Thanks!

pkkrusty2 months ago

@Michael, can you post your config for this?

"I have setup notification forwarding to a nodered instance"

I'd like to do the same thing.