I'm sure you can find some usage examples on the forum.
Hi Anton,
Thank you, you are right!.. I found it but I did not find a way if the Web API requires authorization header (like API-Key and API-Secret)..
any suggestion?
this is my last try, I put this in traccar.xml .. I expect to receive notification event (like, geofence enter, exit, device status on, off, unknown etc)..
what I have received is as follow:
{"position":{"id":0,"attributes":{"batteryLevel":77.0,"distance":2.9,"totalDistance":24547.58,"motion":false},"deviceId":1,"type":null,"protocol":"osmand","serverTime":"2020-08-01T08:43:58.222+0000","deviceTime":"2020-08-01T08:43:48.000+0000","fixTime":"2020-08-01T08:43:48.000+0000","outdated":false,"valid":true,"latitude":-6.236127,"longitude":106.654282,"altitude":38.0667610168457,"speed":0.0,"course":0.0,"address":"Tangerang Selatan, Banten, ID","accuracy":65.0,"network":null},"device":{"id":1,"attributes":{},"groupId":0,"name":"test@iOS","uniqueId":"264937","status":"online","lastUpdate":"2020-08-01T08:43:58.228+0000","positionId":66,"geofenceIds":[],"phone":"","model":"","contact":"","category":null,"disabled":false}}
traccar.xml
<entry key='forward.enable'>true</entry>
<entry key='forward.url'>https://mydomain.com/api/mywebhooks</entry>
<entry key='forward.json'>true</entry>
<entry key="event.forward.enable">true</entry>
<entry key='event.forward.url'>https://mydomain.com/api/mywebhooks</entry>
Please help
Thanks a lot in advance
Don
You enabled both positions and events forwarding, so it seems like you get exactly what you configured.
Sorry, I don’t understand what do you mean?
I expect to receive position and also notification event (like, geofence enter, exit, device status on, off, unknown etc) by forwarding them to our web API.
What I missed?
You are receiving positions. I don't really understand what the issue is.
I also expect to receive notification info through API.
Other than that, my device is linked with geofence but it shows geofenceIds":[]
My understanding is geofenceids is a list of devices that currently in geofence area, so mine should also listed there. Cmiiw
geofenceids is a list of devices that currently in geofence area
That's incorrect. It's a list of geofences, not devices.
Anton, thank you for your correction, so it is the id of geofence but it should not be empty, I was in that geofence area just now but it shows “geofenceIds":[]
By the way, where can I find the geofence id in the geofence setup page? It only shows Name and Description
Anton
Well noted and thank you
Hello,
I ran traccar 4.10 on CentOS 7 (x64), I want to forward traccar events (geofencing, odometer, speed, etc) to our webhooks API (https://mydomain.com/api/webhooks)
I read from https://www.traccar.org/configuration-file/
there are some info like below but it does not clear for me, where can I find the example of them?
I also read /opt/traccar/conf/default.xml but again I did not find a clue for this.
questions:
many thanks
Don