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

Gateway api

Ulmo

Active Member
Jan 19, 2016
4,329
4,906
Vienna Woods, Aptos, California
@Pale_Rider you can find out by querying your Powerwall directly via the API. If you're not familiar with the API or curl I'm happy to give you more pointers. Change <IP> to your Powerwall IP on your local network and <password> to your customer password. After the first query completes you'll get an authentication token in the reply (<token>), use that in the second request to get the solar system configuration. Note that these commands are set up for Windows, if you use Linux strip the \s off of the json blob in the first curl command post.

Code:
curl -s -i -X POST -H "Content-Type: application/json" -d "{\"username\":\"customer\",\"password\":\"<password>\",\"force_sm_off\":false}" https://<IP>/api/login/Basic
Response:
{"email":"","firstname":"Tesla","lastname":"Energy","roles":["Home_Owner"],"token":"<token>","provider":"Basic"}

Code:
curl -k --header "Authorization: Bearer <token>" https://<IP>/api/solars
Response:
[{"brand":"<brand>","model":"<model>","power_rating_watts":<power>,"server_count":0}]
What password? I don't have a password for my PowerWall Gateway.
 

gpez

Member
Apr 25, 2019
777
642
USA
There is a customer login and installer login, both with their own passwords. If you do not have it or forgot it the customer password can be reset fairly easily with physical access to the Gateway. Navigate to your local Powerwall IP in a web browser, instruct it to ignore the certificate error, and click the blue "LOGIN" in the middle. A log in box will appear, click the blue "CHANGE OR FORGOT PASSWORD" link, then the grey "Forgot Password?" link. You'll then see instructions as to how to toggle the Powerwall and use the serial number to reset the customer password.

Once you have done so you can use curl or a web browser to access the local API. It is a little out of date but there is more information is at vloschiavo/powerwall2.
 
  • Informative
Reactions: Ulmo

Products we're discussing on TMC...

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top