It would be really useful if I could locally instruct my powerwall to change operating mode, e.g. to force the battery to charge by changing the backup_reserve_percent.
I've tried adding the following to powerwall.py (should use enumeration for opmode in the final version):
def set_operation_mode(self, opmode: str, pc: int):
return self._api.post_operation_mode({"mode": opmode, "backup_reserve_percent": str(pc)})
and to api.py:
def post_operation_mode(self, body: dict) -> dict:
return self.post("operation", body, needs_authentication=True)
But I get the response:
tesla_powerwall.error.AccessDeniedError: Access denied for resource /api/operation: Unable to POST to resource
Though it appears that vloschiavo has gotten this to work:
https://github.com/vloschiavo/powerwall2/blob/master/README.md#apioperation
Any ideal how to fix this?
It would be really useful if I could locally instruct my powerwall to change operating mode, e.g. to force the battery to charge by changing the backup_reserve_percent.
I've tried adding the following to powerwall.py (should use enumeration for opmode in the final version):
def set_operation_mode(self, opmode: str, pc: int):
return self._api.post_operation_mode({"mode": opmode, "backup_reserve_percent": str(pc)})
and to api.py:
def post_operation_mode(self, body: dict) -> dict:
return self.post("operation", body, needs_authentication=True)
But I get the response:
tesla_powerwall.error.AccessDeniedError: Access denied for resource /api/operation: Unable to POST to resource
Though it appears that vloschiavo has gotten this to work:
https://github.com/vloschiavo/powerwall2/blob/master/README.md#apioperation
Any ideal how to fix this?