Skip to content

Latest commit

 

History

History
79 lines (54 loc) · 1.86 KB

File metadata and controls

79 lines (54 loc) · 1.86 KB

SenseBox - Perfect Cycling Roads

Members

Steps to build and run the application

  1. Install NodeJS: https://nodejs.org/en/
  2. Open a terminal and move with command cd to the directory of the project
  3. Install the Node-Packages with command sudo npm install
  4. Create a new folder in /public/lib (by command-line mkdir /public/lib)
  5. Install Bower sudo npm install -g bower
  6. Move with command cd /public to the directory public
  7. Install Bower-Packages with command bower install
  8. Move with command cd ../ back to the directory of the project
  9. Run NodeJS-Server with the command node server.js
  10. Open a web-browser and go to localhost:8080

Example Data

Sensebox

POST http://localhost:8080/api/boxes

{
    "name": "Perfect Cycling Roads",
    "boxType": "mobile"
}

Please remember the generated BoxId!

Track

POST http://localhost:8080/api/boxes/:boxId/tracks

{
    "box_id": "56a4e8380a303b3df692694c"
}

Please remember the generated TrackId!

Measurements

POST http://localhost:8080/api/boxes/:boxId/tracks/:trackId/measurements

{
    "track_id": "56a4e8660a303b3df692694d",
    "timestamp": "12/21/2015 13:37:04",
    "lat": 51.965240,
    "lng": 7.598272,
    "altitude": 353.40,
    "speed": 0,
    "sound": 41,
    "vibration": 1.46,
    "brightness": 1134,
    "uv": 0,
    "ir": 0
}

GET http://localhost:8080/api/boxes/:boxId/tracks/:trackId/measurements

Example-Measurements

Please see: data.json