Skip to content

POST /api/operation #20

@swm11

Description

@swm11

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions