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 Powerwall 3 Local API Support #101

Merged
merged 3 commits into from
Jun 11, 2024
Merged

Add Powerwall 3 Local API Support #101

merged 3 commits into from
Jun 11, 2024

Conversation

jasonacox
Copy link
Owner

@jasonacox jasonacox commented Jun 10, 2024

v0.10.4 - Powerwall 3 Local API Support

  • Add local support for Powerwall 3 using TEDAPI.
  • TEDAPI will activate in hybrid (using TEDAPI for vitals and existing local APIs for other metrics) or full (all data from TEDAPI) mode to provide better Powerwall 3 support.
  • The full mode will automatically activate when the customer password is blank and gw_pwd is set.
  • Note: The full mode will provide less metrics than hybrid mode since Powerwall 2/+ systems have additional APIs that are used in hybrid mode to fetch additional data
import pypowerwall

# Activate HYBRID mode (for Powerwall / 2 / + systems)
pw = pypowerwall.Powerwall("192.168.91.1", password=PASSWORD, email=EMAIL, gw_pwd=PW_GW_PWD)

# Activate FULL mode (for all systems including Powerwall 3)
pw = pypowerwall.Powerwall("192.168.91.1", gw_pwd=PW_GW_PWD)

Related:

How to Test

This should work on Powerwall 2/+ and 3 systems. It requires that your host has access to the Gateway IP 192.168.91.1 and that you have the GW Password (usually found on QR sticker on Gateway).

Python Library

# First install the dev version
pip install pypowerwall==0.10.4.dev0

Simple Python test:

import pypowerwall

PW_GW_PWD="GWPASSWD"
pw = pypowerwall.Powerwall("192.168.91.1", gw_pwd=PW_GW_PWD)

pw.power()
pw.level()
pw.battery_blocks()

Proxy Test

You can also try the pypowerwall proxy:

docker run \
    -p 8675:8675 \
    -e PW_PORT='8675' \
    -e PW_HOST='192.168.91.1' \
    -e PW_GW_PWD="GWPASSWD" \
    --name pypowerwall \
    --restart unless-stopped \
   jasonacox/pypowerwall:0.10.4t61-beta

Try these URLs:

image

@jasonacox jasonacox merged commit f23a83d into main Jun 11, 2024
20 checks passed
@jasonacox jasonacox deleted the v0.10.4 branch June 11, 2024 05:43
@jasonacox
Copy link
Owner Author

Please report any problems here or open a new issue.

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 this pull request may close these issues.

None yet

1 participant