Monitoring Dashboard for the Tesla Powerwall using Grafana, InfluxDB and Telegraf.
This fork has materially changed from the original and is now hosted in a new location.
- New Location: Powerwall-Dashboard
- Submit issues: Click Here
This is based on the great work by mihailescu2m but has been modified to use pypowerwall as a proxy to the Powerwall and includes solar String graphs for Powerwall+ systems.
The host system will require:
- docker
- docker-compose
Clone this repo to your local host that will run the dashboard:
git clone https://github.com/jasonacox/powerwall_monitor.git
Run the interactive setup script that will ask you for your Powerwall details and Time Zone data.
./setup.sh
Jump to the Grafana Setup below to complete the setup.
If you prefer, you can perform the same steps that setup.sh
performs.
You will want to set your local timezone by editing powerwall.yml
, influxdb.sql
and dashboard.json
or you can use this handy tz.sh
update script. A list of timezones is available here.
# Replace with your timezone
bash tz.sh "America/Los_Angeles"
- Edit
powerwall.yml
and look for the section underpypowerall
and update the following details for your Powerwall:
PW_PASSWORD: "password"
PW_EMAIL: "[email protected]"
PW_HOST: "192.168.91.1"
PW_TIMEZONE: "America/Los_Angeles"
PW_DEBUG: "yes"
- Start the docker containers
docker-compose -f powerwall.yml up -d
- Connect to the Influx database to import setup commands:
docker exec -it influxdb influx -import -path=/var/lib/influxdb/influxdb.sql
Note: the influxdb.sql file is set to use America/Los_Angeles
as timezone. Use the tz.sh
script or manually update the database commands above to replace America/Los_Angeles
with your own timezone.
-
Open up Grafana in a browser at
http://<server ip>:9000
and login withadmin/admin
-
From
Configuration\Data Sources
addInfluxDB
database with:- Name:
InfluxDB
- URL:
http://influxdb:8086
- Database:
powerwall
- Min time interval:
5s
- Click "Save & test" button
- Name:
-
From
Configuration\Data Sources
addSun and Moon
database with:- Name:
Sun and Moon
- Enter your latitude and longitude. You can use this web page to find your GPS location if you don't know).
- Click "Save & test" button
- Name:
-
From
Dashboard\Manage
(orDashboard\Browse
), selectImport
, and uploaddashboard.json
-
The database queries and dashboard are set to use
America/Los_Angeles
as the timezone. Remember to edit the database commands influxdb.sql, powerwall.yml, and dashboard.json to replaceAmerica/Los_Angeles
with your own timezone. -
InfluxDB does not run reliably on older models of Raspberry Pi, resulting in the Docker container terminating with
error 139
.
Check the logs of the services using:
docker logs -f pypowerwall
docker logs -f telegraf
docker logs -f influxdb
docker logs -f grafana
- This is based on the great work by mihailescu2m at https://github.com/mihailescu2m/powerwall_monitor.