Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Using pypowerwall - how to get started

This site may earn commission on affiliate links.
Hi All,

I'm trying to do some basic diagnosis on my new Tesla solar installation, and to start off I have installed pypowerwall. The problem is that the program appears to need the IP address of the Powerwall. Unfortunately, my WiFi devices cannot see the Powerwall's WiFi. I can connect to the stand-alone inverter's WiFi, and the swtich's WiFi, but I can't "see" the Powerwall's WiFi with any of my devices (mobile phone, PC, etc.). I have tried scanning the network, using the QR code in the Powerwall's inverter to no avail.

When I do a "python -m pypowerwall scan", it detects that my network is at 10.4.18.0, then detects one device on the network (the stand-alone inverter). However, it cannot detect the Powerwall, either.

Am I doing this right? I do have the Tesla app connected, is this somehow interfering with pypowerwall? Is there something wrong with my Powerwall's WiFi?

My system was just installed 2 months ago; I have 9.6kW (24 panels) and a Powerwall Plus, and I'm in San Jose.

Thanks!
 
Forgot to mention - the Powerwall is indeed functional. It gets charged up by the solar panels during the day, discharges at night, etc. The problem I'm trying to diagnose is low energy output from the panels. I suspect a string isn't connected correctly, so I'm trying to use pypowerwall to get string output information.

Thanks!

solarpics
 
Hi All,

I'm trying to do some basic diagnosis on my new Tesla solar installation, and to start off I have installed pypowerwall. The problem is that the program appears to need the IP address of the Powerwall. Unfortunately, my WiFi devices cannot see the Powerwall's WiFi. I can connect to the stand-alone inverter's WiFi, and the swtich's WiFi, but I can't "see" the Powerwall's WiFi with any of my devices (mobile phone, PC, etc.). I have tried scanning the network, using the QR code in the Powerwall's inverter to no avail.

When I do a "python -m pypowerwall scan", it detects that my network is at 10.4.18.0, then detects one device on the network (the stand-alone inverter). However, it cannot detect the Powerwall, either.

Am I doing this right? I do have the Tesla app connected, is this somehow interfering with pypowerwall? Is there something wrong with my Powerwall's WiFi?

My system was just installed 2 months ago; I have 9.6kW (24 panels) and a Powerwall Plus, and I'm in San Jose.

Thanks!
I only have PW2 and TEG2 so it may not apply to PW+. Before the latest versions of Tesla app you have to get close to and connect to the TEG own SSID which usually is TEG-XXX, its own SSID and password can be found inside the gateway panel, once you are connected to the TEG own SSID you can set it up to enable and connect to your home Wi-Fi. With the current Tesla app you can connect to your home Wi-Fi in the settings. You can use either the TEG own IP, in the case of GW2 it is 192.168.91.1 or the assigned IP from your home Wi-Fi for pypowerwall, of course if you use the TEG own IP your computer or mobile device has to be connected to it first. With PW+ you definitely can see strings data, but please work on connecting it to your home Wi-Fi first.
 
