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 😊
- Home Assistant instance running, with access to its
configuration.yaml(for the one-time package step below) - Accessible Traccar Server
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.
- Log in to your Traccar server.
- Create a new device for each
device_trackeryou wish to monitor. - Set the device Identifier in Traccar to the exact
entity_idof the correspondingdevice_trackerin Home Assistant (e.g.device_tracker.pixel_7), as shown in the picture.
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.
-
Download
traccar_positioning.yamlfrom this repository. -
Place the file into the
packagesfolder of your Home Assistant configuration (config/packages/).If you don't have a
packagesfolder yet, create it and make sure packages are enabled in yourconfiguration.yaml:homeassistant: packages: !include_dir_named packages
See the official documentation for more details.
-
Restart Home Assistant to load the new
rest_command.update_traccarservice.
Instead of writing or editing any automation YAML, import the blueprint directly into your Home Assistant instance with one click:
- 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).
- Once imported, go to the new blueprint and select Create Automation.
- Fill in the Traccar Server URL field (e.g.
http://192.168.1.1:5055, port5055is the default for the HTTP protocol). - Select the Tracking Devices (
device_trackerentities) you want to sync with Traccar. - 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.
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.
- 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_traccaraction should show ascontinue_on_error, so a failed call won't stop the automation, but you can still inspect the response in the trace. rest_command.update_traccarservice not found: thetraccar_positioning.yamlpackage wasn't loaded — confirm it's inside yourpackagesfolder, thatpackages: !include_dir_named packagesis set inconfiguration.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 thedevice_tracker.prefix), as that full string is what gets sent as theidparameter.
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
Contributions to the project are welcome! Please fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License - see the LICENSE.md file for details. GNU AGPLv3 © [Lorenzo De Luca][https://lorenzodeluca.dev]
- 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.
