Skip to content

dmyerscough/tesla-powerwall-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tesla Powerwall Exporter

Prometheus exporter for Tesla Powerwall and Solar.

Tesla Powerwall Exporter

Installation and Usage

Building the Tesla Powerwall exporter can be done by running the following commands.

$ git clone https://github.com/dmyerscough/tesla-powerwall-exporter.git
$ cd tesla-powerwall-exporter
$ npm install

Once you have installed the required dependencies, export the following three environment variables. TESLA_ADDR is the IP address of the Tesla Powerwall and the TESLA_EMAIL and TESLA_PASSWORD are used for authenticating.

$ export TESLA_ADDR="192.168.0.3"
$ export TESLA_EMAIL="damian@example.com"
$ export TESLA_PASSWORD="MySecretPassword"
$ npm run start
{"level":"info","message":"Scraping powerwall","timestamp":"2022-04-04T06:48:33.765Z"}
{"level":"info","message":"Listening on 0.0.0.0:8080","timestamp":"2022-04-04T06:48:33.768Z"}
{"level":"info","message":"Finished scraping powerwall","timestamp":"2022-04-04T06:48:34.342Z"}
...
...

Docker

docker run \
  -p 9961:9961 \
  -e TESLA_ADDR="192.168.0.3" \
  -e TESLA_EMAIL="damian@example.com" \
  -e TESLA_PASSWORD="MySecretPassword" \
  prometheus-tesla:0.0.1

Prometheus Configuration

You can configure Prometheus to scrape the Telsa Powerwall Exporter metrics endpoint using the following job snippet.

- job_name: "tesla_powerwall"
    metrics_path: "/metrics"
    static_configs:
      - targets: ["192.168.0.1:9961"]

About

Tesla Powerwall Exporter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published