I only have PW2 and TEG2 so it may not apply to PW+. Before the latest versions of Tesla app you have to get close to and connect to the TEG own SSID which usually is TEG-XXX, its own SSID and password can be found inside the gateway panel, once you are connected to the TEG own SSID you can set it up to enable and connect to your home Wi-Fi. With the current Tesla app you can connect to your home Wi-Fi in the settings. You can use either the TEG own IP, in the case of GW2 it is 192.168.91.1 or the assigned IP from your home Wi-Fi for pypowerwall, of course if you use the TEG own IP your computer or mobile device has to be connected to it first. With PW+ you definitely can see strings data, but please work on connecting it to your home Wi-Fi first.
Thanks for the reply! I did get right next to the Powerwall and try to connect to it (using the QR code/SSID and password on the label inside the Powerwall's Inverter box). Unfortunately, the the SSID (TEG-xxx) can't be found when I scan for it. I suspect it is disabled, or not working properly (?). Or I'm missing a step in this process...? I have tried resetting the entire system hoping this would help, but the Powerwall's SSID cannot be found no matter what I do. My next step is to try to connect to it with an ethernet cable.
 
Thanks for the reply! I did get right next to the Powerwall and try to connect to it (using the QR code/SSID and password on the label inside the Powerwall's Inverter box). Unfortunately, the the SSID (TEG-xxx) can't be found when I scan for it. I suspect it is disabled, or not working properly (?). Or I'm missing a step in this process...? I have tried resetting the entire system hoping this would help, but the Powerwall's SSID cannot be found no matter what I do. My next step is to try to connect to it with an ethernet cable.
Can you see your Panels and PW in the Tesla app? If so can you go to settings/Wi-Fi? You should be able to connect it to your home Wi-Fi here, if your home Wi-Fi is hidden you can enter it manually otherwise you just select it and enter the credentials.
 
  • Like
Reactions: solarpics
I can see the Panels and PW in the Tesla app (I can get status of power generation, home power use, PW charging and discharging, etc), and it is indeed connected to my home Wi-Fi. (I think this is what you were asking).

Maybe I should back up a bit. The Tesla app tells me the status of all the panels together. What I am trying to do is get status of the individual strings (to determine if there is a problem since my array seems to be underperforming), and I thought the best way to do this was the pypowerwall python app which wants to connect to the Powerwall's WiFi. But I cannot "see" the Powerwall's SSID, although I can "see" the stand alone inverter's SSID (TEG-xxx) and the Gateway's SSID (TeslaPV_xxxxxx). Am I going about this the wrong way? Thanks again for your help!
 
I can see the Panels and PW in the Tesla app (I can get status of power generation, home power use, PW charging and discharging, etc), and it is indeed connected to my home Wi-Fi. (I think this is what you were asking).

Maybe I should back up a bit. The Tesla app tells me the status of all the panels together. What I am trying to do is get status of the individual strings (to determine if there is a problem since my array seems to be underperforming), and I thought the best way to do this was the pypowerwall python app which wants to connect to the Powerwall's WiFi. But I cannot "see" the Powerwall's SSID, although I can "see" the stand alone inverter's SSID (TEG-xxx) and the Gateway's SSID (TeslaPV_xxxxxx). Am I going about this the wrong way? Thanks again for your help!
If you can see in settings that it is connected to your home Wi-Fi, can you go to your router and see what IP address is assigned to the gateway (I think may be a LG device)? You then use that IP in your pypowerall script. The pyPowerwall strings method/function should return individual strings data.
 
  • Like
Reactions: solarpics
Good call!

I looked through the list of devices connected to my WiFi router, and the the stand alone inverter and gateway were there as I expected, but nothing with "LG" in the name. So I ran a pypowerwall scan and it found it! It actually has an unintelligible name, a series of numbers and letters that looks like a model and serial number, but it found it! Thanks so much! I am now getting a python error when I run pypowerwall, but hopefully I can figure it out quickly.
 
I can see the Panels and PW in the Tesla app (I can get status of power generation, home power use, PW charging and discharging, etc), and it is indeed connected to my home Wi-Fi. (I think this is what you were asking).

Maybe I should back up a bit. The Tesla app tells me the status of all the panels together. What I am trying to do is get status of the individual strings (to determine if there is a problem since my array seems to be underperforming), and I thought the best way to do this was the pypowerwall python app which wants to connect to the Powerwall's WiFi. But I cannot "see" the Powerwall's SSID, although I can "see" the stand alone inverter's SSID (TEG-xxx) and the Gateway's SSID (TeslaPV_xxxxxx). Am I going about this the wrong way? Thanks again for your help!
My understanding is that the Powerwalls themselves do not have an SSID. The Inverter and the Gateway do
 
Good call!

I looked through the list of devices connected to my WiFi router, and the the stand alone inverter and gateway were there as I expected, but nothing with "LG" in the name. So I ran a pypowerwall scan and it found it! It actually has an unintelligible name, a series of numbers and letters that looks like a model and serial number, but it found it! Thanks so much! I am now getting a python error when I run pypowerwall, but hopefully I can figure it out quickly.
The most common errors you would get would be not finding the IP or bad credentials, did you turn debug on to see? If the scan comes back with the GW then it most likely would be credentials, make sure you use your correct email and password for the script. Sometimes there's a ARP cache problem and you would need to run the arp command to point to the device or assign static IP from your router.
 
The most common errors you would get would be not finding the IP or bad credentials, did you turn debug on to see? If the scan comes back with the GW then it most likely would be credentials, make sure you use your correct email and password for the script. Sometimes there's a ARP cache problem and you would need to run the arp command to point to the device or assign static IP from your route
The email and password it needs are what I use to log into my teslo.com account, correct? I have not turned on debug (will try this next). I'm getting the error below, any hints will be appreciated!

(base) H:\projects\Python_Practice\tesla_diagnostics>python tesla_diagnostics.py
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pypowerwall\__init__.py", line 109, in __init__
f = open(self.cachefile, "r")
FileNotFoundError: [Errno 2] No such file or directory: '.powerwall'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "H:\projects\Python_Practice\tesla_diagnostics\tesla_diagnostics.py", line 17, in <module>
pw = pypowerwall.Powerwall(host,password,email,timezone)
File "C:\ProgramData\Anaconda3\lib\site-packages\pypowerwall\__init__.py", line 114, in __init__
self._get_session()
File "C:\ProgramData\Anaconda3\lib\site-packages\pypowerwall\__init__.py", line 125, in _get_session
self.auth = {'AuthCookie': r.cookies['AuthCookie'], 'UserRecord': r.cookies['UserRecord']}
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\cookies.py", line 328, in __getitem__
return self._find_no_duplicates(name)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\cookies.py", line 399, in _find_no_duplicates
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name='AuthCookie', domain=None, path=None"

(base) H:\projects\Python_Practice\tesla_diagnostics>
 
Password should be your GW webUI password, not Tesla account. If you did not change the default password then it should be the 5 char default password for the GW.
Ok, you saved me once again! I used the last five characters of the GW webUI password, and it worked!

I'm now getting status from the Powerwall (Grid raw/Solar raw data). Looks like I have to format it and see what my array is actually doing.

Thank you!!!
 
  • Like
Reactions: jgleigh
Can’t load http://192.168.0.1:9000/

Did option 1:

Option 1 - Quick Start​

Run the interactive setup script that will ask you for your Powerwall details and Local Time Zone (options).

./setup.sh
Follow the Grafana Setup instructions provided (or see below) to complete the setup.
Then went to grafana setup…. Opened port 9000 in my firewall.
 
[eric@orion ~]$ su
Password:
[root@orion eric]# cd Powerwall-Dashboard/
[root@orion Powerwall-Dashboard]# ./compose-dash.sh up -d
Running Docker Compose...
Creating network "powerwalldashboard_default" with the default driver
ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-f64a8185fbb4 -j RETURN: iptables: No chain/target/match by that name.
(exit status 1))
[root@orion Powerwall-Dashboard]#
 
Now supports more then 10 powerwalls. Jason Cox helped me setup telegraf and influxdb queries.
Now I can monitor my tesla inverter and enphase separately. Enphase and tesla inverters have individual ct off the same neurio…

IMG_0910.png
 
  • Like
Reactions: jgleigh and yblaser