Working in my RPI (traccar server), I copied the keys from an Ubuntu server. All the time I get "curl error (7)" but is working fine. I wonder if 5 mintes (300) is a safe time.
thanks
It probably doesn't make sense to use 5 minutes. Google keeps giving me the same old location if I request too frequently. I think maybe something like once an hour is more reasonable.
hi Anton,
I added other device and now both are on tracking, but most of the time are with me :-) , I´m thinking a way to track on demand, maybe with a "custom command" but to the server to run a script, is there any way to do it? Thanks
Maybe you missed the update, but we already commands.
Hi and thanks for this great project!
I’ve successfully configured the microservice to retrieve the position of 5 Google Find My Device, and everything’s working smoothly with a 1-hour update rate. (including the single position update feature. But adding the attributes to each token is a bit tedious. Is there any other option ?)
In fact, this setup is working even better than the original Find My Device app — I’m consistently getting fresher and more accurate positions via the microservice. Amazing work!
Google Detection
I’m not sure if Google is actively monitoring or limiting this usage, but so far I haven’t run into any issues with bans or throttling.
Semantic Location Limitation
When a token is at a known place like “Home,” the Find My Device backend returns a semantic label instead of GPS coordinates. In these cases, the microservice returns a 404, and Traccar doesn’t report any location.
Feature Request Idea:
Add a way to convert semantic locations to predefined GPS coordinates using a mapping file (e.g., semantic_locations.json
).
This would be useful for tracking items left at home or work — a niche but valuable improvement.
Position History = Game Changer
Being able to get and retain a position history for the token via Traccar is a major upgrade. This goes far beyond what the official app provides.
Update Frequency
Has anyone tried using a higher update frequency (e.g.,5 minutes is too low but every 10–15 minutes)?
I’m curious about how far we can push the limits without triggering rate limits or bans from Google.
One minor thing I noticed: in the manual install instructions, the virtual environment activation was missing. Here's a corrected sequence:
cd /opt/
git clone https://github.com/traccar/google-find-hub-sync.git
cd google-find-hub-sync
python3 -m venv venv
. ./venv/bin/activate # This line was missing
pip install -r requirements.txt
python3 main.py
For Docker users, here's an excerpt of my working compose.yaml
:
compose.yaml
directory:git clone https://github.com/traccar/google-find-hub-sync.git
find-hub:
container_name: find-hub
image: google-find-hub-sync:latest
build:
context: ./google-find-hub-sync
tags:
- "google-find-hub-sync:latest"
environment:
AUTH_TOKEN: "1234567890"
PORT: 5500
PUSH_URL: http://traccar:5055 # replace with your actual Traccar service name
volumes:
- ./periodic_jobs.json:/app/periodic_jobs.json
- /etc/localtime:/etc/localtime:ro
3 Build and start with
docker compose build
docker compose up -d
Thanks for feedback.
Feature request for semantic positions you can post on GitHub. I think it's a good idea. Not sure when we'll have time, but we should probably support it.
I figured I'd post some summary information about this for those of us still confused by what is happening under the covers.
So, even more simply, you're taking position data from trackers in google, translating it to Osmand format, and pushing it into traccar.
Great summary. One thing to add is that you don't need to use curl. You can send commands directly from Traccar.
Thank you for your explanation.
I've already prepared my environment – including access to the Osmand port 5055, creating the two devices on my Traccar server, and building the Docker image for the microservice. The login via Chrome – initiated by main.py – was successful. Maybe I'm just too stupid – but which string in the secrets.json should be the AUTH_TOKEN? The string after "auth", "security_token" or anything else?
AUTH_TOKEN is a key that you set yourself. It has nothing to do with secrets.json.
API_KEY is the key set when starting microservice.py, e.g.:
python microservice.py --auth-token MySecretKey --push-url=http://localhost:5055
It acts like a password and is required for sending HTTP REST commands:
curl -X POST -H "Authorization: Bearer MySecretKey" "http://localhost:5500/devices/DEVICE_ID/position-periodic?interval=300"
Note: curl is not included in python:3.11-slim if you are using docker consider adding it to the Dockerfile or changing to the python:3.11 image . Without exposing the microservice port and using only a backend Docker network, sending commands becomes harder. I understand not installing curl in the Traccar container, as it's more exposed to the internet and adding unnecessary tools can increase the attack surface.
@anton: "You can send commands directly from Traccar."
Note: curl is not included in python:3.11-slim if you are using docker consider adding it to the Dockerfile or changing to the python:3.11 image . >Without exposing the microservice port and using only a backend Docker network, sending commands becomes harder. I understand not installing >curl in the Traccar container, as it's more exposed to the internet and adding unnecessary tools can increase the attack surface.
That's absolutely true. But I don't think it will be necessary to add curl to any of the containers involved. In my environment, both the Traccar container and the microservice container run on the same (virtual) Debian machine. The two containers can reach each other via the IP range 172.17.0.0/16 – and this Docker subnet is also accessible from the Debian VM. You could now use the method described by Anton and send the commands directly from Traccar, or even run curl from the Debian VM.
Just for an initial test, I just ran the following on the Debian VM:
curl -X POST -H "Authorization: Bearer 123123123123123" "http://172.17.*.**:5500/devices/<Device-ID>/position-periodic?interval=300"
And it works perfectly.
Since then, the position has been pushed to Traccar every 5 minutes.
What I don't know yet is how to change the interval or stop the entire process I started with curl... :D Does anyone know?
What you're sending is an invalid request. You should use the device identifier, not index.