Car Stats : Automatic Upload to Dropbox

Previous posts in the series:

After the scatterplot fun, I decided to turn on the option which logs whenever the adapter is connected to the ECU.  As a result, I started accumulating files on the DROID.   I need a way to get them to someplace where I could have more fun.

Here’s the solution I came up with:

  •  DropSync:  Is an app that will synchronize from the Droid up to Dropbox in the cloud
    • Configured for 1 way sync (push) only
    • Check every 12 hours.
    • I needed to install the Dropbox app for the authorization to succeed
  •  AutomateIt: Is an app that will check for events, and accordingly fire commands.
    • Rule 1:  When Connected to <my home wifi network> and Battery > 50%,
      • START DropSync
      • START <my favorite podcatcher> (experiment still in progress)
    • Rule 2: at 10pm turn Airplane mode on
      • I could probably make this “if battery < 50% turn airplane mode on”
    • Rule 3: at 6am if battery > 50% turn Airplane mode off
  •  Torque
    • No longer set up to invoke Airplane mode when power is lost.
    • Always log when connected to ECU
    • Log every 5 seconds

The result: When I pull into my driveway, and turn off the car..  it detects my home wireless network, starts dropsync, and uploads the files to the network.   Sometime later, it goes into airplane mode.   Sometime in the morning, it comes off airplane mode.   When I start the car the next morning, there’s usually plenty of battery left.

Things gave me a whole slew of files in Dropbox, each in a timestamped folder:

image image

GPS Time, Device Time, Longitude, Latitude,GPS Speed(km/h), Horizontal Dilution of Precision, Altitude(m), Bearing, Gravity X(G), Gravity Y(G), Gravity Z(G),Miles Per Gallon(Instant)(mpg),GPS Altitude(m),Speed (GPS)(km/h),Run time since engine start(s),Speed (OBD)(km/h),Miles Per Gallon(Long Term Average)(mpg),Fuel flow rate/minute(cc/min),CO₂ in g/km (Average)(g/km),CO₂ in g/km (Instantaneous)(g/km)
Thu Jan 03 16:29:06 EST 2013,03-Jan-2013 16:29:11.133,-85.57728556666666,38.24568238333333,0.0,16.0,196.9,0.0,-0.015994536,0.9956599,0.0949334,0,196.9,0,17,0,31.66748047,19.45585442,259.47247314,-
Thu Jan 03 16:29:09 EST 2013,03-Jan-2013 16:29:14.004,-85.57729401666667,38.245684716666666,0.0,12.0,195.2,0.0,-0.015994536,0.9956599,0.0949334,0,195.2,0,20,0,31.66731453,45.80973816,259.47247314,-

Next up:  Consuming the data!

Author: sunnywiz


Leave a Reply

Your email address will not be published. Required fields are marked *