olexs / tesla-apiscraper-to-teslafi-export

Toolkit to export your data from tesla-apiscraper InfluxDB backend, convert it to TeslaFi CSV format, and fix up some typical data glitches
5 stars 1 forks source link

TeslaFi CSV format documentation? #5

Open jensb opened 2 years ago

jensb commented 2 years ago

I would like to import my own collected data (using ioBroker, the iobroker.tesla-motors adapter, and an InfluxDB backend) into TeslaMate. But I didn't collect all of the data that Teslafi expects (I think) and the column names are different.

Is the column data which TeslaFi expects documented, or do you have an example export dataset? I can document and publish my conversion efforts here if you want to include them.

Thanks!

olexs commented 2 years ago

There are samples of import data in the test fixtures in the TeslaMate repository, I used them as samples for development: https://github.com/adriankumpf/teslamate/tree/master/test/fixtures/import.

Don't think there's a proper format documentation anywhere, except maybe in TeslaFi user docs somewhere.

jensb commented 2 years ago

Thank you! I read the example files and this was a good start. I have some followup questions.

  1. What is the time resolution that TeslaFi/TeslaMate requires? My current system records all properties (eg. lat/lng, odometer, speed, temperature, etc) separately and with (possibly) slightly different timestamps. If I create one row for each unique timestamp in my source data, the resulting CSV will be very sparse and each row will miss a lot of values. Do I need to squish everything into 1 minute intervals (at least, when not driving)? How about when driving?
  2. What is the meaning of driveNumber, idleNumber, chargeNumber, tokens and id / id_s? Are the first ones just a counter for how often the car was driving, idling, charging, etc?
  3. What is the meaning of polling, running, and rerunning? I will publish my script as an example for a custom import as soon as it works. Thank you!