econpy / torque

A set of tools used with the Torque app for Android to store OBD2 data in MySQL, view GPS data from Torque on a map in real time using the Google Maps JavaScript API, plot OBD2 data in time series charts, and export the data to CSV or JSON.
MIT License
285 stars 120 forks source link

Thanks & Features #14

Open esticle opened 10 years ago

esticle commented 10 years ago

Hi,

As a newbie Torque user I just want to thank the author for this! I much prefer self-hosted solutions such as this - I got my encopy-torque going today without any issues, thanks!

On to that pesky-stupid-user-requests-thing, it would be nice:

Thanks again for a excellent tool!

m4rcu5 commented 10 years ago

Hi,

I would give a big +1 on this one. Thanks for the effort into this app!

Syncing the data with points on the map, and/or even aan bigger graph display would be great.

Would it also be possible to import from csv files? For example the tracklogs of torque, live logging is not always possible.

Thanks!

econpy commented 10 years ago

Thank you everyone. Every feature that has been proposed is one I've wanted to add and am on board with doing.

Next week after I wrap up some stuff at work, I'm going to dive into these and knock them out. Right now the suggestions I have are:

Then there are also some suggestions that will require changing the UI a bit:

Please feel free to voice your opinion on these points. I'd like to hear what you folks would like to see in this/our viewer.

Moreover, how do you feel about the table of stats? Do you like having it? If so, are there particular stats/calculations you'd like to have other than the basic summary statistics I've included this far?

How do you like the data export functionality? I made the CSV export such that it could easily be read into a Python pandas DataFrame via something like:

from pandas import read_csv
df = read_csv("https://data.mattnicklay.com/torque/export.php?sid=1404105073278&filetype=csv")

Would you use an export button that exports every session at once into a single file? This would be pretty easy to add.

Let me know what you think! --Matt

m4rcu5 commented 10 years ago

Hi Matt,

In response to your suggestions;

I am not using the stats in my case, i might be interested in averages/min/max though, this is already implemented, but maybe make the table hideble.

What are you doing with the exported data, currently my use case is aimed toward getting CSV data from the ECU to a graph instead of the other way around. Dumping all at once could be useful, but after a year of driving i could imaging the dumps grow somewhat wealthy.

--Marcus

esticle commented 10 years ago

Have to echo m4rcu5 and thanks econpy!

--Esticle

mo5245 commented 10 years ago

Features and thanks

econpy commented 10 years ago

Good suggestions. Thanks for the continued constructive feedback.

1 is very do able and I value the problem it solves. #3 gives me some good ideas about what to make the new charting functionality look like. I'll work with this.

Can you expand on #2? Do you want to be able to split/group your sessions into different profiles? Based on how profiles work in Torque, a profile should be synonymous with a car. So if a user has more than one car this is definitely necessary. An email isn't necessarily synonomous with a person (where a person is someone who can have 1 or more car). There is an id hexidecimal variable that is better suited for this. Let me know what you were thinking here.

By the way, I started working on the defaultUnit/userUnit stuff and it is coming along well so far. Should be ready to push in a couple days.

mo5245 commented 10 years ago

For second bullet, not having to run multiple instances. cursory look at the sql db (when adding MAF and Voltage fields) profile name only logged once at the top of the session (feature or bug in torque), which should be enough. eml (email field) could be used to differentiate from two different devices but using the profile name should work just fine to differentiate from multiple cars or as a group e.g. daily driving, track day.... (long pause) and then at some point being able to compare sessions with sessions or with session profile (working title for this feature) as this complicates every thing it can wait till the main mode is more complete and maybe an advanced mode depending on how the UI scales to not inconvenience any one off graph usage.

And a quick example of third bullet bug 14ex

smackYYZ commented 10 years ago

Question, can I easily add other data such as gear, throttle, etc that I have displayed ?

Looking at the db schema seems the data fields are hard coded. So is all available data being uploaded or just the selected fields in the DB? And how would I go about best adding more fields?

Great project & work, much appreciated!

Mike

mo5245 commented 10 years ago

Worked for me when I added kff1238 (voltage) and k10 (MAF) and you have to added it to torque logging and upload, select what to log, preferences just put a k in front of the PID. Easy to add with phpmyadmin or use ALTER TABLE via mysql CLI

``

econpy commented 10 years ago

If the PID starts with k, then there is no need to manually modify the database schema. Just select it in Torque and when it gets posted to the webserver it will create a column for the PID. Take a look at the upload_data.php script to see how the logic works. Basically, if the PID/key matches "v", "eml", "time", "id", "session", or anything starting with a "k", it will work. It does regular expression matching on these PIDs.

This matching will change a bit when I finish the default unit conversions as I'll begin accepting defaultUnit* keys and userUnit* keys under special circumstances (first data logs of a session).

econpy commented 10 years ago

I just added one of the requested features in the beta branch. Namely, I added a button to toggle width of the map by hiding the charts/data in the right hand column. Here are two pictures showing what the toggle button does:

Default (Toggle Off): Default

Toggle On: Toggle On

You can add this to your current build by swapping out the session.php and static/js/torquehelpers.js files from the beta branch into your current build.

As mentioned yesterday, the beta branch changes the db schema in order to handle dynamic unit conversions (temperature and speed units) and is not backwards compatible with your old logs as right now due to the non-existence of necessary logs for profile/userUnit/defaultUnit items (these are dropped by the upload_data.php script in the master branch). Once I have a way to add backwards compatibility, I will merge the beta branch into the master branch, but for now it is best to leave them separate in order to prevent confusion/issues.

pjvenda-zz commented 10 years ago

Hi econpy, many thanks for your work, this is something I have been looking for for a while. I have not found telemetry software that is generic enough to take in a .csv with various parameters and I am not keen on uploading my driving logs to a shared server for many reasons.

I have not tried the software but from the demo it is, in my view nearly perfect. I would suggest only a couple of improvements related to this thread:

Again many thanks for the great work on this piece of software, it is very useful for us petrolheads together with torque.

Cheers, Pedro.

deennoo commented 8 years ago

thanks for your job !