Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.mkd

OpenXC Web Logging Example Application

This is a small Python web application (using the Tornado framework) that receives trace messages from an OpenXC-enabled and network-connected device and them out to disk, split by hour. It supports visualizing a single vehicle's data in real-time using HighCharts and Google Maps.

This application is intended as a proof-of-concept and is lacking in quite a few areas - please do take this as a starting point for a web-enabled OpenXC application, but don't expect this to be production-ready out of the box!

Installation

First, I recommend installing pip, the Python package manager (if you don't have it already):

$ [sudo] easy_install pip

Next, clone this repository and install the Python requirements:

$ git clone https://github.com/openxc/web-logging-example.git
$ cd web-logging-example
$ pip install -r pip-requirements.txt

While not required, I also recommend installing Fabric - it's a command-line tool that I use to create shortcuts for some common tasks (running the development server, resetting the database, etc.).

$ pip install fabric

Running

Without Fabric:

$ python recorder.py

Using Fabric:

$ fab runserver

Test data

You can send test data with a Fabric command:

$ fab send_test_data:path_to_trace.json

API

All API calls accept JSON. There is no authentication (seriously, don't try and run this example app in production!).

Create new log records

The format of the individual log messages should match the output format from an OpenXC vehicle interface.

POST /records

{'records': [
    {'timestamp': 1332975697.078000, 'name': 'steering_wheel_angle',
            'value': 42.0},
    {'timestamp': 1332975698.078000, 'name': 'steering_wheel_angle',
            'value': 38.0}
]}

Contributing

Please see our Contribution Documents.

License

Copyright (c) 2013 Ford Motor Company Licensed under the BSD license.

About

Example OpenXC web application in Python for vehicle data logging

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.