Skip to content

v0.10.0 - New Device Vitals

Compare
Choose a tag to compare
@jasonacox jasonacox released this 03 Jun 05:03
· 107 commits to main since this release
267d6c0

What's Changed

  • v0.10.0 - New Device Vitals by @jasonacox in #95
  • Add support for /tedapi API access on Gateway (requires connectivity to 192.168.91.1 GW and Gateway Password) with access to "config" and "status" data.
  • Adds drop-in replacement for depreciated /vitals API and payload using the new TEDAPI class. This allows easy access to Powerwall device vitals.
  • Proxy update to t58 to support TEDAPI with environmental variable PW_GW_PWD for Gateway Password. Also added FleetAPI, Cloud and TEDAPI specific GET calls, /fleetapi, /cloud, and /tedapi respectively.
# How to Activate the TEDAPI Mode
import pypowerwall

# You will need the Gateway/WiFi Password usually found on QR code on Gateway (not the customer password)
gw_pwd = "GW_PASSWORD" 

# Direct Connect to GW
host = "192.168.91.1" 
pw = pypowerwall.Powerwall(host,password,email,timezone,gw_pwd=gw_pwd)
print(pw.vitals())
# New TEDAPI Class
import pypowerwall.tedapi

tedapi = pypowerwall.tedapi.TEDAPI("GW_PASSWORD")

config = tedapi.get_config()
status = tedapi.get_status()

meterAggregates = status.get('control', {}).get('meterAggregates', [])
for meter in meterAggregates:
    location = meter.get('location', 'Unknown').title()
    realPowerW = int(meter.get('realPowerW', 0))
    print(f"   - {location}: {realPowerW}W")

Full Changelog: v0.9.1...v0.10.0