vloschiavo / powerwall2

Tesla Powerwall 2 - Local Gateway API documentation
Apache License 2.0
286 stars 50 forks source link

curl problems #72

Closed OmegaWolfProjects closed 1 year ago

OmegaWolfProjects commented 2 years ago

I had trouble with curl. I got things to work by doing the following:

(1) curl -s -k -c cookies.txt -X POST https://192.168.1.137/api/login/Basic -H "Content-Type: application/json" -d "{\"username\": \"customer\",\"email\": \"myemail@hotmail.com\",\"password\": \"mypassword\"}"

(2) curl -k -b cookies.txt https://192.168.1.137/api/meters/aggregates

OmegaWolfProjects commented 2 years ago

Nodejs code being used to grab the Tesla Powerwall2 API data via curl:

http://www.miniaturelinux.com/Tesla-Powerwall2-API.php