Store and access data published by OwnTracks apps
Go to file
2015-08-21 21:11:42 +02:00
.gitignore Make GOOG revcoding URL configurable (for key) 2015-08-16 12:51:06 +02:00
base64.c Initial import 2015-08-14 18:40:35 +02:00
base64.h Initial import 2015-08-14 18:40:35 +02:00
config.h.example s/JSONDIR/STORAGEDIR/g 2015-08-19 18:58:12 +02:00
config.mk Redis default no 2015-08-20 20:35:42 +02:00
file.c s/JSONDIR/STORAGEDIR/g 2015-08-19 18:58:12 +02:00
file.h Initial import 2015-08-14 18:40:35 +02:00
geo.c correctly handle all revgeocoding errors 2015-08-16 12:49:51 +02:00
geo.h Initial import 2015-08-14 18:40:35 +02:00
geohash.c Initial import 2015-08-14 18:40:35 +02:00
geohash.h Initial import 2015-08-14 18:40:35 +02:00
ghash.c remove gotcha 2015-08-20 19:15:23 +02:00
ghash.h Initial import 2015-08-14 18:40:35 +02:00
jget.h Initial import 2015-08-14 18:40:35 +02:00
json.c Initial import 2015-08-14 18:40:35 +02:00
json.h Initial import 2015-08-14 18:40:35 +02:00
LICENSE Addd LICENCEs 2015-08-15 07:54:47 +02:00
Makefile 1st pass at ocat; unfinished by far! 2015-08-20 19:16:26 +02:00
misc.c s/JSONDIR/STORAGEDIR/g 2015-08-19 18:58:12 +02:00
misc.h Add monitor hook (Redis and files) 2015-08-15 13:18:27 +02:00
mkpath.c Initial import 2015-08-14 18:40:35 +02:00
ocat.c on the way to better times (time_t) 2015-08-21 21:11:42 +02:00
ot-recorder.c add list of missing geo lookups 2015-08-21 19:31:26 +02:00
README.md add list of missing geo lookups 2015-08-21 19:31:26 +02:00
safewrite.c Initial import 2015-08-14 18:40:35 +02:00
safewrite.h use safewrite() for monitor hook file so that it cannot disappear temporarily 2015-08-15 16:27:19 +02:00
storage.c on the way to better times (time_t) 2015-08-21 21:11:42 +02:00
storage.h on the way to better times (time_t) 2015-08-21 21:11:42 +02:00
TODO.md add list of missing geo lookups 2015-08-21 19:31:26 +02:00
udata.h configurable QoS (-q) and cleansession=false 2015-08-19 18:24:24 +02:00
utarray.h Initial import 2015-08-14 18:40:35 +02:00
utstring.h Initial import 2015-08-14 18:40:35 +02:00

recorder

Recorder

Requirements

  • hiredis unless HAVE_REDIS is false.

Installation

  1. Copy config.h.example to config.h
  2. Edit config.h
  3. Edit config.mk and select features
  4. Type make

Reverse Geo

If not disabled with option -G, the recorder will attempt to perform a reverse-geo lookup on the location coordinates it obtains. This is stored in Redis (ghash:xxx) if available or in files. If a lookup is not possible, for example because you're over quota, the service isn't available, etc., recorder keeps tracks of the coordinates which could not be resolved in a missing file:

$ cat store/ghash/missing
u0tfsr3 48.292223 8.274535
u0m97hc 46.652733 7.868803
...

This can be used to subsequently obtain said geo lookups.

Monitoring

In order to monitor the recorder, whenever an MQTT message is received, the recorder will add an epoch timestamp and the last received topic a Redis key (if configured) or a file otherwise. The Redis key looks like this:

redis 127.0.0.1:6379> hgetall ot-recorder-monitor
1) "time"
2) "1439738692"
3) "topic"
4) "owntracks/jjolie/ipad"

The monitor file is located relative to STORE and contains a single line, the epoch timestamp at the moment of message reception and the topic separated from eachother by a single space:

1439738692 owntracks/jjolie/ipad