How do I forward Events?

Bernhard4 years ago

I probably miss something here ...
I configured traccar.xml to forward events and positions like this:

    <entry key='event.forward.enable'>true</entry>
    <entry key='event.forward.url'>http://127.0.0.1:8099</entry>

    <entry key='forward.enable'>true</entry>
    <entry key='forward.url'>http://127.0.0.1:8099</entry>
    <entry key='forward.json'>true</entry>

I even added this configuration even though the current documentation does not mention it (found it in some old forum entry)

    <entry key='event.motionHandler'>true</entry>
    <entry key='event.geofenceHandler'>true</entry>
    <entry key='event.alertHandler'>true</entry>
    <entry key='event.ignitionHandler'>true</entry>
    <entry key='event.statusHandler'>true</entry>
    <entry key='event.maintenanceHandler'>true</entry>

I added a group with geofence and notifications on and assigned this to the devices. I also clicked on the gear-icon in the device tab and activated notifications and geofence for the active device (I don't think I need to do that too since it is configured via groups).

I get the events in the webinterface on the right side for Status online/offline/unknown and Geofence entered/left but via HTML POST i only get Status online/offline/unknown but no Geofence Events.

What did I miss?

Bernhard4 years ago

added this configuration parameter today ...

 <entry key='event.forward.header'>Content-Type: application/json; charset=utf-8</entry>

... didn't work :(

Eduardo3 years ago

I have the same problem. Did you manage to request?

Bernhard3 years ago
...
    <entry key='event.forward.enable'>true</entry>
    <entry key='event.forward.url'>http://127.0.0.1:8099</entry>
    <entry key='event.forward.header'>content-type: application/json</entry>

    <entry key='web.timeout'>900000</entry>

    <entry key='event.motionHandler'>true</entry>
    <entry key='event.geofenceHandler'>true</entry>
    <entry key='event.alertHandler'>true</entry>
    <entry key='event.ignitionHandler'>true</entry>
    <entry key='event.statusHandler'>true</entry>
    <entry key='event.maintenanceHandler'>true</entry>

    <entry key='forward.enable'>true</entry>
    <entry key='forward.url'>http://127.0.0.1:8099</entry>
    <entry key='forward.json'>true</entry>
...

don't ask me how but I got it to work. I guess it was the timeout that was the problem. It was a year ago and my brain is not as good as it used to be :)