netzero-labs/netzero

Tesla Powerwall control

Closed this issue · 2 comments

lhovo commented

Is there a way to tell my powerwall to charge/discharge via the API?

Ideally it would be nice to also set the percentage ie if my powerwall is 5kwh asking for 50% discharge will start discharging at 2.5kwh.

zigam commented
  • To charge the PW, set the backup reserve to 100% (or your desired state of charge).
  • To discharge, you first need to set a time-of-use rate plan in the Tesla app (i.e. you need a peak period during which it can discharge). Then using the API, enable Time-Based Control mode, Export Everything, and a lower backup reserve if needed, and the PW should start discharging.
  • Use the GET API endpoint to check the state of charge and decide when to stop charging/discharging.

https://docs.netzero.energy/docs/tesla/Automation

lhovo commented

Thanks, that’s what I’m doing at the moment but it feels a bit janky.
Hopefully Tesla gives us a bit more API access in the future.