Airtag and Traccar > Now running

Marcin3 years ago

For everybody else who is interested:
It is possible to run periodicaly a script on a Mac which uploads the data from "Find my" App.
I have it working with seven of them.
Just got some Finetuning todo.
A MacBook Air uses arround 3W of power while doing this.
But you have to have at least BigSur

Anton Tananaev3 years ago

Can you share the scripts?

Marcin3 years ago

I am still on finetuning (&timestamp and &fixtime seem to be the same)
If i think i cant blame anymore i will post it here

Imzenreally2 years ago

Super interested in this - I've got a couple airtags on my dog and keys and while the whole apple thing is nice I'd love to have them all in one spot

Imzenreally2 years ago

I briefly looked into extracting data from the Find My app on my Mac mini wasn’t able to find much what are you using to extract data are you pulling from a database or what?

Marcin2 years ago

I changed the script from
https://github.com/icepick3000/AirtagAlex/blob/main/AirtagAlex.sh
took the variabes and filled them in an osmand compatible URL
Works fine on a MacBook Air with 3W of Power.
But code still looks ugly. Actualy theres no time spending on this.
If some body wants them: Where can i upload it?

Marcin2 years ago

So i made it to github. Quick and dirty:
https://github.com/SchorschKloni/AirtagAlex/
Do everything from AirtagAlex, add the vars and the URL for your traccar Osmand Port

Anton Tananaev2 years ago

Thanks for sharing.

Imzenreally2 years ago

Boom - go them up and running easy peasy - thanks for posting this I've been looking (half assedly admittedly) for that file on my Mac for a while

Josea year ago

How many devices can I monitor with a single apple account?

Kathrine6 months ago

Good evening,

@Imzenreally, could you please elaborate how you managed to push the csv data to the traccar server? Or at least show me in the right direction where to start?

The AirtagAlex.sh script runs nicely and creates a csv file with the positions and identiifer. I now just need to send this data to my traccar server.

Many thanks in advance.

/Kathrine

Imzenreally6 months ago

Katherine be aware - newer versions of OS X hash the find my file and other stuff - so whatever you are using as a server don’t upgrade - and don’t us a VM

I’ll grab my laptop and share my script to post to my Traccar server

Imzenreally6 months ago

this is the last thing to run in the AirTagalex for loop

aside from the done sleep

make sure you update your ip or domain

        echo "Report to Traccar"
        tracname=`cat ~/Documents/Airtags/Items.data | jq .[$j].name | sed 's!"!!g'`
        batterystatus=`cat ~/Documents/Airtags/Items.data | jq .[$j].batteryStatus`
        akku=$((batterystatus * 100))
        wget --spider -q  http://[MY FQDN]:5055?id=$tracname\&lat=$locationlatitude\&lon=$locationlongitude\&speed=0\&user=Airtag\&batteryLevel=$akku\&accuracy=$locationhorizontalaccuracy\×tamp=$locationtimestamp
    echo $tracname
    echo $akku
        echo "Reported to Traccar"
Marcin6 months ago

@Imzenreally
Does this mean: "If i update my Macbook i cant use FindMy anymore for this?"

Kathrine6 months ago

Good evening,

@Imzenreally
Thank you very much!