{"id":20392013,"url":"https://github.com/jaisor/tesla-api-prometheus-exporter","last_synced_at":"2026-05-11T09:45:23.367Z","repository":{"id":206137332,"uuid":"715938695","full_name":"jaisor/tesla-api-prometheus-exporter","owner":"jaisor","description":"Prometheus exporter for Tesla API metrics","archived":false,"fork":false,"pushed_at":"2023-12-17T08:03:41.000Z","size":829,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-15T10:25:38.924Z","etag":null,"topics":["exporter","grafana","metrics","powerwall","powerwall-api","prometheus","tesla","tesla-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaisor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-08T06:18:06.000Z","updated_at":"2023-12-18T00:29:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"1551a349-e6b1-45bb-8b72-6664bb67dcd2","html_url":"https://github.com/jaisor/tesla-api-prometheus-exporter","commit_stats":null,"previous_names":["jaisor/tesla-api-prometheus-exporter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaisor%2Ftesla-api-prometheus-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaisor%2Ftesla-api-prometheus-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaisor%2Ftesla-api-prometheus-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaisor%2Ftesla-api-prometheus-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaisor","download_url":"https://codeload.github.com/jaisor/tesla-api-prometheus-exporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241940576,"owners_count":20045883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["exporter","grafana","metrics","powerwall","powerwall-api","prometheus","tesla","tesla-api"],"created_at":"2024-11-15T03:38:44.744Z","updated_at":"2026-05-11T09:45:18.326Z","avatar_url":"https://github.com/jaisor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tesla-api-prometheus-exporter\r\nPrometheus exporter for Tesla API metrics\r\n\r\nDashboard snapshot https://snapshots.raintank.io/dashboard/snapshot/V8ReJsr79g4LfgzLlWVphFmZDIKP2Wp1\r\n![Example Grafana dashboard](img/dash.png)\r\n\r\nGrafana JSON exported in [grafana_dash.json](grafana_dash.json)\r\n\r\nGitHub repo: https://github.com/jaisor/tesla-api-prometheus-exporter\r\n\r\n# Tesla API auth\r\n\r\nSee https://github.com/adriankumpf/tesla_auth for instructions on how to generate access and refresh tokens\r\n\r\n# Build \u0026 run\r\n\r\n## Local npm\r\n\r\nCreate an `auth.json` file in the config path (ex: `.config/auth.json`) containing at-least a valid refresh token.\r\nThe script will populate access token and future refresh tokens in that file as needed.\r\n\r\n```\r\n{\r\n  \"refresh_token\": \"\u003cREDACTED\u003e\"\r\n}\r\n```\r\n\r\nEnsure the script has access to CONFIG_PATH environment variable pointing to the the folder containing `auth.json`. Example `.env` file to accomplish this:\r\n\r\n```\r\nCONFIG_PATH=.config\r\n```\r\n\r\nInstall and run\r\n\r\n```\r\nnpm install\r\nnpm start\r\n```\r\n\r\n## Docker container\r\n\r\n```\r\ndocker build -t tesla-api-prometheus-exporter:latest .\r\n```\r\n\r\n```\r\ndocker run -dit --restart unless-stopped --name tesla-api-prometheus-exporter \\\r\n  -v .config:/config -p 9004:8080 \\\r\n  -e CONFIG_PATH=/config -e LOG_LEVEL=info \\\r\n  tesla-api-prometheus-exporter:latest\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaisor%2Ftesla-api-prometheus-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaisor%2Ftesla-api-prometheus-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaisor%2Ftesla-api-prometheus-exporter/lists"}