Giter Club home page Giter Club logo

ruptela_uploader's Introduction

Ruptela Uploader

This projects allows to upload configuration files fa5c from ruptela GPS tracker into traccar software by leveraging the traccar api. It requieres to allow event forwarding from traccar into the server url where this app is running to listen the event emitted by traccar so it recognizes the current state.

This is a concept project and if yopu plan to use it , is at your own risk,

Traccar Integration Event Foward

Below is the sequence diagram between Ruptela Uploader and traccar. The calls from Ruptela Uploader to raccar are rest api calls to traccar api, and the event forwading are the events emmited by traccar and redirected to Ruptela Uploader.

First you need to enable the events forwad from traccar into your application by adding below lines into the traccar.xml

    <entry key='event.forward.enable'>true</entry>
    <entry key='event.forward.url'>http://your.domain/traccar_events</entry>

Traccar Integration Ruptela Uploader user

You need to create a config file in config/default.json using below as a template

{
    "server": {
        "traccar_host": "traccar.instance",
        "traccar_port": 443,
        "traccar_protocol": "https",
        "traccar_authorization": "Basic YWRtaW46YWRtaW4=",
        "local_upload_dir": "./files",
        "local_port": 9090
    }
}

traccar.instance is the url of your traccar instance traccar authorization is the http header used to authenticate in traccar, is a base 64 encode string user:passwrd (in this example is admin:admin) local_upload_dir is the local directory used by ruptela uploader to hold the files it will upload to traccar

Ruptela Uploader running

First you need to install node js 10.x as well as the dependencies with npm install, once you have dependencies run with traditional npm start

How to upload configuration

You need to send a POST request with the device id from traccar in the field device as well as the file exported from Ruptela as fp4c.

The uploader will read the file and split it on packages and send one by one to the device via traccar using the API.

curl -F "device=3" -F "file=@/home/user/configuration.fp4c" https://your.domain/configuration

Pending Work

The current implementation allows to upload configuration, and even when downloading is possible , we need to implement a change on traccar as currently the commandResult is exposed as string, and the hexadecimal values got lost, so we might need to change traccar code to allow us to read the values in result as hexadecimals and not strings.

[X] Upload configuration [ ] Download current config

ruptela_uploader's People

Contributors

matlock08 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.