Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
ec54928
When loading, automatically query the most recent session and load th…
surfrock66 Jun 25, 2015
16cfd00
No longer chooses 2 default variables, now waits on variable selectio…
surfrock66 Jul 22, 2015
17ec356
No longer chooses 2 default variables, now waits on variable selectio…
surfrock66 Jul 22, 2015
e806227
Syncing local sources
surfrock66 Jul 28, 2015
6ec3c75
Syncing local copies
surfrock66 Jul 28, 2015
a4a8dc7
Syncing Local Sources
surfrock66 Jul 28, 2015
1304c47
Syncing Local Sources
surfrock66 Jul 28, 2015
f9e808d
Syncing Local Sources
surfrock66 Jul 28, 2015
80040fc
Tidying up comments/documentation
surfrock66 Jul 30, 2015
ae212c8
Tidying up comments/documentation
surfrock66 Jul 30, 2015
e2129f5
Removed check for empty variables, as it was very slow and didn't gai…
surfrock66 Jul 30, 2015
791b2cc
Fixed regression in choosing default variables code...I broke it when…
surfrock66 Jul 30, 2015
cd6b2c4
Experimental support for plotting between 0-5 variables. All will sh…
surfrock66 Aug 7, 2015
f9c54c4
Store new variables as a float when compatible, which will allow them…
surfrock66 Aug 10, 2015
d006e10
Added support for UNLIMITED variables to show up in data summary. Te…
surfrock66 Aug 12, 2015
69b5344
The tooltip over the graph now includes a timestamp. Note, this isn't…
surfrock66 Aug 17, 2015
fe4c281
Updated README to show my own demo server, since I've made so many ch…
surfrock66 Aug 17, 2015
e0050e3
Successfully enable the ability to plot an unlimited number of variab…
surfrock66 Aug 19, 2015
b5670b2
Whitespace and html cleanup...makes the code easier to read for debug…
surfrock66 Aug 21, 2015
f346a42
Got away from csv-based json variable definition, now using mysql tab…
surfrock66 Aug 24, 2015
811b85c
Got away from csv-based json variable definition, now using mysql tab…
surfrock66 Aug 24, 2015
b58cdbf
Additional work on mysql stored descriptions and units
surfrock66 Aug 24, 2015
387a1da
Preliminary support for date filtering in session selection. Also, p…
surfrock66 Aug 28, 2015
5e3a0dd
HUGE update to enable filtering by dates, and in the future filtering…
surfrock66 Sep 1, 2015
35b5cc8
Code cleanup and comments added. Tested some more edge cases and cle…
surfrock66 Sep 2, 2015
ef134d9
Update README.md
surfrock66 Feb 18, 2016
4b6095b
Fixed the PID edit scheme; now you can edit PID metadata and enable/d…
surfrock66 Mar 17, 2016
555c42b
Merge branch 'master' of github.com:surfrock66/torque
surfrock66 Mar 17, 2016
415db76
Fixed the PID edit scheme; now you can edit PID metadata and enable/d…
surfrock66 Mar 17, 2016
cc3127c
Updated the sql table create routines
surfrock66 Mar 17, 2016
31b2f0d
Fixed profile recording in upload. Also allowed profile name to displ…
surfrock66 Mar 18, 2016
2a50586
Prep work for separate sessions table. Fixed the pid edit so it chan…
surfrock66 Mar 21, 2016
1f8efd8
Session table now built. Session table create script finalized. Sessi…
surfrock66 Mar 22, 2016
57eb67a
Small tweak; notice should not be consolidated since it's not a once-…
surfrock66 Mar 22, 2016
a141eca
So, I am an idiot. All my testing was uploading from the app to the w…
surfrock66 Mar 23, 2016
6b485c0
Couple of code tweaks, updated the README with new screenshots
surfrock66 Mar 24, 2016
68f47d6
Added some debugging flags for tracking load slowness. Bunch of uplo…
surfrock66 Mar 28, 2016
3a4e696
MANY patches. After yesterday's fix, I was able to get a good debug …
surfrock66 Mar 29, 2016
005ba45
License update, some bug fixes to clean up apache logs, finally think…
surfrock66 Apr 1, 2016
9cc0ff5
Filtering by session WORKS! HUZZAH! Now...tracks recording sessions…
surfrock66 Apr 4, 2016
2cc000d
I believe I fixed the delete session function, it purges from both th…
surfrock66 Apr 5, 2016
a3366bf
Deleted timezone.php, since we're done with it.
surfrock66 Apr 5, 2016
89bf38d
This is a big edit...I've got experimental support for merging sessio…
surfrock66 Apr 15, 2016
e2fba27
Bugfix, thanks to Jamie Bailey, I had a bad php string (I had a <? in…
surfrock66 Apr 16, 2016
3bc17a1
Fixed a merge bug...I was choosing the earliest time for both the sta…
surfrock66 Apr 18, 2016
cbd4795
Added a confirmation to merging sessions, which is good. Gonna add s…
surfrock66 Apr 18, 2016
8eae42f
Ok, fixed the export. It's not super prett, not because it doesn't w…
surfrock66 Apr 20, 2016
b8ea73a
First, I updated my server to Ubuntu Server 16.04, which comes with a…
surfrock66 Apr 22, 2016
66bcd4d
Pushed out a potential fix for https://github.com/surfrock66/torque/i…
surfrock66 Apr 22, 2016
09c40bc
Test fix for profile name not getting recorded. When the profile dat…
surfrock66 Apr 28, 2016
e981e08
Working on some data upload anomalies. Noticed that a bunch of sessi…
surfrock66 May 2, 2016
aaad397
Changed table creation to use the InnoDB engine, instead of MyISAM. …
surfrock66 Jun 22, 2016
f63ee7f
Moving to my version of this when another version has been installed …
surfrock66 Jul 9, 2016
85852dc
Factors out database connection
hufman Sep 25, 2016
e1d2f1b
Prevents sql injection exploits
hufman Sep 25, 2016
180c8e3
Merge pull request #8 from hufman/sql-injections
surfrock66 Sep 26, 2016
d9c0bef
Fixed a table create bug...the code I copied and pasted to backup old…
surfrock66 Sep 26, 2016
4df1cdd
Changes the Edit PIDs link to use the local install
hufman Sep 26, 2016
9e61be8
Merge pull request #9 from hufman/edit-pids-link
surfrock66 Sep 26, 2016
3005491
This has 2 major changes...I got rid of the mysql_ php commands and r…
surfrock66 Jan 8, 2017
05f76ed
Merge branch 'master' of github.com:surfrock66/torque
surfrock66 Jan 8, 2017
44bc460
One more missed bug...mysqli_error() requires a mysqli object/link wh…
surfrock66 Jan 8, 2017
3cd2fd9
mysql_query requires mysqli link - missed for plot.php
adel-s Jan 10, 2017
c9d7e9d
Merge pull request #13 from adel-s/master
surfrock66 Jan 10, 2017
7ad1f0b
fix missed mysql link in mysqli_query functions
adel-s Jan 14, 2017
ba2b920
Merge pull request #15 from adel-s/master
surfrock66 Jan 15, 2017
219a42d
Commit to fix issue 14. Opened another DB connection to handle the m…
surfrock66 Jan 15, 2017
794a638
bugfixed export.php file
adel-s Jan 15, 2017
2ce7d27
Merge pull request #17 from adel-s/master
surfrock66 Jan 15, 2017
1c38b0b
there is no need to round float values - some of them between 0 and 1…
adel-s Jan 20, 2017
4510eff
Merge pull request #18 from adel-s/bugfix/smallplots
surfrock66 Jan 20, 2017
d81d1f5
I caught a couple more mysqli errors, fixed the connection strings.
surfrock66 Feb 8, 2017
2d7dea2
Merge branch 'master' of github.com:surfrock66/torque
surfrock66 Feb 8, 2017
5a7d7d6
Export was broken, figured out why and fixed it. Readying for improv…
surfrock66 Feb 12, 2017
b00d97b
bugfixed pid_commit.php no update database
takashisite May 17, 2017
436318b
Merge pull request #20 from takashisite/hotfix/fixed-edit-pid
surfrock66 May 17, 2017
e555902
This is a major, structural change which represents a new release. T…
surfrock66 Feb 3, 2019
43c5aa0
Merge branch 'master' of github.com:surfrock66/torque
surfrock66 Feb 3, 2019
2683973
Cleaning up some stuff after huge merge.
surfrock66 Feb 3, 2019
67b30d9
Had a bug from a bad find/replace in a DB create script, and a straig…
surfrock66 Feb 3, 2019
45e0747
Patch to enable multi-user support. I've tested it as much as I can;…
surfrock66 Feb 27, 2019
1ad47c6
Per stealer0517's issue (Issue 27) I slapped a filter on the units co…
surfrock66 Feb 27, 2019
cb06712
This adds feature #3 from my feature list in issue #26 where the mini…
surfrock66 Mar 1, 2019
d42ffb4
Fixed a bug...deleteda line when messing with the minimum session siz…
surfrock66 Mar 6, 2019
c09c64a
Per commit from adel-s' fork, get rid of redundant result freeing.
surfrock66 Mar 11, 2019
c6499fe
Fixing issue #28 where I left a testing flag in the DB upgrade code :…
surfrock66 Apr 10, 2019
ea59b29
Allow set other mysql connection port
ayasystems May 2, 2019
4b44afa
Allow change mysql port
ayasystems May 2, 2019
cc0174d
Merge pull request #2 from ayasystems/patch-2
ayasystems May 2, 2019
e18d6fa
Merge pull request #1 from ayasystems/patch-1
ayasystems May 2, 2019
48340b8
Update url.php
ayasystems May 2, 2019
46177a4
Merge pull request #31 from ayasystems/master
surfrock66 May 2, 2019
16465df
Small patch to add default values in some cases users reported.
surfrock66 Jul 24, 2019
1a0e049
Merge branch 'master' of github.com:surfrock66/torque
surfrock66 Jul 24, 2019
d592b0d
Fixed a bug where new PIDs weren't properly being added to the logs a…
surfrock66 Aug 26, 2019
a29bc83
Fixed some bugs I found after convering my test-environment to php 7.…
surfrock66 Oct 31, 2019
0abf8a5
Fixed the fact that the header for sql results is case sensitive now.…
Dec 2, 2020
2df1006
Update export.php
mo5245 Jun 8, 2021
f1c0215
Merge pull request #40 from mo5245/patch-1
surfrock66 Jun 8, 2021
ace2586
OpenStreetMap
mo5245 Jun 25, 2021
d6ff349
Merge pull request #41 from mo5245/master
surfrock66 Jun 25, 2021
5f58006
Fixed a couple of tweaks I noticed needed to be made to work with new…
Jun 30, 2021
8ccb096
Fixed a regression from me being sloppy about starting to work on thi…
Jul 3, 2021
fd9609f
Support for session time slider
mo5245 Jul 12, 2021
57f66f5
Support for session time slider
mo5245 Jul 12, 2021
498bc1b
Support for session time slider
mo5245 Jul 12, 2021
3fd89b3
Support for session time slider and map markers
mo5245 Jul 12, 2021
435d5b6
Merge branch 'surfrock66:master' into master
mo5245 Jul 12, 2021
8e232eb
Fix functionality
mo5245 Jul 12, 2021
fea5281
Updates for map providers
mo5245 Jul 22, 2021
112d283
Merge pull request #42 from mo5245/master
surfrock66 Jul 22, 2021
eb660c4
Updates for Open Street Map
mo5245 Jul 22, 2021
0b9053e
Create map_providers.php
mo5245 Jul 22, 2021
f2bb446
Open Street Map updates
mo5245 Jul 22, 2021
312e0df
Merge branch 'surfrock66:master' into master
mo5245 Jul 22, 2021
e80b2a0
Merge pull request #43 from mo5245/master
surfrock66 Jul 23, 2021
c32224b
Map Providers reminder to add variables
mo5245 Jul 24, 2021
7ac50d6
Catch missing creds variables reminder
mo5245 Jul 24, 2021
a0dcf3b
Merge pull request #44 from mo5245/master
surfrock66 Jul 24, 2021
0a17b4b
Made a tweak to turn map_providers from require_once to require to fi…
Jul 24, 2021
db7f115
Took another pass at the TABLE_NAME caps issue, did a more thorough g…
Aug 30, 2021
2047b20
added openlayers as a new map provider with open street map as a tile…
JauminaKape Sep 13, 2022
386bc08
fixed full screen and drag controls + start and end circles were not …
JauminaKape Sep 13, 2022
c0f8076
Merge pull request #49 from Kape-1/master
surfrock66 Sep 13, 2022
bfe6b89
added options for Openlayers to select map provider from ESRI or stam…
JauminaKape Sep 13, 2022
9059203
added Openlayers speed tooltip by segment, changed a php if for a sql…
JauminaKape Sep 14, 2022
b537de8
fixed layer order for the tooltip
JauminaKape Sep 14, 2022
8538581
creates a marker on the map when hovering the chart
JauminaKape Sep 14, 2022
821899a
Merge pull request #1 from Kape-1/testing
JauminaKape Sep 14, 2022
f5dfc80
just some small changes and comments to the Openlayers map provider
JauminaKape Sep 14, 2022
5ee7bf0
fixed a mistake I made in last commit
JauminaKape Sep 14, 2022
b17af76
Changes mostly to be able to trim plot and map data in realtime when …
JauminaKape Sep 14, 2022
66dc6a2
several changes to bne able to call the plot data directly and get a …
JauminaKape Sep 14, 2022
00adf25
various modifications to make charts generated when changing variable…
JauminaKape Sep 15, 2022
19f9720
Merge pull request #50 from JauminaKape/master
surfrock66 Sep 15, 2022
3a85f7d
Merge branch 'surfrock66:master' into testing
JauminaKape Sep 15, 2022
8734baa
several changes and fixes to the chart plot code to be able to genera…
JauminaKape Sep 15, 2022
c251bcf
More changes to make charts updated without reloading, probably finished
JauminaKape Sep 15, 2022
3c083cd
Moved Google Map provider js logic to a static file, also made some m…
JauminaKape Sep 15, 2022
8b6d6ba
Merge pull request #2 from JauminaKape/testing
JauminaKape Sep 15, 2022
7eeb7f9
there was some weird race condition with the google maps script callb…
JauminaKape Sep 15, 2022
be9f482
Merge pull request #51 from JauminaKape/master
surfrock66 Sep 15, 2022
a1fe73f
moved leaflet code to static js and ported the same trim and marker o…
JauminaKape Sep 16, 2022
8000cd4
Merge branch 'surfrock66:master' into master
JauminaKape Sep 16, 2022
ea30c35
added a new query to check max and min values for each field in the s…
JauminaKape Sep 16, 2022
ef5162d
Basically js Map Loader code changes to unify parameter format for th…
JauminaKape Sep 16, 2022
f506adf
just moved slider script to html head
JauminaKape Sep 16, 2022
22aedef
trim wasn't working when pressing the plot button, the function that …
JauminaKape Sep 17, 2022
919063a
Changes to the Openlayers map base layer selector, moved Openlayers m…
JauminaKape Sep 17, 2022
d5c1425
added hability to generate chart and summary from csv,some others jav…
JauminaKape Sep 19, 2022
da304d5
Merge pull request #52 from JauminaKape/master
surfrock66 Sep 19, 2022
499fdc8
trim working in chart generated from csv, still need to adjust map tr…
JauminaKape Sep 20, 2022
30b93f7
just fixed array order in data and map coords
JauminaKape Sep 20, 2022
675c761
Finished fixing trim functions for csv files data
JauminaKape Sep 20, 2022
5388c74
Merge branch 'surfrock66:master' into testing
JauminaKape Sep 20, 2022
711548d
Merge pull request #3 from JauminaKape/testing
JauminaKape Sep 20, 2022
60517f3
This was just a last fix for logs that had no speed data that I forgo…
JauminaKape Sep 20, 2022
b8038eb
from testing summary small chart line was showing reversed
JauminaKape Sep 20, 2022
4f247a1
Merge pull request #53 from JauminaKape/master
surfrock66 Sep 21, 2022
0e4fa74
Per the suggestion of https://github.com/arduiacob I added a bunch of…
surfrock66 Jan 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
The MIT License (MIT)

Copyright (c) {{{2014}}} {{{Matt Nicklay}}}
Copyright (c) for portions of this project are held by {{{2014}}}
{{{Matt Nicklay}}}. All other copyright for this project are held by
{{{Joseph Gullo (surfrock66)}}} {{{2015}}}.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
123 changes: 110 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The interface allows the user to:

# Demo #

[Check out the demo!](https://data.mattnicklay.com/torque/session.php?id=1404557450999)
[Check out the demo!](http://hda.surfrock66.com/torquetest/)

# Requirements #

Expand All @@ -18,14 +18,22 @@ These instructions assume you already have a LAMP-like server (on a Linux/UNIX b
* Apache webserver
* PHP server-side scripting

If in doubt, I'd recommend using Ubuntu 12.04 LTS.
If in doubt, I'd recommend using Ubuntu LTS.

You also need a Bluetooth ODBII adapter, I recommend this one which I've used since 2014:

[BAFX Products 34t5 Bluetooth OBDII Scan Tool for Android Devices](http://www.amazon.com/gp/product/B005NLQAHS)

I also use this to position the adapter in a better location:

[Oem OBD-II OBD2 16Pin Male to Female Extension Cable Diagnostic Extender 100cm](http://www.amazon.com/OBD-II-Female-Extension-Diagnostic-Extender/dp/B007PAHHWM)

# Server Setup #

First clone the repo:

```bash
git clone https://github.com/econpy/torque
git clone https://github.com/surfrock66/torque
cd torque
```

Expand All @@ -41,12 +49,21 @@ GRANT ALL PRIVILEGES ON torque.* TO 'steve'@'localhost';
FLUSH PRIVILEGES;
```

Then create a table in the database to store the logged data using the `create_torque_log_table.sql` file provided in the `scripts` folder of this repo:
Then create a table in the database to store the logged data using the `create_torque_log_table.sql`, the `create_torque_sessions_table.sql`, and the `create_torque_keys_table.sql` files provided in the `scripts` folder of this repo:

```bash
mysql -u yoursqlusername -p < scripts/create_torque_log_table.sql
mysql -u yoursqlusername -p < scripts/create_torque_sessions_table.sql
mysql -u yoursqlusername -p < scripts/create_torque_keys_table.sql
```

### OPTIONAL: Create Google Maps Javascript API Key ###

It's optional, but to be above board, you should create an API key for the google maps javascript API. If you go here [Google Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/) Click the "Get A Key" button, and follow the procedure to create a new project, then go to "Credentials" and make a new API Key, choosing "Server". You'll be using it below.

More guidance is available [here](https://developers.google.com/maps/documentation/javascript/get-api-key).

You don't NEED to do this, but it's the proper way and will actually squash some javascript warnings if you like to keep your debug logs clean.

### Configure Webserver ###

Expand All @@ -69,27 +86,107 @@ Then edit/enter your MySQL username and password in the empty **$db_user** and *

```php
...
$db_host = "localhost";
$db_user = "steve";
$db_pass = "zissou";
$db_name = "torque";
$db_table = "raw_logs";
$db_host = 'localhost';
$db_user = '**steve**';
$db_pass = '**zissou**';
$db_name = 'torque';
$db_table = 'raw_logs';
$db_keys_table = 'torque_keys';
$db_sessions_table = 'sessions';
$gmapsApiKey = ''; // OPTIONAL Create a key at https://developers.google.com/maps/documentation/javascript/
$mapboxApiKey = ''; // OPTIONAL: Create a key at https://account.mapbox.com/auth/signup/
$tomtomApiKey = ''; // OPTIONAL: Create a key at https://developer.tomtom.com/user/register
$thunderforestApiKey = ''; // OPTIONAL: Create a key at https://www.thunderforest.com/pricing/
$hereApiKey = ''; // OPTIONAL: Create a key at https://account.here.com/sign-up
$maptilerApiKey = ''; // OPTIONAL: Create a key at https://cloud.maptiler.com/auth/widget
...
```

If you created map provider API key above, place that in the variable here.

# Map Providers #
Upgraded installs will need add new variables from creds-sample.php to your creds.php additional provider API keys if required and the map options below. Will display message at top of sessions.php and default to ESRI Streets.

Support added for most of the Open Street Map poviders and contributors with the abliltiy to select from avilable map styles.
```php
...
//Map options
$mapProvider = 'esri'; // google,esri,stamen,openstreetmap,mapbox,tomtom,thunderforest,here,maptiler
$mapStyleSelect = 'Streets'; //provider specific see README e.g. roadmap for google, Streets for esri, not used for openstreetmap
...
```
| No API Key Requierd |
| :---: |

| esri | stamen | openstreetmap |
| :---: | :---: | :---: |
|Streets |terrain |
|Topographic |toner |
|USATopo |watercolor|
|Gray |
|DarkGray|
|Imagery |
|NationalGeographic|

| API Key Requierd |
| :---: |

| google | tomtom | here | mapbox | maptiler| thunderforest |
| :---: | :---: | :---: | :---: | :---: | :---: |
|roadmap |main |normal.day |streets-v11 |streets |transport |
|satellite|night |normal.day.grey|outdoors-v11 |basic |transport-dark |
|hybrid | |reduced.day |light-v10 |bright |spinal-map |
|terrain | |satellite.day |dark-v10 |pastel |landscape |
| | |hybrid.day |satellite-v9 |positron |outdoors |
| | |normal.night |satellite-streets-v11|toner |pioneer |
| | |reduced.night |navigation-day-v1 |topo |mobile-atlas |
| | | |navigation-night-v1 |voyager |neighbourhood |

# Settings in Torque App #

To use your database/server with Torque, open the app on your phone and navigate to:

```
Settings -> Data Logging & Upload -> Webserver URL
Settings -> Data Logging & Upload
```
Below are the options which seem to work best for optimal logging, the suggested "File Logging" interval is 1s:

<div align="center" style="padding:15px; display:block;"><img src="http://www.surfrock66.com/images/torque_screenshot_1.png" width="45%" float="left" /><img src="http://www.surfrock66.com/images/torque_screenshot_2.png" width="45%" float="right" /></div>

Enter the URL to your **upload_data.php** script and press `OK`. Test that it works by clicking `Test settings` and you should see a success message like the image on the right:
Additionally, I recommend changing the web logging interval to 1s, though this produces a LOT of data. Some users may want to set this to >=5s.

<div align="center" style="padding-bottom:15px;"><a href="https://storage.googleapis.com/torque_github/torque_webserver_url.png" target="_blank"><img src="https://storage.googleapis.com/torque_github/torque_webserver_url.png" width="49%" align="left"></img></a><a href="https://storage.googleapis.com/torque_github/torque_test_passed.png" target="_blank"><img src="https://storage.googleapis.com/torque_github/torque_test_passed.png" width="49%" align="right"></img></a></div>
<div align="center" style="padding-bottom:15px; display:block;"><img src="http://www.surfrock66.com/images/torque_screenshot_3.png" width="45%" float="left" /><img src="http://www.surfrock66.com/images/torque_screenshot_4.png" width="45%" float="right" /></div>

Enter the URL to your **upload_data.php** script under "Webserver URL" and press `OK`. Test that it works by clicking `Test settings` and you should see a success message like the image on the right:

<div align="center" style="padding-bottom:15px; display:block;"><img src="http://www.surfrock66.com/images/torque_screenshot_5.png" width="45%" float="left" /><img src="http://www.surfrock66.com/images/torque_screenshot_6.png" width="45%" float="right" /></div>

The final thing you'll want to do before going for a drive is to check the appropriate boxes on the `Data Logging & Upload` page under the `REALTIME WEB UPLOAD` section. Personally, I have both **Upload to webserver** and **Only when ODB connected** checked.

At this point, you should be all setup. The next time you connect to Torque in your car, data will begin syncing into your MySQL database in real-time!

### Optional: Home Assistant Integration ###

Per [arduiacob's](https://github.com/arduiacob) suggestion and code submission, this app can now forward sensor data to Home Assistant. This requires 2 variables, one is the URL to your home assistant instance (which is set in the creds.php file and is clearly labeled), and the other is a Bearer Token for the Home Assistant account which will be intaking the data. The bearer token can be pasted directly into creds.php as a variable (which must be uncommented), or if you chose to put the bearer token into the Torque Pro config, this webapp will extract it from the upload request and utilize it. Documentation of the [Home Assistant Torque Integration is available here.](https://www.home-assistant.io/integrations/torque/) Uploaded data will appear as a sensor, most often prefixed with "sensor.vehicle".

### Gotchas ###

If you log a ton of PID's (as I do for debugging) you may encounter an apache bug; Torque uploads data through a huge $_GET request. Apache, by default, allows $_GET requests up to 8190 characters. My sample data upload was 13,619 characters long...this led to some data uploads returning 414 errors instead of 200 responses, which resulted in the app trying over-and-over to re-upload the datapoint, essentially DDoS'ing myself. For this; you can edit your apache configuration to allow any value you like; this is, in general, not recommended and should be set to limit a value as close as possible to what your longest query would be. On my configuration, I edited /etc/apache2/sites-available/000-default.conf and added the following line:

```
LimitRequestLine 15000
```

### Roadmap ###

* Sanity Checks and Warnings for merges and deletes
* Allow for csv imports...captures un-uploaded but recorded data when emailed from torque
* Email-receiver for this? LONG SHOT, but have the server read an email address so you can email tracks from the app
* Ian Hawkins has a google map pin show up when hovering over his graphs on his reference viewer...different system, but it'd be cool to implement.
* Idea: speed heatmap for the map track. (Google Maps iOS API has gradient polylines, javascript API does not...may not be possible for now).

### Credits and Thanks ###

* [Ian Hawkins](http://ian-hawkins.com/) - Creator of the Torque app, none of this happens without that
* [Matt Nicklay/econpy](https://github.com/econpy) - This is the project I forked from, so all credit where credit is due
* [Takashi Saito/takashisite](https://github.com/takashisite) - Spawn for the patch to change the GPS from float to double; I didn't take his pull request because it came with a greater structural update, but he deserves credit for pointing it out
* [marvinwankersteen](https://github.com/marvinwankersteen) - Gave me the idea to implement the "favorite variables" system.
Loading