State And Settings

An energy site is a home installation of batteries or solar panels (formerly from SolarCity, which was acquired by Tesla).

Work In Progress

Site Data

GET https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/live_status

Shows a real-time view of the power output of the site. The Tesla Android app polls this method every 3 seconds to show the kW output.

Path Parameters

NameTypeDescription

:site_id

integer

The {energy_site_id} number from the products list

Headers

NameTypeDescription

Authorization

string

Bearer {access_token} from authentication

{
	"response": {
		"solar_power": 0,
		"grid_status": "Unknown",
		"grid_services_active": false,
		"timestamp": "2019-12-23T16:01:11-05:00"
	}
}

Site Configuration

GET https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/site_info

Get installation and configuration details about the site. The site_name field value can be changed using the Site Name command.

Path Parameters

NameTypeDescription

:site_id

integer

The {energy_site_id} number from the products list

Headers

NameTypeDescription

Authorization

string

Bearer {access_token} from authentication

{
  "response": {
    "id": "00000000-0000-0000-0000-000000000000",
    "site_name": "My Site",
    "installation_date": "2017-01-01T00:00:00-05:00",
    "user_settings": {
      "storm_mode_enabled": null,
      "sync_grid_alert_enabled": false,
      "breaker_alert_enabled": false
    },
    "components": {
      "solar": true,
      "battery": false,
      "grid": true,
      "backup": false,
      "gateway": "neo",
      "load_meter": false,
      "tou_capable": false,
      "storm_mode_capable": false,
      "flex_energy_request_capable": false,
      "car_charging_data_supported": false,
      "configurable": false,
      "grid_services_enabled": false
    },
    "time_zone_offset": -300
  }
}

Historical Calendar Data

GET https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/calendar_history

Generate a report for solar, grid, and battery data up to a given date, aligned with the start of various calendar periods. Reports for certain periods will return subtotals for smaller constituent periods. This method is used to render bar and line graphs in the Tesla Android app.

Path Parameters

NameTypeDescription

:site_id

integer

The {energy_site_id} number from the products list

Query Parameters

NameTypeDescription

end_date

string

ISO 8601 datetime, e.g. 2019-12-23T17:39:18.546Z. The response report interval ends on this datetime and starts at the beginning of the given period at 1:00 AM. Defaults to the current time.

time_zone

string

IANA/Olsen time zone identifier, e.g. America/New_York. Seems to have no effect on response data.

period

string

Amount of time to include in report. One of day, week, month, year, and lifetime. When kind is power, this parameter is ignored, is not required, and is always treated as day.

kind

string

Type of report to generate. One of power, energy, and self_consumption.

Headers

NameTypeDescription

Authorization

string

Bearer {access_token} from authentication

/*
 * Between 1:00 AM and 12:39 PM on December 23, 2019, 
 * the solar panels generated 3.61 kWh of energy.
 *
 * ?kind=energy&period=day&time_zone=America%2FNew_York&end_date=2019-12-23T17%3A39%3A18.546Z
 */
   
{  
  "response": {
    "serial_number": "00000000-0000-0000-0000-000000000000",
    "period": "day",
    "time_zone_offset": -300,
    "time_series": [
      {
        "timestamp": "2019-12-23T01:00:00-05:00",
        "solar_energy_exported": 3610.0000000000005,
        "grid_energy_imported": 0,
        "grid_services_energy_imported": 0,
        "grid_services_energy_exported": 0,
        "grid_energy_exported_from_solar": 0,
        "grid_energy_exported_from_battery": 0,
        "battery_energy_exported": 0,
        "battery_energy_imported_from_grid": 0,
        "battery_energy_imported_from_solar": 0,
        "consumer_energy_imported_from_grid": 0,
        "consumer_energy_imported_from_solar": 0,
        "consumer_energy_imported_from_battery": 0
      }
    ]
  }
}

Historical Data

GET https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/history

May be a deprecated method. Seems to be similar to the Historical Calendar Data method above, except these responses are missing the time_zone_offset field.

Path Parameters

NameTypeDescription

:site_id

integer

The {energy_site_id} number from the products list

Headers

NameTypeDescription

Authorization

string

Bearer {access_token} from authentication

Site Summary

GET https://owner-api.teslamotors.com/api/1/energy_sites/:site_id/status

Warning: This method seems to always return 404 Not Found. It may have been removed from the API.

Path Parameters

NameTypeDescription

:site_id

integer

The {energy_site_id} number from the products list

Headers

NameTypeDescription

Authorization

string

Bearer {access_token} from authentication

<!DOCTYPE html>
<html>
<head>
  <title>The page you were looking for doesn't exist (404)</title>
  <style type="text/css">
    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
    div.dialog {
      width: 25em;
      padding: 0 4em;
      margin: 4em auto 0 auto;
      border: 1px solid #ccc;
      border-right-color: #999;
      border-bottom-color: #999;
    }
    h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
  </style>
</head>

<body>
  <!-- This file lives in public/404.html -->
  <div class="dialog">
    <h1>The page you were looking for doesn't exist.</h1>
    <p>You may have mistyped the address or the page may have moved.</p>
  </div>
</body>
</html>

Last updated