aboutsummaryrefslogtreecommitdiff

GPSplot

GPSplot reads location data from files produced by the GPSLogger Android app and stores it in a PostgresQL database.

Like ledgerplot, it is intended to be run as an unattended process on a server (to which you sync your location data CSV files, e.g. with Syncthing) in order to feed updated data to Grafana.

Building

If you have Guix installed, you can set up a development environment easily using guix shell -Df guix.scm.

Otherwise, you'll have to install the required Lisp packages manually. See gpsplot.asd for the list of dependencies.

Once everything is installed, run make to build the bin/gpsplot executable.

Running

Run the bin/gpsplot produced above. Use the --help option to see what it can do.

You should point the GPSPLOT_DIR environment variable at the local directory containing CSV files produced by GPSLogger.

Manual testing

Since I have a WireGuard network that includes the machine running my Grafana instance, I can do the following to set up a temporary Postgres server. Grafana can then connect to it and I can interactively plot the containing data.

initdb -N testdb
echo "host testdb $(whoami) 10.0.0.0/24 trust" >> testdb/pg_hba.conf
echo "host testdb $(whoami) fc00::/64 trust" >> testdb/pg_hba.conf
postgres -F -h 10.0.0.x -D testdb -k "$XDG_RUNTIME_DIR" &
createdb -h "$XDG_RUNTIME_DIR" testdb 'Test database for gpsplot'