Closed KevM closed 5 months ago
Excellent point, @KevM ! I'll add it to my TODO list to move to POST.
Staged update in #86 to add POST method. Available via beta proxy container:
jasonacox/pypowerwall:0.8.4t54-beta5
# Set Reserve to 20
curl -X POST -d "value=20&token=1234" http://localhost:8675/control/reserve
# Set Mode to self_consumption
curl -X POST -d "value=self_consumption&token=1234" http://localhost:8675/control/mode
# Read values by omitting value
curl -X POST -d "token=1234" http://localhost:8675/control/reserve
curl -X POST -d "token=1234" http://localhost:8675/control/mode
I noticed that you added a control surface for the battery reserve. I am very excited about this for my needs. Thank you all for working on this. 💯
I was curious why you made the request a GET and not a POST? Maybe this has already been debated. My history with creating web APIs points to avoiding using GETs in front of anything that changes the state of the world.
Feel free to close this if I am being too pedantic.
Thanks again.