Continuing discussion from:
jasonacox/Powerwall-Dashboard#651 (comment)
@jasonacox - I thought of another test. Can you post a curl command directly to the PW3 that captures/downloads lots of data at one time? I don't want to cause anything that looks line an attack, just something that causes a little "stress".
Not very easily. The TEDAPI protocol requires assembling a protobuf payload and POSTing that (details here).
I do not need the results, they will be sent to /dev/null or maybe a file. I just want to stress the powerwall a little.
I am following:
https://github.com/JonMurphy/pypowerwall/blob/main/tools/tedapi/README.md#the-tedapi-apis
I have the DIN from the curl -k -u "Tesla_Energy_Device:REDACTED" https://192.168.91.1/tedapi/din;echo
When I enter:
curl -v -k -H 'Content-type: application/octet-string' -u "Tesla_Energy_Device:GW_PWD" --data-binary @request.bin https://192.168.91.1/tedapi/v1
I see this but no results:
pi@teslastuff:~/Powerwall-Dashboard/testTEDAPI-APIs $ curl -v -k -H 'Content-type: application/octet-string' -u "Tesla_Energy_Device:REDACTED" --data-binary @request.bin https://192.168.91.1/tedapi/v1
* Trying 192.168.91.1:443...
* Connected to 192.168.91.1 (192.168.91.1) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN: server accepted h2
* Server certificate:
* subject: C=US; ST=California; L=Palo Alto; O=Tesla; OU=Tesla Energy Products; CN=REDACTED
* start date: Sep 12 02:53:13 2024 GMT
* expire date: Sep 6 02:53:13 2049 GMT
* issuer: C=US; ST=California; L=Palo Alto; O=Tesla; OU=Tesla Energy Products; CN= REDACTED CA
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* using HTTP/2
* Server auth using Basic with user 'Tesla_Energy_Device'
* h2h3 [:method: POST]
* h2h3 [:path: /tedapi/v1]
* h2h3 [:scheme: https]
* h2h3 [:authority: 192.168.91.1]
* h2h3 [authorization: Basic REDACTED]
* h2h3 [user-agent: curl/7.88.1]
* h2h3 [accept: */*]
* h2h3 [content-type: application/octet-string]
* h2h3 [content-length: 210]
* Using Stream ID: 1 (easy handle REDACTED)
> POST /tedapi/v1 HTTP/2
> Host: 192.168.91.1
> authorization: Basic REDACTED
> user-agent: curl/7.88.1
> accept: */*
> content-type: application/octet-string
> content-length: 210
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* We are completely uploaded and fine
< HTTP/2 400
< content-length: 0
< date: Wed, 23 Jul 2025 18:26:06 GMT
<
* Connection #0 to host 192.168.91.1 left intact
pi@teslastuff:~/Powerwall-Dashboard/testTEDAPI-APIs $
Since I see:
"HTTP/2 400" error, --->> "400 Bad Request" error
I am guessing I am not creating a proper @request.bin file. Is there an example?
I wanted to do two requests:
- One is for config which gets a payload that contains the configuration of the Powerwall.
- just to make sure I can communicate
- and one for query that gets current data (e.g. systemStatus, realPowerW, voltages, frequencies, etc.).
- just to make sure I get lots of 1s and 0s.
EDIT: here is my request.bin (I am using my DIN):
pi@teslastuff:~/Powerwall-Dashboard/testTEDAPI-APIs $ cat request.bin
message {
deliveryChannel: 1
sender {
local: 1
}
recipient {
din: "1232100-00-E--TG123456789012"
}
config {
send {
num: 1
file: "config.json"
}
}
}
tail {
value: 1
}
pi@teslastuff:~/Powerwall-Dashboard/testTEDAPI-APIs $
How do I encode this file?
Continuing discussion from:
jasonacox/Powerwall-Dashboard#651 (comment)
I do not need the results, they will be sent to
/dev/nullor maybe a file. I just want to stress the powerwall a little.I am following:
https://github.com/JonMurphy/pypowerwall/blob/main/tools/tedapi/README.md#the-tedapi-apis
I have the DIN from the
curl -k -u "Tesla_Energy_Device:REDACTED" https://192.168.91.1/tedapi/din;echoWhen I enter:
I see this but no results:
Since I see:
"HTTP/2 400" error, --->> "400 Bad Request" error
I am guessing I am not creating a proper
@request.bin file. Is there an example?I wanted to do two requests:
EDIT: here is my
request.bin(I am using my DIN):How do I encode this file?