Guy's Tesla Panel Build

The ugliest page on the net


3 March 2021: Rather big update:

  1. Updated all the code to use JSON rather than manually finding text in the return value from the Gateway

  2. Updated the code to display local tempature on Strip 6 rather than Grid Voltage.  There is a variable Display6 in the script you can set to Temp or Volt to display Temperature or Voltage.

  3. All diplays default to off pixels for those not having data now.  To turn back to the light blue as in the photos, change the RGB values from (0, 0, 0) to (0, 1, 1)

9 Feb 2021 9:30PM : Sweet!  New code released below in the link to the ZIP file which now logs into your Tesla Gateway to get the data required.  You will need to edit the script to add your LOCAL Customer Login email and password to the script.  To find out how to set up this local login account (if you hanv't already) follow the instructions on Telsa's page HERE.

9 Feb 2021 : eeek!  Tesla just updated my Gateway 2 and my code has stopped working as it now needs to login to the Gateway before gettng the data for display.
I am looking into how to address this however it may take some time.

1 Feb 2021:  Origonal page posted

Not yet finished, but getting there.
Currently, from left to right:
1: Battery Charge % (red when charging, green when 100%)
2: Solar generation (scaled to my max 10kW
3: Feed in kW to Grid (green for feed in, deep blue for draw)
4: Current house load (scaled to 10kw currently).

Next steps:
-Print some logos for the bottom (maybe an excuse to buy one of those laser engravers 🙂
-Work out a good 5v power solution (currently running off a lab power supply. I think I have an idea for this.


So you found my little page.  1st thing to note is I am no web designer so yes, I know this page is not fancy, it is plain, but hopefully it is also 'functional'.  I am also sure there are many spelling mistakes and typos in this page!
I started this little project as I have a Tesla Powerwall 2 with associated Gateway 2 and I have found that I am always looking for a quick way to see what is happening with not only the status of the battery, but also the PV panels, household power usage, feed in or draw from the grid etc.

The Tesla app gives you a pretty nice way of seeing all that, but I have to open the app on my phone, its not exactly there at a glance.

I have set up an old Microsoft Surface 2 table/laptop to display the Gateway's local interface however from a distance its not easy to see the values, and because the Gateway uses a self signed certificate every now and then I need to re-accept the certificate for the page to display.  I probably could find a way around this, perhaps installing the cert on the laptop would do it, but the display is still too small.

Therefore I embarked on a little project to create an analogue display to present the data.  Analogue is always best for a quick glance of a value, when accuracy isn't overly critical.

What you need to copy this

Getting it working

Step 1:  Set up your Raspberry Pi in the standard way.  This is not part of this 'instruction set'.  You just need Raspbian installed and the ability to access either a SHELL or VNC connection.  VNC is easier for novices as it also lets you copy files from your computer to the Pi.

Step 2: Open a shell and run the command sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel

Note: This command is also in the text file you downloaded in the file "Setup For Light Strip.txt"

Step 3: Copy the file from the ZIP file to your Raspberry Pi.

You can close this window now

Step 4: Move the file into your home folder.  If you open the Folder browser it will default to your home folder.  Just put the file in there.  You really can put it anywhere you like however this is the folder a shell window opens in to it makes it easier to run if it is already in this folder

Before you run the code you have two tasks to complete.

  1. Connect your Light Strip/s to the Raspberry Pi

  2. Modify the code for YOUR light strip setup

Connect your Light Strip/s to the Raspberry Pi

Modify the code for YOUR light strip/s.



Running the Code

I hope that is enough to get you going.  How you mount it is up to you, I might add some information later on how I did it if I have time.

Troubleshooting (no display on strip?)


Guy Barwood