Tesla Powerwall display based on 7-segment TM1637 displays and ESP8266 to show current solar generation, powerwall (power and percentage), grid and load power usage.
- Display1 (4-digit white/yellow): Solar Power Generated
- Display2 (6-digit red): Rotates thought the following Power metrics:
- (H)ouse Load
- (E)lectric Grid + direction animation
- (P)owerwall Battery + direction animation
- Display3 (4-digit green): Powerwall Battery (% Full) + animation for charge/discharge
The display will show values in watts (W) for 1-9999W values and kilowatts (kW) for 10.0kW and above.
The 3D printed case houses the ESP8266 WeMos controller, two 4-digit displays and one 6-digit display. The model has a cutout TESLA logo that can be backlit.
The following components were used to build this kit:
- ESP8266 WeMos D1 Mini Controller - Amazon | AliExpress
- TM1637 0.56" 4-Digit LED Segment Display (White/Yellow) - Amazon
- TM1637 0.36" 4-Digit LED Segment Display (Green) - Amazon
- TM1637 0.56" 6-Digit LED Segment Display (Red) - Amazon | AliExpress
- Optional - Green LEDs for Logo Backlight
The display uses the pyPowerwall proxy to connect with the Powerwall API. You you will need to install this on a local system (Raspberry Pi, Linux or Windows system) that is always running so that the display can pull the latest data. The proxy can be installed as a docker container. Be sure to update the password, email, Powerwall host IP address and Timezone.
Proxy Install Instructions using Docker:
docker run \
-d \
-p 8675:8675 \
-e PW_PASSWORD='your-powerwall-password' \
-e PW_EMAIL='your-powerwall-email' \
-e PW_HOST='your-powerwall-ip-address' \
-e PW_TIMEZONE='America/Los_Angeles' \
-e PW_CACHE_EXPIRE='20' \
--name pypowerwall \
--restart unless-stopped \
jasonacox/pypowerwall
The code uses the TM1637TinyDisplay Arduino library to drive the 7-segment 4-digit and 6-digit displays (see installation instructions here).
-
Use the Arudino sketch located here.
-
Update the Configuration Section for your Setup in the sketch:
// Configuration Settings
#define FILTER 50 // Zero out power values less than this
#define PROXYHOST "10.0.x.x" // Address of Proxy Server
#define PROXYPORT 8675 // Port of Proxy Server (default=8675)
// Wifi Configuration
const char* WIFI_SSID = "WIFI_SSID";
const char* WIFI_PWD = "WIFI_PASSWORD";
// Display GPIO Pins (Clock and Data)
#define CLK1 5 // Display 1 - 4-digit for SOLAR power display (Yellow)
#define DIO1 4
#define CLK2 14 // Display 2 - 6-digit for POWER display for Grid, Home and Powerwall (Red)
#define DIO2 12
#define CLK3 13 // Display 3 - 4-digit for BATTERY percentage (Green)
#define DIO3 16
#define TESLA 0 // Optional Tesla Logo LED
The cirucit is fairly simple. As noted above in the code, the ESP8266 module will need to drive the CLK (clock) and DIO (data) input on three different display modules, one 6-digit modules and two 4-digit modules. There is an optional output for the Logo LED.