-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Powerwall 3 Support #387
Comments
Hi @jesaf00 - Congrats on getting the new Powerwall! Do you know if it is on your local network? If so, can you log in to your Powerwall web portal? Tesla has instructions (link) but I wonder if it works for your setup. The pypowerwall library uses the APIs on that web portal for Powerwall/2/+. Can you also provide the model number / picture of the Powerwall? |
I can send the specific model info from the side tomorrow. But here are some pics. Sent from my iPhoneOn Nov 18, 2023, at 7:57 PM, Jason Cox ***@***.***> wrote:
Hi @jesaf00 - Congrats on getting the new Powerwall!
Do you know if it is on your local network? If so, can you log in to your Powerwall web portal? Tesla has instructions (link) but I wonder if it works for your setup. The pypowerwall library uses the APIs on that web portal for Powerwall/2/+.
Can you also provide the model number / picture of the Powerwall?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Sorry, forgot to mention that yes it is on my local network. 2 of 3 are showing on my WiFi but only one switched to the correct network after I changed using the app. I am unable to log into the PW using the instructions for previous PWs. I get a 404 right away or after ignoring the self signed cert. Sent from my iPhoneOn Nov 18, 2023, at 8:59 PM, Jerry Schulze ***@***.***> wrote:I can send the specific model info from the side tomorrow. But here are some pics. <image0.jpeg><image1.jpeg><image2.jpeg>Sent from my iPhoneOn Nov 18, 2023, at 7:57 PM, Jason Cox ***@***.***> wrote:
Hi @jesaf00 - Congrats on getting the new Powerwall!
Do you know if it is on your local network? If so, can you log in to your Powerwall web portal? Tesla has instructions (link) but I wonder if it works for your setup. The pypowerwall library uses the APIs on that web portal for Powerwall/2/+.
Can you also provide the model number / picture of the Powerwall?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
The key will be figuring out how to log in to the web portal as that is essentially what pypowerwall is doing. You can try some of the URLs (replace the IP with the address of your Powerwall): https://10.1.2.3/summary?mode=kiosk |
Thanks @jesaf00 ! The new Powerwalls look nice. Thanks for the video. Just to confirm, you also tried the landing page https://192.168.200.51/ by itself? I'm worried. If you are able to connect to their local WiFi but still unable to get to any web portal, that could indicate that Tesla is removing the local access (and APIs) and switching to Cloud only control and monitoring similar to the solar-only configurations. The good news is that @mcbirse 's tesla-history code will likely be able to get that data, but the bad news is that it won't be at the same fidelity as local API provides and will be limited (local API for PW/2/+ can provide string, voltage, frequency, alert and temp data). Since you are likely one of the first to get these, the local access may still be under development. Also, since you are getting a 404, we know it does still have a webserver running. They may not have a customer page, but there could still be APIs. You might try this: https://192.168.200.51/api/login/Basic There definitely isn't much on the internet about PW3 other than "they are coming in 2024." I'll reach out to see if anyone else has discovered the APIs. If you still have the contact with the installer, can you ask if there is a local web portal (or APIs) that customers can access/use? Feel free to direct them to this dashboard project if they wonder why. :) |
Hi Jason, yes I tried just the IP and https://192.168.200.51/api/login/Basic also gives 404, arg! I am having a couple of issues with these also so hopefully I can just get the working correctly. I am running a port scanner to see what other ports might be open besides 443 and will let you know. |
Thanks for that link! Good idea on the port scanner. Again, the 404 does provide hope that there is an underlying API (a new one) that we just don't know yet. However, without a UI, it will be hard to determine what they are unless Tesla is willing to provide it to us. Perhaps the installer application makes calls to this and we could pick it up by traffic sniffing. |
@jesaf00 - Great suggestion from @vls29 at vloschiavo/powerwall2#99 (comment): If you can, try to run a verbose curl against the Powerwall 3. Even if it is a 404, there might be payload or header data that could be helpful. curl -v -k https://192.168.200.51 |
Here is the output Last login: Sun Nov 19 10:28:14 on ttys001
jerry@MBP14M3aceblack ~ % curl -v -k https://192.168.200.51
* Trying 192.168.200.51:443...
* Connected to 192.168.200.51 (192.168.200.51) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted h2
* Server certificate:
* subject: C=US; ST=California; L=Palo Alto; O=Tesla; OU=Tesla Energy Products; CN=d9528c5155a2621cf41a465e671195cc
* start date: Jul 14 12:33:48 2023 GMT
* expire date: Jul 7 12:33:45 2048 GMT
* issuer: C=US; ST=California; L=Palo Alto; O=Tesla; OU=Tesla Energy Products; CN=d9528c5155a2621cf41a465e671195cc CA
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* using HTTP/2
* h2 [:method: GET]
* h2 [:scheme: https]
* h2 [:authority: 192.168.200.51]
* h2 [:path: /]
* h2 [user-agent: curl/8.1.2]
* h2 [accept: */*]
* Using Stream ID: 1 (easy handle 0x12900e200)
> GET / HTTP/2
> Host: 192.168.200.51
> User-Agent: curl/8.1.2
> Accept: */*
>
< HTTP/2 404
< content-type: text/plain; charset=utf-8
< x-content-type-options: nosniff
< content-length: 19
< date: Sun, 19 Nov 2023 21:09:20 GMT
<
404 page not found
* Connection #0 to host 192.168.200.51 left intact
jerry@MBP14M3aceblack ~ % |
Thanks Jerry. Not much here, sadly. For completeness, it would be good to try some POSTs as well: # Powerwall 2 Login Endpoint
curl -v -k -s -i -X POST -H "Content-Type: application/json" -d '{"username":"[email protected]","password":"example","force_sm_off":false}' https://192.168.200.51/api/login/Basic
# Root Endpoint
curl -v -k -s -i -X POST -H "Content-Type: application/json" -d '{"username":"[email protected]","password":"example","force_sm_off":false}' https://192.168.200.51/ |
Not sure this gave anything different. Is the password my Tesla.com password?
|
Thanks again! Unfortunately, it didn't give us much more. Also, the user/password doesn't matter. If it was working it would have given us something like an access denied message instead of a 404. How did the installer configure the Powerwalls? Was it the Tesla Pro app? Are you able to connect to each Powerwall separately? In my Powerwall+ setup, the backup gateway is a separate box and has its own WiFi access point which is where the web portal works. I wonder if there are other access points. If so, it would be good to run the |
It looks like Powerwall 3 can be designed without a Backup Gateway 2, I'm guessing that's what OP has. Because the dashboard/portal exists on the gateway at the moment, I'm guessing there's no dashboard/portal when connecting directly to a Powerwall 3? |
This was the case for PW2 as well, with a backup switch (i.e. no gateway) one of the Powerwalls is designated a "site controller" and acts as the gateway, with the same web and API interface. However, the access seems to have changed with PW3. Based on reports here and from TMC forums:
|
This is great @zigam ! It is possible the Powerwall 3 has this same binary to be compatible with the Tesla Pros app. @jesaf00 could you try these # Log in to the TeslaPW_xxx wifi
# First just check to see if the API is responsive
curl -v -k https://192.168.91.1/tedapi/din
curl -v -k https://192.168.91.1/tedapi/v1
# Store the gateway password
export GW_PWD="<FULL_GATEWAY_PWD>"
# Get the device din, e.g. 1232100-10-E--CN321329G1E123.
curl -k -u Tesla_Energy_Device:$GW_PWD https://192.168.91.1/tedapi/din Next, if that works, download this and rename to request.bin - edit it to have your DIN. # Request the configuration (binary file - protobuf payload?)
curl -k -H 'Content-type: application/octet-string' -u Tesla_Energy_Device:$GW_PWD --data-binary @request.bin https://192.168.91.1/tedapi/v1 |
@jasonacox here's the output from my recently installed PW3's
|
@pbburkhalter you'll have to run these commands while on the |
Oops. I did just connect to that and got the same results. |
Those responses are actually expected because auth was not provided and the second one requires a POST. This is the one that will hopefully work:
|
Yes, that does work. |
Great! The next step would be an actual RPC call. Goes without saying that this is uncharted territory, so proceed at your own risk :) Download request.bin.txt, rename it to
If this works, you should get a response with the entire configuration of your system. 🤞 |
Doesn't work from a command line or PowerShell but I'm open to ideas. |
@pbburkhalter what's the error? I think the other way to investigate the protocol would be to install a debugging proxy on the phone and capture Tesla Pros traffic. This is a bit more involved, but if you want to spend the time (and a bit of money, the proxy app costs $9) I'd be happy to help. ziga.mahkovec AT gmail.com. |
Sorry I should have clarified I'm not using the Tesla pros app... I am just running it on my computer connected to the PowerWall wi-fi network |
@pbburkhalter right but these curl requests are replaying what the Tesla Pros app does. So if they don't work for you, you'd have to inspect the requests that the app generates so we can learn how to reproduce them. The error you got from curl would also be helpful. |
curl: (6) Could not resolve host: application |
@heynorm - That's great news! ❤️ Thanks for the encouragement! Would you be willing to share a screenshot of your dashboard that shows the strings? I took some guesses building the CQs and queries and would love to see how it is working. @rmotapar - To get the string data, you will need to use the local (and routed) 192.168.91.1 extended device metrics endpoint which is where the Can you share what you get by running the |
Yes, I am using the I did customize my dashboard a bit to make it work through reverse proxy so I may have messed up something. @heynorm thanks for reporting that string data is working for you. I will do a fresh install and will report back the results. @jasonacox |
@jasonacox Here are the results of the verify.sh script. It does say `Verify Powerwall-Dashboard 4.5.1 on Linux - Timezone: America/ChicagoThis script will attempt to verify all the services needed to run Checking pypowerwall
|
That is one option, but I have been hesitant to do that because it opens up this protected installer API of your Powerwall to your entire LAN traffic. Technically it shouldn't matter if everything on your network behaves well. But more important, my router won't allow static routes so I focused on host level routes. 😉 If someone who has a Unifi wants to write up the details in a Discussion thread or PR, I would gladly add that link to the setup instructions. 🙏 |
Yeah, totally makes sense to be cautious about opening up the protected installer API to entire LAN. I will see if I can create a PR. |
Yes, that is a bug - thanks to @SCHibbard who reported it here: #515 I did change the dashboard.json to add the additional PW3 strings (E & F) and to account for multiple PW3's. Are you still not getting string data? Can you check a few of these (you probably don't want to post them, just check to see if they contain the string data payloads): http://localhost:8675/tedapi/status - this is the raw API that the Tesla One app uses for live data |
Just updated from 4.3.2 to 4.5.1 yesterday, and tackled the network mods (running on Ubuntu). Like @jasonacox, a little hesitant to place the static route in my router, but don't like that lack of persistence of the setting over reboots. Putting the command in a cron task causes it to fire before the network is ready, so did a Q&D script to run in cron as an "@reboot". It will run for 15 seconds or until the response of the command says the routing already exists:
|
Jason,
Here is a snapshot of the string stuff in the dashboard for yesterday along with the output from http://localhost:8675/strings run just now:
[cid:10bb71ff-7d61-4d0a-8f8f-5a0d892599d9]
{
"A": {
"Connected": true,
"Current": 0.6999999999999997,
"Power": 225.39999999999992,
"State": "Pv_Active",
"Voltage": 322
},
"A1": {
"Connected": true,
"Current": 3.6999999999999997,
"Power": 1132.1999999999998,
"State": "Pv_Active",
"Voltage": 306
},
"B": {
"Connected": true,
"Current": 0.6999999999999997,
"Power": 263.1999999999999,
"State": "Pv_Active",
"Voltage": 376
},
"B1": {
"Connected": true,
"Current": 3.15,
"Power": 856.8,
"State": "Pv_Active",
"Voltage": 272
},
"C": {
"Connected": true,
"Current": 0.7499999999999997,
"Power": 224.9999999999999,
"State": "Pv_Active",
"Voltage": 300
},
"C1": {
"Connected": true,
"Current": 3.3,
"Power": 1069.2,
"State": "Pv_Active",
"Voltage": 324
},
"D": {
"Connected": true,
"Current": 0.04999999999999964,
"Power": 0.0,
"State": "Pv_Active",
"Voltage": 0
},
"D1": {
"Connected": true,
"Current": 0,
"Power": 0,
"State": "Pv_Active",
"Voltage": 0
},
"E": {
"Connected": true,
"Current": 0,
"Power": 0,
"State": "Pv_Active",
"Voltage": 0
},
"E1": {
"Connected": true,
"Current": 0,
"Power": 0,
"State": "Pv_Active",
"Voltage": 0
},
"F": {
"Connected": true,
"Current": 0,
"Power": 0,
"State": "Pv_Active_Parallel",
"Voltage": 0
},
"F1": {
"Connected": true,
"Current": 0,
"Power": 0,
"State": "Pv_Active_Parallel",
"Voltage": 0
}
}
Let me know if you need more details about my config.
…________________________________
From: Jason Cox ***@***.***>
Sent: Saturday, September 7, 2024 7:25 AM
To: jasonacox/Powerwall-Dashboard ***@***.***>
Cc: heynorm ***@***.***>; Mention ***@***.***>
Subject: Re: [jasonacox/Powerwall-Dashboard] Powerwall 3 Support (Issue #387)
@heynorm<https://github.com/heynorm> - That's great news! ❤️ Thanks for the encouragement! Would you be willing to share a screenshot of your dashboard that shows the strings? I took some guesses building the CQs and queries and would love to see how it is working.
@rmotapar<https://github.com/rmotapar> - To get the string data, you will need to use the local (and routed) 192.168.91.1 extended device metrics endpoint which is where the tedapi API lives.
Can you share what you get by running the verify.sh script or http://localhost:8675/help? If you see that you are running cloud mode, you will need to make some changes. Make sure you have the network routing set up (see here<https://github.com/jasonacox/Powerwall-Dashboard?tab=readme-ov-file#extended-device-vitals-metrics-beta>) so that you can ping 192.168.91.1 from the host that runs the Dashboard, and then rerun setup.sh as @heynorm<https://github.com/heynorm> mentions but select option 4 (Powerwall 3 using the local Tesla Gateway).
—
Reply to this email directly, view it on GitHub<#387 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APUXY3FHXVG7II6G6MCXJ73ZVMEFLAVCNFSM6AAAAAA7RJOQ36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZVGIZTKNBRHA>.
You are receiving this because you were mentioned.
|
Thanks @heynorm ! That looks great! It may be nice to disable the ghost strings automatically but from what you show in the graph, it seems they do get some phantom power occasionally. |
Thanks @SCHibbard - nice script! Thanks for sharing. MacOS and Windows have an easy way to set persistent routes, but Linux seems to have dozens of ways and they are all "non-trivial". I wonder if it would be helpful to have a setup-route.sh script (or part of setup.sh) that will detect OS and do the needful for you? Of course, it would be optional and those who want to set it up via their router could still do so. |
Yeah - I see that phantom power on the ghost strings in the Tesla One app as well. I wonder what that is all about.
…________________________________
From: Jason Cox ***@***.***>
Sent: Saturday, September 7, 2024 11:35 AM
To: jasonacox/Powerwall-Dashboard ***@***.***>
Cc: heynorm ***@***.***>; Mention ***@***.***>
Subject: Re: [jasonacox/Powerwall-Dashboard] Powerwall 3 Support (Issue #387)
Thanks @heynorm<https://github.com/heynorm> ! That looks great! It may be nice to disable the ghost strings automatically but from what you show in the graph, it seems they do get some phantom power occasionally.
—
Reply to this email directly, view it on GitHub<#387 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APUXY3CUOEP7ZG77UJRQJPDZVNBQHAVCNFSM6AAAAAA7RJOQ36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGQYDCMJQGE>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@jasonacox |
New PW3 strings support, additional Alerts & PW capacity data is amazing, thank you! |
@jasonacox Here's the error I am seeing in pypowerwall when
I am seeing the same error for |
@jasonacox It seems related to the second powerwall I have (the follower). I ran the PW3_String.py script and it gave me the same error. I do see the string data for the main powerwall but it errored out when fetching the string data for the follower
Created a PR on pypowerwall. Please take a look. With the change, I am seeing the right output. |
Can you share what you see with that? Sadly, we lost access to temps in the new Firmware vitals payload, but want to make sure it isn't some other logic bug. |
@rmotapar I hope that the new update fixes the string issue you identified: v4.5.2 ./update.sh |
Thank you @jasonacox It's working beautifully! Thank you so much for the quick turn around. Data just started showing up on the dashboard. Here's how it looks: |
Fantastic!! Thanks @rmotapar! |
Here's what I saw in the logs with pypowerwall:0.11.0
With the latest pypowerwall:0.11.1, I am not seeing any of these but |
Yes, the temps are likely gone forever. 😞 If anyone manages to spot temps on any of the API or the app, please let me know. 😉 The error you were seeing before was essentially the same one that impacted /strings (part of |
@jasonacox: thought about it being in setup.sh, but need sudo to add the task to cron - so yes, not so simple. Option would be a separate script for just this with instructions to run as Super User. You'd think an OS used on so many servers would have set this up as optionally persistent by now! |
Thought about the cron / sudo issue, and figure it's not a big deal if a script asks for su credentials during install. Created a script to build the crontask script and edit crontab. Will test it on my production system probably next weekend. @jasoncox: Would you like that as a separate script, should I try to build it into your setup.sh, or do you want to merge it into setup.sh? |
Awesome! And good question. I'm tending to favor keeping it as a separate script, similar to tz.sh and weather.sh. That would make it easier for users wanting to do a manual install, or for existing installs that are using temp routes to activate a persistent route. We could still have setup.sh call it if the user wishes. |
@jasonacox : attached the script I used to create the TDAPI network routing script and add its cron task. Played with it on my sandbox, and today got a chance to upgrade Powerwall Dashboard on my production system, so tried it there. Worked fine! Note changed extension from .sh to .txt so GitHub issues would accept it. |
Thank you all for running with this. I just finished my install of PW3 & solar; joining one of the Tesla Electric VPP here in Texas. I got the netzero hosted app to work fine, running it locally has been a pile though. Your efforts are awesome and I appreciate all your work. |
Thanks for the kind feedback @jukasdrj ! |
Problem
Powerwall 3 not compatible with Powerwall-Dashboard
Enhancement
I would like to help make it work if I can
Additional context
I have 3x Powerwall 3s just installed with a tesla backup switch and would like to be able to use this tool.
The text was updated successfully, but these errors were encountered: