Skip to content
This repository has been archived by the owner on Jan 5, 2020. It is now read-only.
/ BPS Public archive

Telnet server to process data from gps trackers

Notifications You must be signed in to change notification settings

JJWTimmer/BPS

Repository files navigation

BPS: Bata Positioning System
For: www.batavierenrace.nl

For use with Xexun tk102-2 trackers.

Configfile:
port: listenport
battery_threshold : voltage at which a low battery action should be taken
mysql_server_host: db host
mysql_server_port: db port
mysql_server_user: db user
mysql_server_pw: db password
mysql_blam_db: db name of the BLAM application
smtp_server: authentication-less smtp server for sending low battery emails, on port 25
from_address: from address in the emails sent by bps
notify: comma separated list of emailaddresses to notify on low battery (can be empty string to disable)
json_domain: domainname where to post gps data without http:// and without trailing slash
json_path: path relative to domain, ending in the scriptname to post to.
vehicle_service: webservice where to get the imei to vehicle data
vehicle_app: name of the webservice application
vehicle_password: identification password for the webservice
vehicle_refresh: seconds to cache the vehicle data before polling for changed IMEI numbers

Usage:
$twistd -y BPS.py 	--> as daemon on linux
$./start.sh			--> as daemon on linux (make executable with $chmod +x start.sh)
$./stop.sh			--> to stop the linux daemon (make executable with $chmod +x stop.sh)
$python start.py	--> as console app on windows

requirements:
python 2.6 or 2.7 pythonlibs: Twisted, suds, MySQLdb (on Ubuntu: python-twisted python-suds python-mysqldb)
localhost smtp server on port 25 w/o authentication

Troubleshooting:
Make sure ~/bps/BPS.log is writable.
Make sure start.sh and stop.sh are executable

Outputs a json file to the script, where id = imei of tracker and speed is in km/h:
{
    "direction": "193.61", 
    "timestamp": "2011-11-05T20:50:59.344000Z", 
    "longitude": "4.xxxxxx", 
    "latitude": "52.xxxxxx", 
    "speed": "1.665000", 
    "id": "xxxxxxxxxxxxxxx"
}

About

Telnet server to process data from gps trackers

Resources

Stars

Watchers

Forks

Packages

No packages published