Traccar Server


Traccar uses GPS for tracking and has support for over 1500 different types of devices. You can use the Traccar Server integration to communicate with your own Traccar Server, which is also available as Home Assistant add-on.

Looking for documentation on how to setup the Traccar Client with webhooks in Home Assistant? See the Traccar Client integration documentation.

Configuration

To add the Traccar Server integration to your Home Assistant instance, use this My button:

Events

The Traccar Server integration options allow you to define a list of events you want to listen for. These events will be sent to Home Assistant as events.

All events will be prefixed with traccar_ followed by a snake_cased version of the event name. Examples:

  • The deviceMoving will be fired in Home Assistant as traccar_device_moving.
  • The geofenceExit will be fired in Home Assistant as traccar_geofence_exit.
  • The alarm will be fired in Home Assistant as traccar_alarm.

All events will also have the following data:

Device ID

(device_traccar_id) This will be the device ID that the event is related to.

Device name

(device_name) This will be the name of the device that the event is related to.

Type

(type) This will be the type of the event.

Server time

(serverTime) This will be the time the event was received by the Traccar Server.

Attributes

(attributes) This will be a dictionary of attributes related to the event.

Devices

The Traccar Server integration will create devices for each device registered in the Traccar Server with at least one position update.

These device representations in Home Assistant will have entities associated with them, which you can use in automations, scripts, and display on your dashboard.

Entities

The traccar server integration will create entities in with the following domains:

For more details about each of these, see the sections below.

Device Tracker

The Traccar Server integration will create a device tracker entity for each device registered in Traccar Server.

Name

The name of the device tracker will be set to what you have named it in Traccar Server.

Entity ID

This will be a slugified version of the name of the device tracker.

Unique ID

This will be the unique ID of the device tracker in Traccar Server.

State

As a device tracker, the state will be home or not_home.

Examples

So you set up the integration and it pulled in all your devices. Now what? Below are some examples of what you can do with the data provided by Traccar Server integration.

Automations

In this section you will find some example automations that you can use to get started with the Traccar Server integration.

Do something when a device enters a geofence

The allows you to do something when the device device_tracker.millennium_falcon enters the defined geofence.

Do something when a device are speeding

The allows you to do something when the device device_tracker.millennium_falcon exceeds a defined speed.