{"id":"f1e13aae-808f-4e32-a4b1-f76acf6f9f98","entityType":"agent","slug":"clawhub-odrobnik-tesla-fleet-api","name":"Tesla Fleet Api","canonicalUrl":"https://www.xpersona.co/agent/clawhub-odrobnik-tesla-fleet-api","canonicalPath":"/agent/clawhub-odrobnik-tesla-fleet-api","generatedAt":"2026-10-09T12:21:10.486Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"description":"Use when integrating with Tesla's official Fleet API to read vehicle/energy device data or issue remote commands (e.g. start HVAC preconditioning, wake vehicle, charge controls). Covers onboarding (developer app registration, regions/base URLs), OAuth token flows (third-party + partner tokens, refresh rotation), required domain/public-key hosting, and using Tesla's official vehicle-command/tesla-http-proxy for signed vehicle commands.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.5K downloads reported by the source. Last updated 4/15/2026.","installCommand":"clawhub skill install kn7c7fek4a503rbvj0bxbwx6dx7yw25e:tesla-fleet-api","sourceUrl":"https://clawhub.ai/odrobnik/tesla-fleet-api","homepage":"https://clawhub.ai/odrobnik/tesla-fleet-api","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/odrobnik/tesla-fleet-api","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":68,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Tesla Fleet Api technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"stars":null,"forks":null,"downloads":2492,"packageName":null,"latestVersion":"1.5.0","tractionLabel":"2.5K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-02-28T18:34:29.261Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T00:45:39.800Z","lastCrawledAt":"2026-02-28T18:34:29.261Z","lastIndexedAt":null,"nextCrawlAt":"2026-03-01T18:34:29.261Z","lastVerifiedAt":null,"highlights":[{"version":"1.5.0","createdAt":"2026-02-13T17:26:28.072Z","changelog":"- Dropped the Go runtime dependency; Go is no longer required to use the skill. - Updated required environment variables and optional settings, removing obsolete entries related to signing proxy and public key. - Improved documentation for setup, reflecting dependency changes. - start_proxy.sh script and related requirements simplified due to proxy/signing changes. - Version bumped to 1.5.0.","fileCount":12,"zipByteSize":33731},{"version":"1.4.2","createdAt":"2026-02-12T18:21:45.162Z","changelog":"**Changelog for tesla-fleet-api v1.4.2** - Simplified environment requirements: no longer requires `bash` or `git` for basic operation. - Removed `.env` file support; credentials are now loaded only from `config.json` or environment variables. - Updated state directory layout and documentation in SETUP.md and SKILL.md. - Refined scripts: removed `setup_proxy.sh`, added explicit `start_proxy.sh` and `stop_proxy.sh` for controlling the signing proxy.","fileCount":12,"zipByteSize":33979},{"version":"1.3.0","createdAt":"2026-02-12T13:15:24.540Z","changelog":"- Adds support for seat cooler (ventilated seat) commands. - Implements `seat-climate` commands to control seat auto climate modes. - Updates to precondition scheduling for more robust schedule parameters. - Various code improvements and expanded option parsing across commands.","fileCount":null,"zipByteSize":null},{"version":"1.2.0","createdAt":"2026-02-12T07:32:08.391Z","changelog":"Replace .env loading with config.json for provider creds (legacy .env fallback kept)","fileCount":null,"zipByteSize":null},{"version":"1.1.9","createdAt":"2026-02-11T18:22:38.413Z","changelog":"Remove local-only calendar automation (school-precondition.sh) from published package; keep local copy outside skill.","fileCount":null,"zipByteSize":null},{"version":"1.1.8","createdAt":"2026-02-11T17:40:00.777Z","changelog":"Mitigate supply-chain risk: setup_proxy uses pinned vehicle-command version via go install; document TESLA_VEHICLE_COMMAND_VERSION override.","fileCount":null,"zipByteSize":null},{"version":"1.1.7","createdAt":"2026-02-11T15:56:59.323Z","changelog":"Default state dir is ~/.openclaw; update remaining docs/help strings (legacy ~/.moltbot noted).","fileCount":null,"zipByteSize":null},{"version":"1.1.6","createdAt":"2026-02-11T15:56:13.732Z","changelog":"Prefer ~/.openclaw state dir (fallback to legacy ~/.moltbot). Update scripts + docs.","fileCount":null,"zipByteSize":null}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install kn7c7fek4a503rbvj0bxbwx6dx7yw25e:tesla-fleet-api","setupComplexity":"low","setupSteps":["Install using `clawhub skill install kn7c7fek4a503rbvj0bxbwx6dx7yw25e:tesla-fleet-api` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/odrobnik/tesla-fleet-api before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T12:21:10.485Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-odrobnik-tesla-fleet-api/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"readme":"Skill: Tesla Fleet Api\n\nOwner: odrobnik\n\nSummary: Use when integrating with Tesla's official Fleet API to read vehicle/energy device data or issue remote commands (e.g. start HVAC preconditioning, wake vehicle, charge controls). Covers onboarding (developer app registration, regions/base URLs), OAuth token flows (third-party + partner tokens, refresh rotation), required domain/public-key hosting, and using Tesla's official vehicle-command/tesla-http-proxy for signed vehicle commands.\n\nTags: latest:1.5.0\n\nVersion history:\n\nv1.5.0 | 2026-02-13T17:26:28.072Z | auto\n\n- Dropped the Go runtime dependency; Go is no longer required to use the skill.\n- Updated required environment variables and optional settings, removing obsolete entries related to signing proxy and public key.\n- Improved documentation for setup, reflecting dependency changes.\n- start_proxy.sh script and related requirements simplified due to proxy/signing changes.\n- Version bumped to 1.5.0.\n\nv1.4.2 | 2026-02-12T18:21:45.162Z | auto\n\n**Changelog for tesla-fleet-api v1.4.2**\n\n- Simplified environment requirements: no longer requires `bash` or `git` for basic operation.\n- Removed `.env` file support; credentials are now loaded only from `config.json` or environment variables.\n- Updated state directory layout and documentation in SETUP.md and SKILL.md.\n- Refined scripts: removed `setup_proxy.sh`, added explicit `start_proxy.sh` and `stop_proxy.sh` for controlling the signing proxy.\n\nv1.3.0 | 2026-02-12T13:15:24.540Z | auto\n\n- Adds support for seat cooler (ventilated seat) commands.\n- Implements `seat-climate` commands to control seat auto climate modes.\n- Updates to precondition scheduling for more robust schedule parameters.\n- Various code improvements and expanded option parsing across commands.\n\nv1.2.0 | 2026-02-12T07:32:08.391Z | user\n\nReplace .env loading with config.json for provider creds (legacy .env fallback kept)\n\nv1.1.9 | 2026-02-11T18:22:38.413Z | user\n\nRemove local-only calendar automation (school-precondition.sh) from published package; keep local copy outside skill.\n\nv1.1.8 | 2026-02-11T17:40:00.777Z | user\n\nMitigate supply-chain risk: setup_proxy uses pinned vehicle-command version via go install; document TESLA_VEHICLE_COMMAND_VERSION override.\n\nv1.1.7 | 2026-02-11T15:56:59.323Z | user\n\nDefault state dir is ~/.openclaw; update remaining docs/help strings (legacy ~/.moltbot noted).\n\nv1.1.6 | 2026-02-11T15:56:13.732Z | user\n\nPrefer ~/.openclaw state dir (fallback to legacy ~/.moltbot). Update scripts + docs.\n\nv1.1.5 | 2026-02-11T15:52:34.116Z | user\n\nDeclare TESLA_PRIVATE_KEY + document proxy build (vehicle-command clone) and calendar access.\n\nv1.1.4 | 2026-02-11T15:37:26.342Z | user\n\nDeclare required env/bins + state dir; make proxy setup script non-installing (no automatic brew install)\n\nv1.1.3 | 2026-01-26T07:09:34.686Z | user\n\nDocs: remove legacy migration note from SETUP.md.\n\nv1.1.2 | 2026-01-26T07:07:12.605Z | user\n\nDocs: remove tesla_fleet.py from scripts overview table.\n\nv1.1.1 | 2026-01-26T07:03:09.924Z | user\n\nDocs: move setup/config into SETUP.md; SKILL.md now references it.\n\nv1.1.0 | 2026-01-26T06:41:51.632Z | user\n\nSplit state: config.json/auth.json/vehicles.json/places.json; provider creds via .env; added places + vehicles commands.\n\nArchive index:\n\nArchive v1.5.0: 12 files, 33731 bytes\n\nFiles: scripts/auth.py (12479b), scripts/command.py (33317b), scripts/start_proxy.sh (2622b), scripts/stop_proxy.sh (1056b), scripts/store.py (4599b), scripts/tesla_fleet.py (3224b), scripts/tesla_oauth_local.py (8710b), scripts/vehicle_data.py (18280b), scripts/vehicles.py (4664b), SETUP.md (4978b), SKILL.md (11654b), _meta.json (134b)\n\nFile v1.5.0:SKILL.md\n\n---\nname: tesla-fleet-api\ndescription: Use when integrating with Tesla's official Fleet API to read vehicle/energy device data or issue remote commands (e.g. start HVAC preconditioning, wake vehicle, charge controls). Covers onboarding (developer app registration, regions/base URLs), OAuth token flows (third-party + partner tokens, refresh rotation), required domain/public-key hosting, and using Tesla's official vehicle-command/tesla-http-proxy for signed vehicle commands.\nversion: 1.5.0\nhomepage: https://github.com/odrobnik/tesla-fleet-api-skill\nmetadata:\n  openclaw:\n    emoji: \"🚗\"\n    requires:\n      bins: [\"python3\", \"openssl\"]\n      env: [\"TESLA_CLIENT_ID\", \"TESLA_CLIENT_SECRET\"]\n      optionalEnv: [\"TESLA_AUDIENCE\", \"TESLA_REDIRECT_URI\", \"TESLA_DOMAIN\", \"TESLA_BASE_URL\", \"TESLA_CA_CERT\", \"TESLA_ACCESS_TOKEN\", \"TESLA_REFRESH_TOKEN\", \"TESLA_SCOPE\"]\n\n---\n\n# Tesla Fleet API\n\nControl Tesla vehicles via the official Fleet API.\n\n## Scripts Overview\n\n| Script | Purpose |\n|--------|---------|\n| `command.py` | Vehicle commands (climate, charging, locks, etc.) |\n| `vehicle_data.py` | Read vehicle data (battery, climate, location, etc.) |\n| `vehicles.py` | List vehicles + refresh cache |\n| `auth.py` | Authentication and configuration |\n| `tesla_oauth_local.py` | OAuth helper with local callback server |\n| `start_proxy.sh` | Start the signing proxy (for vehicle commands) |\n| `stop_proxy.sh` | Stop the signing proxy |\n\n---\n\n## Setup / Configuration\n\nSetup is documented in **`SETUP.md`**:\n\n- [SETUP.md](SETUP.md)\n\nState directory: `{workspace}/tesla-fleet-api/`\n- `config.json` (provider creds + non-token config)\n- `auth.json` (tokens)\n- `vehicles.json` (cached vehicle list)\n- `places.json` (named locations)\n- `proxy/` (TLS material for signing proxy)\n\nNo `.env` file loading — credentials in `config.json` or environment variables.\n\n---\n\n## command.py - Vehicle Commands\n\nExecute commands on your Tesla. Vehicle is auto-selected if you only have one.\n\n### Usage\n\n```bash\ncommand.py [VEHICLE] <command> [options]\n```\n\n- `VEHICLE` - Vehicle name or VIN (optional if single vehicle)\n- Commands can be run without specifying vehicle: `command.py honk`\n- Or with vehicle name: `command.py flash honk` (vehicle \"flash\", command \"honk\")\n\n---\n\n### Climate Control\n\n#### Start/Stop Climate\n```bash\ncommand.py climate start\ncommand.py climate stop\ncommand.py flash climate start          # specific vehicle\n```\n\n#### Set Temperature\n```bash\ncommand.py climate temps <driver_temp> [passenger_temp]\ncommand.py climate temps 21             # both seats 21°C\ncommand.py climate temps 22 20          # driver 22°C, passenger 20°C\n```\n\n#### Climate Keeper Mode\n```bash\ncommand.py climate keeper <mode>\n```\nModes: `off`, `keep`, `dog`, `camp`\n\n---\n\n### Seat Heater\n\n```bash\ncommand.py seat-heater --level <level> [--position <position>]\ncommand.py seat-heater -l <level> [-p <position>]\n```\n\n**Levels:**\n| Value | Name |\n|-------|------|\n| 0 | off |\n| 1 | low |\n| 2 | medium |\n| 3 | high |\n\n**Positions:**\n| Value | Names |\n|-------|-------|\n| 0 | `driver`, `front_left`, `fl` |\n| 1 | `passenger`, `front_right`, `fr` |\n| 2 | `rear_left`, `rl` |\n| 3 | `rear_left_back` |\n| 4 | `rear_center`, `rc` |\n| 5 | `rear_right`, `rr` |\n| 6 | `rear_right_back` |\n| 7 | `third_left` |\n| 8 | `third_right` |\n\n**Examples:**\n```bash\ncommand.py seat-heater -l high                    # driver (default)\ncommand.py seat-heater -l medium -p passenger\ncommand.py seat-heater --level low --position rear_left\ncommand.py seat-heater -l 2 -p 4                  # medium, rear center\ncommand.py seat-heater -l off -p driver           # turn off\n```\n\n---\n\n### Seat Cooler (Ventilation)\n\n```bash\ncommand.py seat-cooler --level <level> [--position <position>]\ncommand.py seat-cooler -l <level> [-p <position>]\n```\n\nSame levels and positions as seat heater.\n\n**Examples:**\n```bash\ncommand.py seat-cooler -l medium -p driver\ncommand.py seat-cooler -l high -p passenger\n```\n\n---\n\n### Seat Auto Climate\n\n```bash\ncommand.py seat-climate [--position <position>] <mode>\ncommand.py seat-climate [-p <position>] <mode>\n```\n\nModes: `auto`, `on`, `off`\n\n**Examples:**\n```bash\ncommand.py seat-climate auto                      # driver auto\ncommand.py seat-climate -p passenger auto\ncommand.py seat-climate -p driver off             # disable auto\n```\n\n---\n\n### Steering Wheel Heater\n\n```bash\ncommand.py steering-heater <on|off>\n```\n\n**Examples:**\n```bash\ncommand.py steering-heater on\ncommand.py steering-heater off\n```\n\n---\n\n### Precondition Schedules\n\nModern API for scheduling departure preconditioning (replaces deprecated `set_scheduled_departure`).\n\n#### Add Schedule\n```bash\ncommand.py precondition add --time <HH:MM> [--days <days>] [--id <id>] [--one-time] [--disabled]\ncommand.py precondition add -t <HH:MM> [-d <days>] [--id <id>]\n```\n\n**Days options:**\n| Value | Description |\n|-------|-------------|\n| `all` | Every day (default) |\n| `weekdays` | Monday through Friday |\n| `weekends` | Saturday and Sunday |\n| `mon,tue,wed,...` | Specific days (comma-separated) |\n\nDay names: `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat` (or full names)\n\n**Examples:**\n```bash\ncommand.py precondition add -t 08:00              # every day at 8am\ncommand.py precondition add -t 08:00 -d weekdays  # Mon-Fri\ncommand.py precondition add -t 07:30 -d mon,wed,fri\ncommand.py precondition add -t 09:00 --one-time   # one-time only\ncommand.py precondition add -t 08:30 --id 123     # modify existing schedule\ncommand.py precondition add -t 08:00 --disabled   # create but disabled\n```\n\n#### Remove Schedule\n```bash\ncommand.py precondition remove --id <id>\n```\n\n**Examples:**\n```bash\ncommand.py precondition remove --id 123\ncommand.py precondition remove --id 1\n```\n\n---\n\n### Charging Control\n\n#### Start/Stop Charging\n```bash\ncommand.py charge start\ncommand.py charge stop\n```\n\n#### Set Charge Limit\n```bash\ncommand.py charge limit <percent>\n```\n\nPercent must be 50-100.\n\n**Examples:**\n```bash\ncommand.py charge limit 80\ncommand.py charge limit 90\ncommand.py flash charge limit 70                  # specific vehicle\n```\n\n---\n\n### Doors & Security\n\n```bash\ncommand.py lock                   # lock all doors\ncommand.py unlock                 # unlock all doors\ncommand.py honk                   # honk the horn\ncommand.py flash                  # flash the lights\ncommand.py wake                   # wake vehicle from sleep\n```\n\n**With vehicle name:**\n```bash\ncommand.py flash wake             # wake vehicle named \"flash\"\ncommand.py flash flash            # flash lights on vehicle \"flash\"\n```\n\n---\n\n## vehicle_data.py - Read Vehicle Data\n\nFetch vehicle data with human-readable output by default.\n\n### Usage\n\n```bash\nvehicle_data.py [VEHICLE] [flags] [--json]\n```\n\n- `VEHICLE` - Vehicle name or VIN (optional if single vehicle)\n- No flags = all data\n- `--json` = raw JSON output\n\n### Flags\n\n| Flag | Long | Data |\n|------|------|------|\n| `-c` | `--charge` | Battery level, charge limit, charging status |\n| `-t` | `--climate` | Interior/exterior temp, HVAC status |\n| `-d` | `--drive` | Gear, speed, power, heading |\n| `-l` | `--location` | GPS coordinates |\n| `-s` | `--state` | Locks, doors, windows, odometer, software |\n| `-g` | `--gui` | GUI settings (units, 24h time) |\n| | `--config-data` | Vehicle config (model, color, wheels) |\n\n### Examples\n\n```bash\n# All data\nvehicle_data.py\nvehicle_data.py flash\n\n# Specific data\nvehicle_data.py -c                        # charge only\nvehicle_data.py -c -t                     # charge + climate\nvehicle_data.py flash -c -l               # charge + location\n\n# Raw JSON\nvehicle_data.py --json\nvehicle_data.py -c --json\n```\n\n### Sample Output\n\n```\n🚗 My Tesla (online)\n   VIN: 5YJ... (redacted)\n\n⚡ Charge State\n────────────────────────────────────────\n  Battery:    [███████████████░░░░░] 78%\n  Limit:      80%\n  State:      Charging\n  Power:      11 kW (16A × 234V × 3φ)\n  Added:      37.2 kWh\n  Remaining:  10m\n  Range:      438 km (272 mi)\n  Cable:      IEC\n\n🌡️  Climate State\n────────────────────────────────────────\n  Inside:     11.9°C\n  Outside:    6.0°C\n  Set to:     20.5°C\n  Climate:    Off\n```\n\n---\n\n## auth.py - Authentication\n\nManage OAuth tokens and configuration.\n\n### Usage\n\n```bash\nauth.py <command> [options]\n```\n\n### Commands\n\n#### Login (OAuth Flow)\n```bash\nauth.py login\n```\nInteractive: generates auth URL, prompts for code, exchanges for tokens.\n\n#### Exchange Code\n```bash\nauth.py exchange <code>\n```\nExchange authorization code for tokens (non-interactive).\n\n#### Refresh Tokens\n```bash\nauth.py refresh\n```\nRefresh access token. Note: refresh tokens rotate - the new one is saved automatically.\n\n#### Register Domain\n```bash\nauth.py register --domain <domain>\n```\nRegister your app domain with Tesla (required for signed commands).\n\nAfter registration, enroll your virtual key:\n```\nhttps://tesla.com/_ak/<domain>\n```\n\n#### Show Config\n```bash\nauth.py config\n```\nDisplay current configuration (secrets redacted).\n\n#### Set Config\n```bash\nauth.py config set [options]\n```\n\nOptions:\n- `--client-id <id>`\n- `--client-secret <secret>`\n- `--redirect-uri <uri>`\n- `--audience <url>`\n- `--base-url <url>`\n- `--ca-cert <path>`\n- `--domain <domain>`\n\n**Examples:**\n```bash\n# Initial setup\nauth.py config set \\\n  --client-id \"abc123\" \\\n  --client-secret \"secret\" \\\n  --redirect-uri \"http://localhost:18080/callback\"\n\n# Configure proxy\nauth.py config set \\\n  --base-url \"https://localhost:4443\" \\\n  --ca-cert \"/path/to/tls-cert.pem\"\n```\n\n---\n\n## tesla_fleet.py - List Vehicles\n\nList vehicles with human-readable output.\n\n```bash\npython3 scripts/tesla_fleet.py vehicles\npython3 scripts/tesla_fleet.py vehicles --json\n```\n\n### Sample Output\n\n```\n🚗 Name:   My Tesla\n🔖 VIN:    5YJ... (redacted)\n🟢 Status: Online\n👤 Access: Owner\n```\n\n---\n\n## Configuration / Proxy / File layout\n\nAll setup + configuration is documented in **[SETUP.md](SETUP.md)**.\n\n---\n\n## Regional Base URLs\n\n| Region | Audience URL |\n|--------|--------------|\n| Europe | `https://fleet-api.prd.eu.vn.cloud.tesla.com` |\n| North America | `https://fleet-api.prd.na.vn.cloud.tesla.com` |\n| China | `https://fleet-api.prd.cn.vn.cloud.tesla.cn` |\n\nOAuth token endpoint (all regions):\n```\nhttps://fleet-auth.prd.vn.cloud.tesla.com/oauth2/v3/token\n```\n\n---\n\n## Troubleshooting\n\n### \"vehicle unavailable: vehicle is offline or asleep\"\nWake the vehicle first:\n```bash\ncommand.py wake\n```\n\n### \"command not signed\" / \"vehicle rejected\"\nEnsure the signing proxy is running and configured. See [SETUP.md](SETUP.md) § Proxy Setup.\n\n### Token expired\n```bash\nauth.py refresh\n```\n\n### Multiple vehicles\nSpecify vehicle by name or VIN:\n```bash\ncommand.py flash climate start\ncommand.py 5YJ... honk\n```\n\n---\n\n## Complete Command Reference\n\n### command.py\n\n```\nclimate start|stop\nclimate temps <driver> [passenger]\nclimate keeper off|keep|dog|camp\n\nseat-heater -l <level> [-p <position>]\nseat-cooler -l <level> [-p <position>]\nseat-climate [-p <position>] auto|on|off\n\nsteering-heater on|off\n\nprecondition add -t <HH:MM> [-d <days>] [--id <id>] [--one-time]\nprecondition remove --id <id>\n\ncharge start|stop\ncharge limit <percent>\n\nlock\nunlock\nhonk\nflash\nwake\n```\n\n### vehicle_data.py\n\n```\n[VEHICLE] [-c] [-t] [-d] [-l] [-s] [-g] [--config-data] [--json]\n```\n\n### auth.py\n\n```\nlogin\nexchange <code>\nrefresh\nregister --domain <domain>\nconfig\nconfig set [--client-id] [--client-secret] [--redirect-uri] [--audience] [--base-url] [--ca-cert] [--domain]\n```\n\nFile v1.5.0:_meta.json\n\n{\n  \"ownerId\": \"kn7c7fek4a503rbvj0bxbwx6dx7yw25e\",\n  \"slug\": \"tesla-fleet-api\",\n  \"version\": \"1.5.0\",\n  \"publishedAt\": 1771003588072\n}\n\nFile v1.5.0:SETUP.md\n\n# Tesla Fleet API Skill — Setup Guide\n\nThis guide covers **setup + configuration** for the Tesla Fleet API skill.\n\nIf you just want the CLI command reference, see `SKILL.md`.\n\n---\n\n## Prerequisites\n\n- Tesla Developer Account + an app created\n- A domain you control (for public key hosting + virtual key enrollment)\n- `python3`\n- `openssl` (for key generation + TLS certs)\n- macOS (scripts tested on macOS)\n- For proxy setup: `go` (on macOS: `brew install go`) — only needed once to compile the proxy binary\n\n---\n\n## State / Files\n\nAll runtime state lives in your workspace:\n\n`{workspace}/tesla-fleet-api/`\n\nFiles:\n- `config.json` — provider creds (client id/secret), non-token config (audience, base_url, ca_cert, redirect_uri, domain)\n- `auth.json` — tokens (access/refresh)\n- `vehicles.json` — cached vehicle list\n- `places.json` — named locations (`{\"home\": {\"lat\": ..., \"lon\": ...}}`)\n- `proxy/` — TLS material for the signing proxy\n- `private-key.pem` — your Tesla EC private key (fixed name)\n\nCredentials come from `config.json` or environment variables (`TESLA_CLIENT_ID`, `TESLA_CLIENT_SECRET`). No `.env` file loading.\n\n---\n\n## 1) Create & host your EC keypair\n\n```bash\n# Generate P-256 keypair\nopenssl ecparam -name prime256v1 -genkey -noout -out private-key.pem\nopenssl ec -in private-key.pem -pubout -out public-key.pem\n\n# Host public key at:\n# https://YOUR_DOMAIN/.well-known/appspecific/com.tesla.3p.public-key.pem\n```\n\nStore your private key in the workspace with a fixed name:\n`{workspace}/tesla-fleet-api/private-key.pem`\n\n---\n\n## 2) Configure provider credentials\n\n```bash\npython3 scripts/auth.py config set \\\n  --client-id \"YOUR_CLIENT_ID\" \\\n  --client-secret \"YOUR_CLIENT_SECRET\" \\\n  --redirect-uri \"http://localhost:18080/callback\" \\\n  --audience \"https://fleet-api.prd.eu.vn.cloud.tesla.com\"\n```\n\nThis writes to `{workspace}/tesla-fleet-api/config.json`.\n\n---\n\n## 3) OAuth login (creates auth.json)\n\nInteractive login (manual code paste):\n\n```bash\npython3 scripts/auth.py login\n```\n\nAutomatic login via local callback server:\n\n```bash\npython3 scripts/tesla_oauth_local.py --prompt-missing-scopes\n```\n\n---\n\n## 4) Register domain + enroll virtual key\n\n```bash\npython3 scripts/auth.py register --domain YOUR_DOMAIN.com\n```\n\nThen, on your phone (Tesla app installed):\n\n`https://tesla.com/_ak/YOUR_DOMAIN.com`\n\n---\n\n## 5) Proxy Setup (for signed commands only)\n\n> **Note:** The proxy is only needed for **sending signed commands** to the vehicle (climate, locks, charging, honk, etc.). Reading vehicle data (battery, location, temperatures) works without the proxy — those requests go directly to the Tesla Fleet API.\n\n### Install tesla-http-proxy\n\nRequires Go (`brew install go` on macOS).\n\n```bash\n# Pin to a specific version for supply-chain safety\ngo install github.com/teslamotors/vehicle-command/cmd/tesla-http-proxy@v0.4.1\n```\n\nThis installs `tesla-http-proxy` to `~/go/bin/`.\n\n### Generate TLS certificates\n\n```bash\nmkdir -p {workspace}/tesla-fleet-api/proxy\ncd {workspace}/tesla-fleet-api/proxy\n\nopenssl req -x509 -newkey rsa:4096 \\\n  -keyout tls-key.pem -out tls-cert.pem \\\n  -days 365 -nodes -subj \"/CN=localhost\"\n\nchmod 600 tls-key.pem\n```\n\n### Configure scripts to use the proxy\n\n```bash\npython3 scripts/auth.py config set \\\n  --base-url \"https://localhost:4443\" \\\n  --ca-cert \"proxy/tls-cert.pem\"\n```\n\nThe `ca_cert` path is stored relative to the config directory and resolved at runtime.\n\n### Start / stop the proxy\n\nUse the convenience scripts:\n\n```bash\n# Start (uses {workspace}/tesla-fleet-api/private-key.pem)\n./scripts/start_proxy.sh\n\n# Stop\n./scripts/stop_proxy.sh\n```\n\nThe proxy runs in the background on `https://localhost:4443`. Logs go to `{workspace}/tesla-fleet-api/proxy/proxy.log`.\n\n---\n\n## 6) Test\n\n```bash\n# Data (no proxy needed)\npython3 scripts/vehicles.py\npython3 scripts/vehicle_data.py -c\n\n# Commands (proxy required)\npython3 scripts/command.py honk\n```\n\n---\n\n## Places (named lat/lon)\n\n```bash\n# list\npython3 scripts/command.py places list\n\n# set explicit coords\npython3 scripts/command.py places set home --lat 48.10033 --lon 17.04217\n\n# set from current vehicle location\npython3 scripts/command.py places set school --here\n\n# use in precondition\npython3 scripts/command.py precondition add -t 08:00 -d weekdays --place home\n```\n\n---\n\n## Regional Base URLs\n\n| Region | Audience URL |\n|--------|--------------|\n| Europe | `https://fleet-api.prd.eu.vn.cloud.tesla.com` |\n| North America | `https://fleet-api.prd.na.vn.cloud.tesla.com` |\n| China | `https://fleet-api.prd.cn.vn.cloud.tesla.cn` |\n\nOAuth token endpoint (all regions):\n```\nhttps://fleet-auth.prd.vn.cloud.tesla.com/oauth2/v3/token\n```\n\n---\n\n## Troubleshooting\n\n- **Token expired (401):**\n  ```bash\n  python3 scripts/auth.py refresh\n  ```\n\n- **Vehicle asleep / unavailable:**\n  ```bash\n  python3 scripts/command.py wake\n  ```\n\n- **Command not signed / rejected:**\n  Ensure the proxy is running and `base_url` + `ca_cert` are configured (step 5).\n\nArchive v1.4.2: 12 files, 33979 bytes\n\nFiles: scripts/auth.py (12479b), scripts/command.py (33317b), scripts/start_proxy.sh (3040b), scripts/stop_proxy.sh (1056b), scripts/store.py (4599b), scripts/tesla_fleet.py (3224b), scripts/tesla_oauth_local.py (8710b), scripts/vehicle_data.py (18280b), scripts/vehicles.py (4664b), SETUP.md (5017b), SKILL.md (11714b), _meta.json (134b)\n\nFile v1.4.2:SKILL.md\n\n---\nname: tesla-fleet-api\ndescription: Use when integrating with Tesla's official Fleet API to read vehicle/energy device data or issue remote commands (e.g. start HVAC preconditioning, wake vehicle, charge controls). Covers onboarding (developer app registration, regions/base URLs), OAuth token flows (third-party + partner tokens, refresh rotation), required domain/public-key hosting, and using Tesla's official vehicle-command/tesla-http-proxy for signed vehicle commands.\nversion: 1.4.2\nhomepage: https://github.com/odrobnik/tesla-fleet-api-skill\nmetadata:\n  openclaw:\n    emoji: \"🚗\"\n    requires:\n      bins: [\"python3\", \"openssl\", \"go\"]\n      env: [\"TESLA_CLIENT_ID\", \"TESLA_CLIENT_SECRET\"]\n      optionalEnv: [\"TESLA_AUDIENCE\", \"TESLA_REDIRECT_URI\", \"TESLA_DOMAIN\", \"TESLA_BASE_URL\", \"TESLA_CA_CERT\", \"TESLA_ACCESS_TOKEN\", \"TESLA_REFRESH_TOKEN\", \"TESLA_SCOPE\", \"TESLA_PRIVATE_KEY\", \"TESLA_VEHICLE_COMMAND_VERSION\"]\n\n---\n\n# Tesla Fleet API\n\nControl Tesla vehicles via the official Fleet API.\n\n## Scripts Overview\n\n| Script | Purpose |\n|--------|---------|\n| `command.py` | Vehicle commands (climate, charging, locks, etc.) |\n| `vehicle_data.py` | Read vehicle data (battery, climate, location, etc.) |\n| `vehicles.py` | List vehicles + refresh cache |\n| `auth.py` | Authentication and configuration |\n| `tesla_oauth_local.py` | OAuth helper with local callback server |\n| `start_proxy.sh` | Start the signing proxy (for vehicle commands) |\n| `stop_proxy.sh` | Stop the signing proxy |\n\n---\n\n## Setup / Configuration\n\nSetup is documented in **`SETUP.md`**:\n\n- [SETUP.md](SETUP.md)\n\nState directory: `{workspace}/tesla-fleet-api/`\n- `config.json` (provider creds + non-token config)\n- `auth.json` (tokens)\n- `vehicles.json` (cached vehicle list)\n- `places.json` (named locations)\n- `proxy/` (TLS material for signing proxy)\n\nNo `.env` file loading — credentials in `config.json` or environment variables.\n\n---\n\n## command.py - Vehicle Commands\n\nExecute commands on your Tesla. Vehicle is auto-selected if you only have one.\n\n### Usage\n\n```bash\ncommand.py [VEHICLE] <command> [options]\n```\n\n- `VEHICLE` - Vehicle name or VIN (optional if single vehicle)\n- Commands can be run without specifying vehicle: `command.py honk`\n- Or with vehicle name: `command.py flash honk` (vehicle \"flash\", command \"honk\")\n\n---\n\n### Climate Control\n\n#### Start/Stop Climate\n```bash\ncommand.py climate start\ncommand.py climate stop\ncommand.py flash climate start          # specific vehicle\n```\n\n#### Set Temperature\n```bash\ncommand.py climate temps <driver_temp> [passenger_temp]\ncommand.py climate temps 21             # both seats 21°C\ncommand.py climate temps 22 20          # driver 22°C, passenger 20°C\n```\n\n#### Climate Keeper Mode\n```bash\ncommand.py climate keeper <mode>\n```\nModes: `off`, `keep`, `dog`, `camp`\n\n---\n\n### Seat Heater\n\n```bash\ncommand.py seat-heater --level <level> [--position <position>]\ncommand.py seat-heater -l <level> [-p <position>]\n```\n\n**Levels:**\n| Value | Name |\n|-------|------|\n| 0 | off |\n| 1 | low |\n| 2 | medium |\n| 3 | high |\n\n**Positions:**\n| Value | Names |\n|-------|-------|\n| 0 | `driver`, `front_left`, `fl` |\n| 1 | `passenger`, `front_right`, `fr` |\n| 2 | `rear_left`, `rl` |\n| 3 | `rear_left_back` |\n| 4 | `rear_center`, `rc` |\n| 5 | `rear_right`, `rr` |\n| 6 | `rear_right_back` |\n| 7 | `third_left` |\n| 8 | `third_right` |\n\n**Examples:**\n```bash\ncommand.py seat-heater -l high                    # driver (default)\ncommand.py seat-heater -l medium -p passenger\ncommand.py seat-heater --level low --position rear_left\ncommand.py seat-heater -l 2 -p 4                  # medium, rear center\ncommand.py seat-heater -l off -p driver           # turn off\n```\n\n---\n\n### Seat Cooler (Ventilation)\n\n```bash\ncommand.py seat-cooler --level <level> [--position <position>]\ncommand.py seat-cooler -l <level> [-p <position>]\n```\n\nSame levels and positions as seat heater.\n\n**Examples:**\n```bash\ncommand.py seat-cooler -l medium -p driver\ncommand.py seat-cooler -l high -p passenger\n```\n\n---\n\n### Seat Auto Climate\n\n```bash\ncommand.py seat-climate [--position <position>] <mode>\ncommand.py seat-climate [-p <position>] <mode>\n```\n\nModes: `auto`, `on`, `off`\n\n**Examples:**\n```bash\ncommand.py seat-climate auto                      # driver auto\ncommand.py seat-climate -p passenger auto\ncommand.py seat-climate -p driver off             # disable auto\n```\n\n---\n\n### Steering Wheel Heater\n\n```bash\ncommand.py steering-heater <on|off>\n```\n\n**Examples:**\n```bash\ncommand.py steering-heater on\ncommand.py steering-heater off\n```\n\n---\n\n### Precondition Schedules\n\nModern API for scheduling departure preconditioning (replaces deprecated `set_scheduled_departure`).\n\n#### Add Schedule\n```bash\ncommand.py precondition add --time <HH:MM> [--days <days>] [--id <id>] [--one-time] [--disabled]\ncommand.py precondition add -t <HH:MM> [-d <days>] [--id <id>]\n```\n\n**Days options:**\n| Value | Description |\n|-------|-------------|\n| `all` | Every day (default) |\n| `weekdays` | Monday through Friday |\n| `weekends` | Saturday and Sunday |\n| `mon,tue,wed,...` | Specific days (comma-separated) |\n\nDay names: `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat` (or full names)\n\n**Examples:**\n```bash\ncommand.py precondition add -t 08:00              # every day at 8am\ncommand.py precondition add -t 08:00 -d weekdays  # Mon-Fri\ncommand.py precondition add -t 07:30 -d mon,wed,fri\ncommand.py precondition add -t 09:00 --one-time   # one-time only\ncommand.py precondition add -t 08:30 --id 123     # modify existing schedule\ncommand.py precondition add -t 08:00 --disabled   # create but disabled\n```\n\n#### Remove Schedule\n```bash\ncommand.py precondition remove --id <id>\n```\n\n**Examples:**\n```bash\ncommand.py precondition remove --id 123\ncommand.py precondition remove --id 1\n```\n\n---\n\n### Charging Control\n\n#### Start/Stop Charging\n```bash\ncommand.py charge start\ncommand.py charge stop\n```\n\n#### Set Charge Limit\n```bash\ncommand.py charge limit <percent>\n```\n\nPercent must be 50-100.\n\n**Examples:**\n```bash\ncommand.py charge limit 80\ncommand.py charge limit 90\ncommand.py flash charge limit 70                  # specific vehicle\n```\n\n---\n\n### Doors & Security\n\n```bash\ncommand.py lock                   # lock all doors\ncommand.py unlock                 # unlock all doors\ncommand.py honk                   # honk the horn\ncommand.py flash                  # flash the lights\ncommand.py wake                   # wake vehicle from sleep\n```\n\n**With vehicle name:**\n```bash\ncommand.py flash wake             # wake vehicle named \"flash\"\ncommand.py flash flash            # flash lights on vehicle \"flash\"\n```\n\n---\n\n## vehicle_data.py - Read Vehicle Data\n\nFetch vehicle data with human-readable output by default.\n\n### Usage\n\n```bash\nvehicle_data.py [VEHICLE] [flags] [--json]\n```\n\n- `VEHICLE` - Vehicle name or VIN (optional if single vehicle)\n- No flags = all data\n- `--json` = raw JSON output\n\n### Flags\n\n| Flag | Long | Data |\n|------|------|------|\n| `-c` | `--charge` | Battery level, charge limit, charging status |\n| `-t` | `--climate` | Interior/exterior temp, HVAC status |\n| `-d` | `--drive` | Gear, speed, power, heading |\n| `-l` | `--location` | GPS coordinates |\n| `-s` | `--state` | Locks, doors, windows, odometer, software |\n| `-g` | `--gui` | GUI settings (units, 24h time) |\n| | `--config-data` | Vehicle config (model, color, wheels) |\n\n### Examples\n\n```bash\n# All data\nvehicle_data.py\nvehicle_data.py flash\n\n# Specific data\nvehicle_data.py -c                        # charge only\nvehicle_data.py -c -t                     # charge + climate\nvehicle_data.py flash -c -l               # charge + location\n\n# Raw JSON\nvehicle_data.py --json\nvehicle_data.py -c --json\n```\n\n### Sample Output\n\n```\n🚗 My Tesla (online)\n   VIN: 5YJ... (redacted)\n\n⚡ Charge State\n────────────────────────────────────────\n  Battery:    [███████████████░░░░░] 78%\n  Limit:      80%\n  State:      Charging\n  Power:      11 kW (16A × 234V × 3φ)\n  Added:      37.2 kWh\n  Remaining:  10m\n  Range:      438 km (272 mi)\n  Cable:      IEC\n\n🌡️  Climate State\n────────────────────────────────────────\n  Inside:     11.9°C\n  Outside:    6.0°C\n  Set to:     20.5°C\n  Climate:    Off\n```\n\n---\n\n## auth.py - Authentication\n\nManage OAuth tokens and configuration.\n\n### Usage\n\n```bash\nauth.py <command> [options]\n```\n\n### Commands\n\n#### Login (OAuth Flow)\n```bash\nauth.py login\n```\nInteractive: generates auth URL, prompts for code, exchanges for tokens.\n\n#### Exchange Code\n```bash\nauth.py exchange <code>\n```\nExchange authorization code for tokens (non-interactive).\n\n#### Refresh Tokens\n```bash\nauth.py refresh\n```\nRefresh access token. Note: refresh tokens rotate - the new one is saved automatically.\n\n#### Register Domain\n```bash\nauth.py register --domain <domain>\n```\nRegister your app domain with Tesla (required for signed commands).\n\nAfter registration, enroll your virtual key:\n```\nhttps://tesla.com/_ak/<domain>\n```\n\n#### Show Config\n```bash\nauth.py config\n```\nDisplay current configuration (secrets redacted).\n\n#### Set Config\n```bash\nauth.py config set [options]\n```\n\nOptions:\n- `--client-id <id>`\n- `--client-secret <secret>`\n- `--redirect-uri <uri>`\n- `--audience <url>`\n- `--base-url <url>`\n- `--ca-cert <path>`\n- `--domain <domain>`\n\n**Examples:**\n```bash\n# Initial setup\nauth.py config set \\\n  --client-id \"abc123\" \\\n  --client-secret \"secret\" \\\n  --redirect-uri \"http://localhost:18080/callback\"\n\n# Configure proxy\nauth.py config set \\\n  --base-url \"https://localhost:4443\" \\\n  --ca-cert \"/path/to/tls-cert.pem\"\n```\n\n---\n\n## tesla_fleet.py - List Vehicles\n\nList vehicles with human-readable output.\n\n```bash\npython3 scripts/tesla_fleet.py vehicles\npython3 scripts/tesla_fleet.py vehicles --json\n```\n\n### Sample Output\n\n```\n🚗 Name:   My Tesla\n🔖 VIN:    5YJ... (redacted)\n🟢 Status: Online\n👤 Access: Owner\n```\n\n---\n\n## Configuration / Proxy / File layout\n\nAll setup + configuration is documented in **[SETUP.md](SETUP.md)**.\n\n---\n\n## Regional Base URLs\n\n| Region | Audience URL |\n|--------|--------------|\n| Europe | `https://fleet-api.prd.eu.vn.cloud.tesla.com` |\n| North America | `https://fleet-api.prd.na.vn.cloud.tesla.com` |\n| China | `https://fleet-api.prd.cn.vn.cloud.tesla.cn` |\n\nOAuth token endpoint (all regions):\n```\nhttps://fleet-auth.prd.vn.cloud.tesla.com/oauth2/v3/token\n```\n\n---\n\n## Troubleshooting\n\n### \"vehicle unavailable: vehicle is offline or asleep\"\nWake the vehicle first:\n```bash\ncommand.py wake\n```\n\n### \"command not signed\" / \"vehicle rejected\"\nEnsure the signing proxy is running and configured. See [SETUP.md](SETUP.md) § Proxy Setup.\n\n### Token expired\n```bash\nauth.py refresh\n```\n\n### Multiple vehicles\nSpecify vehicle by name or VIN:\n```bash\ncommand.py flash climate start\ncommand.py 5YJ... honk\n```\n\n---\n\n## Complete Command Reference\n\n### command.py\n\n```\nclimate start|stop\nclimate temps <driver> [passenger]\nclimate keeper off|keep|dog|camp\n\nseat-heater -l <level> [-p <position>]\nseat-cooler -l <level> [-p <position>]\nseat-climate [-p <position>] auto|on|off\n\nsteering-heater on|off\n\nprecondition add -t <HH:MM> [-d <days>] [--id <id>] [--one-time]\nprecondition remove --id <id>\n\ncharge start|stop\ncharge limit <percent>\n\nlock\nunlock\nhonk\nflash\nwake\n```\n\n### vehicle_data.py\n\n```\n[VEHICLE] [-c] [-t] [-d] [-l] [-s] [-g] [--config-data] [--json]\n```\n\n### auth.py\n\n```\nlogin\nexchange <code>\nrefresh\nregister --domain <domain>\nconfig\nconfig set [--client-id] [--client-secret] [--redirect-uri] [--audience] [--base-url] [--ca-cert] [--domain]\n```\n\nFile v1.4.2:_meta.json\n\n{\n  \"ownerId\": \"kn7c7fek4a503rbvj0bxbwx6dx7yw25e\",\n  \"slug\": \"tesla-fleet-api\",\n  \"version\": \"1.4.2\",\n  \"publishedAt\": 1770920505162\n}\n\nFile v1.4.2:SETUP.md\n\n# Tesla Fleet API Skill — Setup Guide\n\nThis guide covers **setup + configuration** for the Tesla Fleet API skill.\n\nIf you just want the CLI command reference, see `SKILL.md`.\n\n---\n\n## Prerequisites\n\n- Tesla Developer Account + an app created\n- A domain you control (for public key hosting + virtual key enrollment)\n- `python3`\n- macOS (scripts tested on macOS)\n- For proxy setup: `go` and `openssl` (on macOS: `brew install go`)\n\n---\n\n## State / Files\n\nAll runtime state lives in your workspace:\n\n`{workspace}/tesla-fleet-api/`\n\nFiles:\n- `config.json` — provider creds (client id/secret), non-token config (audience, base_url, ca_cert, redirect_uri, domain)\n- `auth.json` — tokens (access/refresh)\n- `vehicles.json` — cached vehicle list\n- `places.json` — named locations (`{\"home\": {\"lat\": ..., \"lon\": ...}}`)\n- `proxy/` — TLS material for the signing proxy\n- `*.tesla.private-key.pem` — your Tesla EC private key\n\nCredentials come from `config.json` or environment variables (`TESLA_CLIENT_ID`, `TESLA_CLIENT_SECRET`). No `.env` file loading.\n\n---\n\n## 1) Create & host your EC keypair\n\n```bash\n# Generate P-256 keypair\nopenssl ecparam -name prime256v1 -genkey -noout -out private-key.pem\nopenssl ec -in private-key.pem -pubout -out public-key.pem\n\n# Host public key at:\n# https://YOUR_DOMAIN/.well-known/appspecific/com.tesla.3p.public-key.pem\n```\n\nStore your private key in the workspace:\n`{workspace}/tesla-fleet-api/YOUR_DOMAIN.tesla.private-key.pem`\n\n---\n\n## 2) Configure provider credentials\n\n```bash\npython3 scripts/auth.py config set \\\n  --client-id \"YOUR_CLIENT_ID\" \\\n  --client-secret \"YOUR_CLIENT_SECRET\" \\\n  --redirect-uri \"http://localhost:18080/callback\" \\\n  --audience \"https://fleet-api.prd.eu.vn.cloud.tesla.com\"\n```\n\nThis writes to `{workspace}/tesla-fleet-api/config.json`.\n\n---\n\n## 3) OAuth login (creates auth.json)\n\nInteractive login (manual code paste):\n\n```bash\npython3 scripts/auth.py login\n```\n\nAutomatic login via local callback server:\n\n```bash\npython3 scripts/tesla_oauth_local.py --prompt-missing-scopes\n```\n\n---\n\n## 4) Register domain + enroll virtual key\n\n```bash\npython3 scripts/auth.py register --domain YOUR_DOMAIN.com\n```\n\nThen, on your phone (Tesla app installed):\n\n`https://tesla.com/_ak/YOUR_DOMAIN.com`\n\n---\n\n## 5) Proxy Setup (for signed commands only)\n\n> **Note:** The proxy is only needed for **sending signed commands** to the vehicle (climate, locks, charging, honk, etc.). Reading vehicle data (battery, location, temperatures) works without the proxy — those requests go directly to the Tesla Fleet API.\n\n### Install tesla-http-proxy\n\n```bash\n# Pin to a specific version for supply-chain safety\ngo install github.com/teslamotors/vehicle-command/cmd/tesla-http-proxy@v0.4.1\n```\n\nThis installs `tesla-http-proxy` to `~/go/bin/`. Override the version with `TESLA_VEHICLE_COMMAND_VERSION` only if you explicitly want a different one.\n\n### Generate TLS certificates\n\n```bash\nmkdir -p {workspace}/tesla-fleet-api/proxy\ncd {workspace}/tesla-fleet-api/proxy\n\nopenssl req -x509 -newkey rsa:4096 \\\n  -keyout tls-key.pem -out tls-cert.pem \\\n  -days 365 -nodes -subj \"/CN=localhost\"\n\nchmod 600 tls-key.pem\n```\n\n### Configure scripts to use the proxy\n\n```bash\npython3 scripts/auth.py config set \\\n  --base-url \"https://localhost:4443\" \\\n  --ca-cert \"proxy/tls-cert.pem\"\n```\n\nThe `ca_cert` path is stored relative to the config directory and resolved at runtime.\n\n### Start / stop the proxy\n\nUse the convenience scripts:\n\n```bash\n# Start (auto-detects private key in workspace, or pass path explicitly)\n./scripts/start_proxy.sh\n./scripts/start_proxy.sh /path/to/private-key.pem\n\n# Stop\n./scripts/stop_proxy.sh\n```\n\nThe proxy runs in the background on `https://localhost:4443`. Logs go to `{workspace}/tesla-fleet-api/proxy/proxy.log`.\n\n---\n\n## 6) Test\n\n```bash\n# Data (no proxy needed)\npython3 scripts/vehicles.py\npython3 scripts/vehicle_data.py -c\n\n# Commands (proxy required)\npython3 scripts/command.py honk\n```\n\n---\n\n## Places (named lat/lon)\n\n```bash\n# list\npython3 scripts/command.py places list\n\n# set explicit coords\npython3 scripts/command.py places set home --lat 48.10033 --lon 17.04217\n\n# set from current vehicle location\npython3 scripts/command.py places set school --here\n\n# use in precondition\npython3 scripts/command.py precondition add -t 08:00 -d weekdays --place home\n```\n\n---\n\n## Regional Base URLs\n\n| Region | Audience URL |\n|--------|--------------|\n| Europe | `https://fleet-api.prd.eu.vn.cloud.tesla.com` |\n| North America | `https://fleet-api.prd.na.vn.cloud.tesla.com` |\n| China | `https://fleet-api.prd.cn.vn.cloud.tesla.cn` |\n\nOAuth token endpoint (all regions):\n```\nhttps://fleet-auth.prd.vn.cloud.tesla.com/oauth2/v3/token\n```\n\n---\n\n## Troubleshooting\n\n- **Token expired (401):**\n  ```bash\n  python3 scripts/auth.py refresh\n  ```\n\n- **Vehicle asleep / unavailable:**\n  ```bash\n  python3 scripts/command.py wake\n  ```\n\n- **Command not signed / rejected:**\n  Ensure the proxy is running and `base_url` + `ca_cert` are configured (step 5).","readmeExcerpt":"Skill: Tesla Fleet Api Owner: odrobnik Summary: Use when integrating with Tesla's official Fleet API to read vehicle/energy device data or issue remote commands (e.g. start HVAC preconditioning, wake vehicle, charge controls). Covers onboarding (developer app registration, regions/base URLs), OAuth token flows (third-party + partner tokens, refresh rotation), required domain/public-key hosting, and using Tesla's offi","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"command.py [VEHICLE] <command> [options]"},{"language":"bash","snippet":"command.py climate start\ncommand.py climate stop\ncommand.py flash climate start          # specific vehicle"},{"language":"bash","snippet":"command.py climate temps <driver_temp> [passenger_temp]\ncommand.py climate temps 21             # both seats 21°C\ncommand.py climate temps 22 20          # driver 22°C, passenger 20°C"},{"language":"bash","snippet":"command.py climate keeper <mode>"},{"language":"bash","snippet":"command.py seat-heater --level <level> [--position <position>]\ncommand.py seat-heater -l <level> [-p <position>]"},{"language":"bash","snippet":"command.py seat-heater -l high                    # driver (default)\ncommand.py seat-heater -l medium -p passenger\ncommand.py seat-heater --level low --position rear_left\ncommand.py seat-heater -l 2 -p 4                  # medium, rear center\ncommand.py seat-heater -l off -p driver           # turn off"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: tesla-fleet-api\ndescription: Use when integrating with Tesla's official Fleet API to read vehicle/energy device data or issue remote commands (e.g. start HVAC preconditioning, wake vehicle, charge controls). Covers onboarding (developer app registration, regions/base URLs), OAuth token flows (third-party + partner tokens, refresh rotation), required domain/public-key hosting, and using Tesla's official vehicle-command/tesla-http-proxy for signed vehicle commands.\nversion: 1.5.0\nhomepage: https://github.com/odrobnik/tesla-fleet-api-skill\nmetadata:\n  openclaw:\n    emoji: \"🚗\"\n    requires:\n      bins: [\"python3\", \"openssl\"]\n      env: [\"TESLA_CLIENT_ID\", \"TESLA_CLIENT_SECRET\"]\n      optionalEnv: [\"TESLA_AUDIENCE\", \"TESLA_REDIRECT_URI\", \"TESLA_DOMAIN\", \"TESLA_BASE_URL\", \"TESLA_CA_CERT\", \"TESLA_ACCESS_TOKEN\", \"TESLA_REFRESH_TOKEN\", \"TESLA_SCOPE\"]\n\n---\n\n# Tesla Fleet API\n\nControl Tesla vehicles via the official Fleet API.\n\n## Scripts Overview\n\n| Script | Purpose |\n|--------|---------|\n| `command.py` | Vehicle commands (climate, charging, locks, etc.) |\n| `vehicle_data.py` | Read vehicle data (battery, climate, location, etc.) |\n| `vehicles.py` | List vehicles + refresh cache |\n| `auth.py` | Authentication and configuration |\n| `tesla_oauth_local.py` | OAuth helper with local callback server |\n| `start_proxy.sh` | Start the signing proxy (for vehicle commands) |\n| `stop_proxy.sh` | Stop the signing proxy |\n\n---\n\n## Setup / Configuration\n\nSetup is documented in **`SETUP.md`**:\n\n- [SETUP.md](SETUP.md)\n\nState directory: `{workspace}/tesla-fleet-api/`\n- `config.json` (provider creds + non-token config)\n- `auth.json` (tokens)\n- `vehicles.json` (cached vehicle list)\n- `places.json` (named locations)\n- `proxy/` (TLS material for signing proxy)\n\nNo `.env` file loading — credentials in `config.json` or environment variables.\n\n---\n\n## command.py - Vehicle Commands\n\nExecute commands on your Tesla. Vehicle is auto-selected if you only have one.\n\n### Usage\n\n```bash\ncommand.py [VEHICLE] <command> [options]\n```\n\n- `VEHICLE` - Vehicle name or VIN (optional if single vehicle)\n- Commands can be run without specifying vehicle: `command.py honk`\n- Or with vehicle name: `command.py flash honk` (vehicle \"flash\", command \"honk\")\n\n---\n\n### Climate Control\n\n#### Start/Stop Climate\n```bash\ncommand.py climate start\ncommand.py climate stop\ncommand.py flash climate start          # specific vehicle\n```\n\n#### Set Temperature\n```bash\ncommand.py climate temps <driver_temp> [passenger_temp]\ncommand.py climate temps 21             # both seats 21°C\ncommand.py climate temps 22 20          # driver 22°C, passenger 20°C\n```\n\n#### Climate Keeper Mode\n```bash\ncommand.py climate keeper <mode>\n```\nModes: `off`, `keep`, `dog`, `camp`\n\n---\n\n### Seat Heater\n\n```bash\ncommand.py seat-heater --level <level> [--position <position>]\ncommand.py seat-heater -l <level> [-p <position>]\n```\n\n**Levels:**\n| Value | Name |\n|-------|------|\n| 0 | off |\n| 1 | low |\n| 2 | medium |\n| 3 | high |\n\n**Posi"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7c7fek4a503rbvj0bxbwx6dx7yw25e\",\n  \"slug\": \"tesla-fleet-api\",\n  \"version\": \"1.5.0\",\n  \"publishedAt\": 1771003588072\n}"},{"path":"SETUP.md","content":"# Tesla Fleet API Skill — Setup Guide\n\nThis guide covers **setup + configuration** for the Tesla Fleet API skill.\n\nIf you just want the CLI command reference, see `SKILL.md`.\n\n---\n\n## Prerequisites\n\n- Tesla Developer Account + an app created\n- A domain you control (for public key hosting + virtual key enrollment)\n- `python3`\n- `openssl` (for key generation + TLS certs)\n- macOS (scripts tested on macOS)\n- For proxy setup: `go` (on macOS: `brew install go`) — only needed once to compile the proxy binary\n\n---\n\n## State / Files\n\nAll runtime state lives in your workspace:\n\n`{workspace}/tesla-fleet-api/`\n\nFiles:\n- `config.json` — provider creds (client id/secret), non-token config (audience, base_url, ca_cert, redirect_uri, domain)\n- `auth.json` — tokens (access/refresh)\n- `vehicles.json` — cached vehicle list\n- `places.json` — named locations (`{\"home\": {\"lat\": ..., \"lon\": ...}}`)\n- `proxy/` — TLS material for the signing proxy\n- `private-key.pem` — your Tesla EC private key (fixed name)\n\nCredentials come from `config.json` or environment variables (`TESLA_CLIENT_ID`, `TESLA_CLIENT_SECRET`). No `.env` file loading.\n\n---\n\n## 1) Create & host your EC keypair\n\n```bash\n# Generate P-256 keypair\nopenssl ecparam -name prime256v1 -genkey -noout -out private-key.pem\nopenssl ec -in private-key.pem -pubout -out public-key.pem\n\n# Host public key at:\n# https://YOUR_DOMAIN/.well-known/appspecific/com.tesla.3p.public-key.pem\n```\n\nStore your private key in the workspace with a fixed name:\n`{workspace}/tesla-fleet-api/private-key.pem`\n\n---\n\n## 2) Configure provider credentials\n\n```bash\npython3 scripts/auth.py config set \\\n  --client-id \"YOUR_CLIENT_ID\" \\\n  --client-secret \"YOUR_CLIENT_SECRET\" \\\n  --redirect-uri \"http://localhost:18080/callback\" \\\n  --audience \"https://fleet-api.prd.eu.vn.cloud.tesla.com\"\n```\n\nThis writes to `{workspace}/tesla-fleet-api/config.json`.\n\n---\n\n## 3) OAuth login (creates auth.json)\n\nInteractive login (manual code paste):\n\n```bash\npython3 scripts/auth.py login\n```\n\nAutomatic login via local callback server:\n\n```bash\npython3 scripts/tesla_oauth_local.py --prompt-missing-scopes\n```\n\n---\n\n## 4) Register domain + enroll virtual key\n\n```bash\npython3 scripts/auth.py register --domain YOUR_DOMAIN.com\n```\n\nThen, on your phone (Tesla app installed):\n\n`https://tesla.com/_ak/YOUR_DOMAIN.com`\n\n---\n\n## 5) Proxy Setup (for signed commands only)\n\n> **Note:** The proxy is only needed for **sending signed commands** to the vehicle (climate, locks, charging, honk, etc.). Reading vehicle data (battery, location, temperatures) works without the proxy — those requests go directly to the Tesla Fleet API.\n\n### Install tesla-http-proxy\n\nRequires Go (`brew install go` on macOS).\n\n```bash\n# Pin to a specific version for supply-chain safety\ngo install github.com/teslamotors/vehicle-command/cmd/tesla-http-proxy@v0.4.1\n```\n\nThis installs `tesla-http-proxy` to `~/go/bin/`.\n\n### Generate TLS certificates\n\n```bash\nmkdir -p {workspace}/tesla-fleet-api/proxy\ncd {workspace}/t"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1288,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T12:21:10.486Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}