Tesla Integration

GridMind’s Tesla integration provides the deepest functionality of any integration — real-time battery control, solar monitoring, multi-vehicle management, and Wall Connector data. It uses the official Tesla Fleet API for all communication.

GridMind Tesla integration settings showing connected system and vehicle management

Supported Hardware

Energy Systems

  • Powerwall 2 (13.5 kWh)
  • Powerwall 3 (13.5 kWh)
  • Powerwall+ (solar gateway included)
  • Solar Roof (Powerwall integrated)
  • Any Tesla solar installation with a Gateway

Vehicles

  • Model S, Model 3, Model X, Model Y (all variants)
  • Cybertruck
  • Roadster is not supported via Fleet API

Charging

  • Tesla Wall Connector (Gen 2, Gen 3)
  • Tesla Universal Wall Connector

Prerequisites

Before connecting to GridMind, you need:

  1. A Tesla account with your Powerwall/solar registered
  2. Access to the Tesla Fleet API (requires a developer application — see setup below)
  3. A public/private key pair for vehicle command security

Tesla Fleet API access requires creating a developer application at developer.tesla.com. This is a one-time setup that takes about 15 minutes.

Setup: Step by Step

Step 1: Create a Tesla Fleet API Application

  1. Go to developer.tesla.com and sign in with your Tesla account
  2. Click “Create Application”
  3. Fill in application details: name “GridMind”, grant type “Authorization Code and Machine-to-Machine”, redirect URI https://app.gridmindpower.com/oauth/tesla/callback, allowed origin https://app.gridmindpower.com
  4. Note your Client ID and Client Secret — you’ll need these in Step 4

Step 2: Generate a Key Pair

GridMind requires a public/private key pair for Tesla’s vehicle command security protocol. Generate keys using OpenSSL:

openssl ecparam -name prime256v1 -genkey -noout -out private_key.pem
openssl ec -in private_key.pem -pubout -out public_key.pem
cat public_key.pem

Copy the contents of public_key.pem — you’ll register this with Tesla in the next step.

Step 3: Register Your Public Key with Tesla

  1. Go to your Tesla Fleet API application settings at developer.tesla.com
  2. Under “Public Key”, paste the contents of your public_key.pem
  3. Tesla will verify and register the key

Step 4: Enter Credentials in GridMind

  1. In GridMind, go to Settings → Tesla Credentials
  2. Enter your Client ID from Step 1
  3. Enter your Client Secret from Step 1
  4. Paste your Public Key (contents of public_key.pem) from Step 2
  5. Click Save

Step 5: Authorize GridMind with Tesla OAuth

  1. Go to Settings → System Management → Add Connection → Tesla
  2. Click “Connect with Tesla”
  3. You’ll be redirected to Tesla’s login page — sign in with the Tesla account that owns your Powerwall
  4. Approve GridMind’s requested permissions
  5. You’ll be redirected back to GridMind

Step 6: Discover Your Site

  1. Click “Discover Site” in Settings → System Management
  2. GridMind queries the Tesla API to find your Powerwall site ID
  3. Your site is automatically saved — data collection begins immediately

Step 7: Add Vehicles (Optional)

  1. Go to Settings → System Management → Add Connection → Tesla Vehicle
  2. Select the vehicle(s) you want to monitor
  3. Your vehicles will appear on the Vehicle page and power flow diagram

What GridMind Can Do with Tesla

CapabilityAvailableNotes
Real-time solar outputkW, live
Real-time battery SOC%, live
Real-time grid import/exportkW, live
Set backup reserve0–100%
Change operation modeSelf-powered / Time-Based
Vehicle SOCDoesn’t wake vehicle
Vehicle charge start/stopWakes vehicle
Set charge limit0–100%
Wall Connector statusNo wake needed
Charge session historyFrom Wall Connector logs

Rate Limits & Best Practices

Tesla Fleet API has strict rate limits that GridMind manages automatically:

  • Data requests: 60/minute per vehicle
  • Commands: 30/minute per vehicle
  • Account-level: 20 auth requests/second

GridMind uses smart polling intervals to stay well within limits:

  • Live energy data: every 60 seconds
  • Vehicle data: every 120 seconds when charging, 600 seconds when parked, 3,600 seconds when asleep
  • Vehicle wake commands are rate-limited to avoid excessive battery drain

Troubleshooting

403 EXCEEDED_LIMIT error: Your Tesla account has been temporarily rate-limited by Tesla. This typically recovers within 24 hours. GridMind implements a 1-hour local cooldown when this occurs to avoid repeated failures.

Vehicle not showing data: The vehicle may be asleep. Use the Wake button on the Vehicle page. GridMind won’t wake vehicles automatically to avoid unnecessary battery drain.

”Site not found” after Discover: Ensure your Tesla account is the primary account on the Powerwall (not a shared user). Gateway firmware may need to be up to date.

”Unable to reach your Tesla account” banner

This banner means GridMind’s server-side connection to Tesla has been interrupted. Because GridMind monitors your system in the background 24/7 — even when your phone is off — it holds a Tesla OAuth token on your behalf on the server. If Tesla invalidates that token, there’s no way to recover silently: you need to re-authenticate to issue a fresh one.

Common causes:

  • You changed your Tesla account password (Tesla immediately invalidates all third-party tokens)
  • Tesla rotated your tokens after a new device sign-in or account security event
  • You revoked third-party app access in your Tesla account settings
  • A brief Tesla auth server outage prevented background token refresh

What to do: Tap the banner and sign in with Tesla again. It takes about 30 seconds and doesn’t affect your settings, history, or automation rules.

This is a Tesla platform limitation, not a GridMind bug. Tesla can revoke third-party tokens at any time without notice. Apps that use the local Powerwall API (on your home network only) don’t have this issue because they don’t use Tesla’s cloud OAuth — but they also can’t monitor your system remotely or run automations while you’re away.