- Getting Started
- What is TraccaPy?
- Dependencies
- Installation
- Configuration
- Compatibility
- Contributing
- License
- Acknowledgements
- Notice
These instructions will explain to you how to get a copy TraccaPy running on your machine.
TraccaPy is a Python script that uploads your location to Traccar.
This tool uses gpsd to get the current location, speed, bearing, altitude and accuracy.
I used tPacketCapture to find out what the endpoint was for updating device location.
- Clone the repository:
git clone https://gitlab.com/LapinoLapidus/traccapy
. - Rename
config-sample.json
toconfig.json
. - Modify the config.json file (see Configuration).
- Set up gpsd, I had to use /dev/serial0, since ttyAMA0 did not work.
- Run the file,
python3 Main.py
.
You should edit the configuration file.
It contains the following:
- sleep_time(int): time to wait between position checks. Example:
60
- server(string): location of Traccar server(include http(s) and port number). Example:
http://192.168.2.1:8082/
. - device_id(int): has to correspond with the ID you made in Traccar. Example:
12345
. - min_distance(int): Minimum distance required to send location, in meters. Set to negative to disable. Example:
10
. - logging(bool): Set to true if you want to log to stdout on success and error. Example:
true
.
I've only tested this on a Raspberry Pi 3 running Raspbian using the Adafruit GPS.
It should work on any device running gpsd but I'm unsure.
Pull requests are welcome and appreciated. For major issues, please open an issue first please.
Please be sure to test your changes before submitting.
This project is licensed under the MIT License - see the LICENSE.md file for details.
I am in no way affiliated with Traccar Ltd, this is a fan-made project.