Skip to content

Latest commit

 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Assistant Traccar Device Tracker Integration

Version Downloads buy me a coffee

This package enables the integration of Home Assistant device_tracker entities into the Traccar GPS tracking system by synchronizing device IDs across both platforms. If you like this project you can support me with ☕ , with GitHub Sponsor or simply put a ⭐ to this repository 😊

Buy Me A Coffee

Table of Contents

  1. Requirements
  2. Installation
  3. Usage
  4. Troubleshooting
  5. Support
  6. Contributing
  7. License
  8. Acknowledgments

Requirements

  • Home Assistant instance running, with access to its configuration.yaml (for the one-time package step below)
  • Accessible Traccar Server

Installation

There is no custom integration or HACS package to install — this project is made of two small, standard Home Assistant building blocks: a package (a rest_command that knows how to talk to Traccar) and an automation blueprint (that decides when to send updates, using the UI, without writing any YAML). You set up the package once, then import the blueprint with one click.

Step 1: Configure the Traccar Device

  1. Log in to your Traccar server.
  2. Create a new device for each device_tracker you wish to monitor.
  3. Set the device Identifier in Traccar to the exact entity_id of the corresponding device_tracker in Home Assistant (e.g. device_tracker.pixel_7), as shown in the picture.

traccar_ha_configuration

Step 2: Add the REST Command Package

This file only needs to be added once — it does not need any editing, since the Traccar server URL and device IDs are provided later through the blueprint's UI.

  1. Download traccar_positioning.yaml from this repository.

  2. Place the file into the packages folder of your Home Assistant configuration (config/packages/).

    If you don't have a packages folder yet, create it and make sure packages are enabled in your configuration.yaml:

    homeassistant:
      packages: !include_dir_named packages

    See the official documentation for more details.

  3. Restart Home Assistant to load the new rest_command.update_traccar service.

Step 3: Import the Automation Blueprint

Instead of writing or editing any automation YAML, import the blueprint directly into your Home Assistant instance with one click:

Open this blueprint in your Home Assistant instance.

  1. Click the badge above (it will open your Home Assistant instance and prompt you to import the blueprint — if it doesn't open automatically, go to Settings > Automations & Scenes > Blueprints > Import Blueprint and paste this repository's blueprint URL).
  2. Once imported, go to the new blueprint and select Create Automation.
  3. Fill in the Traccar Server URL field (e.g. http://192.168.1.1:5055, port 5055 is the default for the HTTP protocol).
  4. Select the Tracking Devices (device_tracker entities) you want to sync with Traccar.
  5. Save the automation.

That's it — no more manual YAML editing for the server address or the list of tracked devices; both are configured from the automation's UI form, and adding or removing a device is just a matter of editing the automation's entity list.

Usage

After completing the installation and configuration, your Home Assistant device_tracker entities will be synchronized with Traccar, allowing you to monitor their real-time location.

traccar_devices_tracker

Troubleshooting

  • Position doesn't update in Traccar: check Settings > Automations & Scenes, open the automation created from the blueprint, and look at its trace/logbook after moving the device — the rest_command.update_traccar action should show as continue_on_error, so a failed call won't stop the automation, but you can still inspect the response in the trace.
  • rest_command.update_traccar service not found: the traccar_positioning.yaml package wasn't loaded — confirm it's inside your packages folder, that packages: !include_dir_named packages is set in configuration.yaml, and that you restarted Home Assistant after adding it.
  • Device not appearing / not moving in Traccar: double-check that the device Identifier you set in Traccar exactly matches the Home Assistant entity_id (including the device_tracker. prefix), as that full string is what gets sent as the id parameter.

Support

If you encounter any issues or have questions regarding the integration, please open an issue on this GitHub repository, and I will be happy to assist you. You can write to me at me@lorenzodeluca.dev

Contributing

Contributions to the project are welcome! Please fork the repository, make your changes, and submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details. GNU AGPLv3 © [Lorenzo De Luca][https://lorenzodeluca.dev]

Acknowledgments

  • Thanks to the Home Assistant community for providing a robust platform for home automation.
  • Gratitude to the Traccar team for their excellent GPS tracking system.

About

Send Device Tracker positions from Home Assistant to Traccar Server

Topics

Resources

Stars

39 stars

Watchers

7 watching

Forks

Releases

Sponsor this project

Contributors