Tesla Home Energy

Configuration

Settings

Fleet credentials stay on the server. Client Secret is never shown in the browser.

Application status

Tesla is connected for the whole house. Re-authorize if the car map is missing — Tesla now requires the vehicle_location scope.

Connected
Re-authorize with Tesla

Fleet API

Values come from environment variables on the server.

TESLA_CLIENT_ID
4cbb…f112
TESLA_CLIENT_SECRET
Set
Redirect URI
https://mcgillickhome.com/callback
Domain
mcgillickhome.com
TESLA_AUDIENCE
https://fleet-api.prd.na.vn.cloud.tesla.com
NEXT_PUBLIC_APP_URL
https://mcgillickhome.com
TESLA_ADMIN_SECRET
Set

Partner registration

One-time call using a partner token, then POST /api/1/partner_accounts for mcgillickhome.com. Host the Tesla public key at /.well-known/appspecific/com.tesla.3p.public-key.pem first.

How to use

  1. Create a Fleet app at developer.tesla.com and set the redirect URI to the value shown in Settings (usually /callback). Enable vehicle_location plus vehicle and energy data/command scopes.
  2. Put Client ID, Client Secret, and redirect URI in .env.local. The secret never leaves the server.
  3. Host the Tesla public key, then run partner registration once from Settings if Tesla still requires it.
  4. Sign in with Tesla once. That connection is shared with every device that opens this site. The dashboard polls energy about every 45 seconds. Use Refresh for a full vehicle poll.
  5. If the car is asleep, tap Wake and wait a few seconds. Newer vehicles may need a virtual key before charge commands work.