Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command to allow/disallow charging from the grid and exporting energy to the grid. #108

Closed
jasonacox opened this issue Aug 25, 2024 · 1 comment · Fixed by #109
Closed

Comments

@jasonacox
Copy link
Owner

Add a command line (see CLI options) to pypowerwall to allow user to set grid charging and exporting.

Using FleetAPI: https://developer.tesla.com/docs/fleet-api/endpoints/energy#grid-import-export

API: POST /api/1/energy_sites/{energy_site_id}/grid_import_export

  • energy_site_id - ID field of an energy site from /api/1/products endpoint.
  • customer_preferred_export_rule - The desired behavior for grid exporting. The available options are battery_ok, pv_only, and never.
  • disallow_charge_from_grid_with_solar_installed - The desired behavior towards importing from the grid. Charging from the grid is disabled when set to true and enabled when set to false.

Proposed addition to CLI:

python3 -m pypowerwall set -gridcharging VALUE
# where VALUE is true or false

python3 -m pypowerwall set -export VALUE
# where VALUE is battery_ok, pv_only, or never
@jasonacox
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant