https://github.com/mukuljainx/driveanalytics
Backend for Drive Analytics
https://github.com/mukuljainx/driveanalytics
influxdb mongodb nodejs time-series-analysis time-series-database
Last synced: about 2 months ago
JSON representation
Backend for Drive Analytics
- Host: GitHub
- URL: https://github.com/mukuljainx/driveanalytics
- Owner: mukuljainx
- Created: 2017-02-27T18:31:53.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-20T07:08:02.000Z (3 months ago)
- Last Synced: 2025-01-20T08:22:26.099Z (3 months ago)
- Topics: influxdb, mongodb, nodejs, time-series-analysis, time-series-database
- Language: JavaScript
- Homepage:
- Size: 98.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 51
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Stack
- Node.js
- Express.js
- InfluxDB## Data Transfer
Sensor to direct DB using port 8086 (to save time processing),
[more info.]( https://docs.influxdata.com/influxdb/v1.2/guides/querying_data/)## Useful links
- [DB Management](https://docs.influxdata.com/influxdb/v0.13/query_language/database_management/#delete-measurements-with-drop-measurement)
- [DB API / Querying data](https://docs.influxdata.com/influxdb/v1.2/guides/querying_data/)Save per 5 second data into file then transfer to DB
## To Start InfluxDB
- ```influxd``` (starts the server)
- ```influx``` (starts the CLI)## Multiple point data entry
Tags followed by values followed by ts | **Only tags are indexed values are not**
- vehicle,driverId=sethia,tripId=123 engineSpeed=3,throttle=123.9,vehicleSpeed=3 99500000000
## API
- Last trips (label, duration, km) list
- Last trips (label, duration, km) details per trip
- Driver Profile (according to trips) + No. of trips## DB
- User table - label
- Trips [ with label, userid, tripid]
- Individual trips [ all details - speed, load, lat long per second]
- car [car details]## Sending Data from Sensor
Through API in some time interval as given in [Official Doc](
https://www.influxdata.com/how-to-create-iot-influxdb-google-cloud-platform-part-4/).## How it works (tentative)
- Driver logs into the device, selects his car
- Starts the car
- A request is sent to server as soon as car starts to fetch a trip ID and driver ID
- Trip Session starts### What if drivers starts the car first then logs
- If car haven't got the driver ID it will hit server again in every 5 sec to get the driver ID. [limit - 10 times]
- A reminder to owner can be sent that his car has started.## How it works - solution
- Connect Mobile and car using bluetooth
- When car starts user should connect his mobile using bluetooth before starts
- Car Audio system (if available) will alert him to connect if he is not.
- If he forgets to connect trip will registered in the name of the owner, Later on Owner can change the driver by creating a request which driver have to accept to get registered for that trio.
- Car will know the driver ID if he is connected if not then car will assume owner as the driver.## Note
Once after training model, we can tell how driver is driving at every point.[Pyhton - NodeJS custom connect](http://www.sohamkamani.com/blog/2015/08/21/python-nodejs-comm/)