Forum Discussion

Kerry_DeVilbiss's avatar
8 years ago

Tesla Motors Battery Statistics

UPDATE: Check out the full suite of Tesla LogicModules in a more recent community post - including statistics for battery/ charging, climate, location, odometer, and configuration.

Tesla Motors provides owners of their vehicles with a web portal - and an HTTP REST API - that can be used to retrieve vehicle performance and configuration data (in JSON format.)

Using the embedded Groovy scripting functionality of a LogicMonitor DataSource, we can query the Tesla API - and bring that data back into LogicMonitor. Once we have the data, we can display it in meaningful ways (a dashboard for our Dashboards,) or perform calculations to create complex datapoints - like tracking "Average Energy Cost per Mile." Assuming that you’re not getting the electricity for free at a Tesla Supercharger station, that is...

A little Googling will assist with the API key retrieval - there are a couple of scripts and/ or CURL commands that can be used to facilitate this process.

The datasource name is TeslaMotors_BatteryStatistics and has lmLocator DXLLKY.

Screenshot of some included graphs:

  • Lauren's avatar
    Lauren
    Former Employee

    Very cool, Kerry! Always exciting to see new, creative ways to leverage the datasources for outside-of-the-box metrics/data.