Giter Site home page Giter Site logo

web-logging-example's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.