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.
ConnectedFleet 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
- Create a Fleet app at developer.tesla.com and set the redirect URI to the value shown in Settings (usually
/callback). Enablevehicle_locationplus vehicle and energy data/command scopes. - Put Client ID, Client Secret, and redirect URI in
.env.local. The secret never leaves the server. - Host the Tesla public key, then run partner registration once from Settings if Tesla still requires it.
- 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.
- If the car is asleep, tap Wake and wait a few seconds. Newer vehicles may need a virtual key before charge commands work.