Traccar Client on Raspberry Pi RPi

C-Fu4 years ago

Good day,

I know that you can install the Traccar Server on RPi, but what about a client?

I'm thinking several RPis with USB/GPIO GPS as clients, sending kml/location info (real-time or synced periodically) to a RPi-based Traccar Server. Would this be possible? And how?

I don't mind using Android phone as client, but I have no idea how to turn it on automatically with car ignition. With RPi it's easy, just tap the fusebox, battery and ignition power.

Piotr4 years ago

You can just use curl or a similar tool and osmand protocol.

C-Fu4 years ago

Thanks @Piotr, but mind expanding a teeny bit more?

So I'm guessing, I would need to compile the tracing location into a kml format/file, then periodically update/send the kml file to the traccar server?
Or do I need to somehow queue lines like these into a file say, curlrequest.sh:

root@traccar# cat curlrequest.sh
#!/bin/bash
#example from https://www.traccar.org/osmand/
curl http://traccarserver:5055/?id=123456&lat={0}&lon={1}×tamp={2}&hdop={3}&altitude={4}&speed={5}
curl http://traccarserver:5055/?id=123456&lat={0}&lon={1}×tamp={2}&hdop={3}&altitude={4}&speed={5}
curl http://traccarserver:5055/?id=123456&lat={0}&lon={1}×tamp={2}&hdop={3}&altitude={4}&speed={5}

and then

root@traccar# ./curlrequest.sh

Am I doing it right? Sorry I'm new to all of this

bigbohemia3 years ago

Hi @C-Fu,

I've been working on a Python script to submit GPS information using the GT06 protocol, which you can use as a Raspberry Pi client. It does need an internet connection from the car though. You can see the code at the following GitHub:

https://github.com/lmandres/GT06ScannerClient