Events

At the time of writing this documentation there were 9 categories of events supported by Traccar:

Configuration

General configuration should be done in configuration file traccar.xml. By default all events handlers are enabled.

Text message category is enabled only if SMS support enabled.

Alarm

This type of event generated when new position contain alarm attribute. There are a lot of alarm types supported by traccar, you can find actual list here. Not all protocols support alarms, and some protocols support only a subset of all types.

Command Result

Traccar supports answers on commands for some protocols. Such answers are stored in result attribute. Server generates this type of event if position contains result attribute.

Geofence

Traccar can generate events when device enters or exits a geofence.

Ignition

Some devices can report ignition status. Traccar generates Ignition ON Event if previous position contain attribute ignition false and current position contain attribute ignition true. Traccar generates Ignition OFF Event if previous position contain attribute ignition true and current position contain attribute ignition false.

There are some protocols that do not report ignition status in every position. In this case you can use processing.copyAttributes configuration parameter to keep ignition attribute from previous position.

Maintenance

Traccar can help control maintenance intervals of devices. There are two attributes to configure: maintenance.start and maintenance.interval. They can be set in device, group or server attributes. Traccar generates event every time totalDistance attribute gets over maintenance.start + maintenance.interval * N value where N is a natural number.

Example:

maintenance.start=6000000, maintenance.interval=8000000

Events will be generated when totalDistance goes over 6000 km, 14000 km, 22000 km and so on.

Motion

Traccar can generate this event if device started or stopped moving. Server analyzes speed from incoming position and if speed is more than event.motion.speedThreshold configuration parameter (default is 0.01 knots) then considered that device is moving, and if speed is less then that device has stopped.

Overspeed

Traccar can generate this event if device exceeds the configured speed limit. Speed limit value can be set in device, group or server attribute speedLimit.

Additional event.overspeed.notRepeat configuration parameter specifies repeating behavior. If true, event will be generated once at the beginning of the overspeeding period, if false then events will be generated on every received position.

Status

Server can generate this event type when device status changes (online/offline/unknown). Online means that device is connected to the server and sending reports. Offline means that device is not connected to the server. Unknown means that connection status is unknown and there were no reports from device for specified period of time (10 minutes by default).

Text Message

This event is generated when SMS message received from device.