Giter Club home page Giter Club logo

powerwall-dashboard's Introduction

Powerwall-Dashboard

Monitoring Dashboard for the Tesla Powerwall using Grafana, InfluxDB and Telegraf.

Dashboard Strings

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.

Requirements

The host system will require:

  • docker
  • docker-compose

Setup

Clone this repo to your local host that will run the dashboard:

    git clone https://github.com/jasonacox/Powerwall-Dashboard.git

Option 1 - Quick Start

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.

Option 2 - Manual Install

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"

Docker Containers

  • Edit powerwall.yml and look for the section under pypowerall 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

InfluxDB

  • 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.

Grafana Setup

  • Open up Grafana in a browser at http://<server ip>:9000 and login with admin/admin

  • From Configuration\Data Sources add InfluxDB database with:

    • Name: InfluxDB
    • URL: http://influxdb:8086
    • Database: powerwall
    • Min time interval: 5s
    • Click "Save & test" button
  • From Configuration\Data Sources add Sun 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
  • From Dashboard\Manage (or Dashboard\Browse), select Import, and upload dashboard.json

Notes

  • 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 replace America/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.

Troubleshooting Tips and Tricks

Check the logs of the services using:

    docker logs -f pypowerwall
    docker logs -f telegraf
    docker logs -f influxdb
    docker logs -f grafana

Missing String data?

  • String data only shows up for Tesla inverters as part of the Powerwall+ systems. Unfortunately, non-Tesla inverter data is not available via the Tesla API. If you find a way to pull this data, please submit an Issue or Pull Request to get it added.
  • The default dashboard and InfluxDB setup supports up to 3 Tesla Powerwall+ inverters. Support for more can be added by editing the dashboard.json and influxdb.sql files. Open an Issue and we can help (see #2).

Tips and Tricks

Since pyPowerwall proxy is part of this dashboard stack, you can query it to get raw data (read only) from the Powerwall API. This includes some aggregate functions you might find useful for other projects. I use this for ESP32 driven display for example. Replace localhost with the address of the system running the dashboard:

Credits

powerwall-dashboard's People

Contributors

jasonacox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.