Skip to content

Backend of a Realt-time Geo Tracking System using Owntracks + Deta

Notifications You must be signed in to change notification settings

cgmark101/owt-back

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

OwT server

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

Installation

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
    

Config

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

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)

Owntracks app config

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

About

Backend of a Realt-time Geo Tracking System using Owntracks + Deta

Topics

Resources

Stars

Watchers

Forks

Languages