This is a server implementation of the HTTP protocol of the OwnTracks
app client,
it can handle the payload and store in a cloud data base DetaBase
for read/query,
and also be hosted on DetaMicros
Demo
at: DetaMicros
Install it using:
$ git clone https://github.com/cgmark101/owt-back.git
$ cd owt-back
$ virtualenv env
$ . env/bin/activate
$ cd src
$ pip install -r requirements.txt
Edit base.py and main.py, paste your deta key (generated in their website) at deta.sh
deta = Deta('your_super_secret_deta_key')
db = deta.Base('ot') # Database name
Run this file one time to initial fill the database.
$ python base.py
And finally run
$ python main.py
Navigate to localhost:8000/docs to see the interactive documentation (You have to open port 8000 in this case to be able to receive the payload from owntracks)
Inside the app navigate to preference->connection->mode
and sellect HTTP
Inside the app navigate to preference->connection->host
fill it with http://your-domain:8000/position/
Inside the app navigate to preference->connection->identification
just fill device id
and tracker id
Inside the app navigate to preference->reporting->aditional data
and turn it on.
And you are done, take your phone, and do some moves to see your position updated and store in the database