Closed OmegaWolfProjects closed 1 year 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
Nodejs code being used to grab the Tesla Powerwall2 API data via curl:
http://www.miniaturelinux.com/Tesla-Powerwall2-API.php
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