v0.15.11 - HTTP/2 for Tesla Owner API Calls
Tesla now requires HTTP/2 for both auth.tesla.com/oauth2/v3/token and owner-api.teslamotors.com/api/1/* endpoints. Without HTTP/2, token refresh, token exchange, and all Owner API calls return 403, breaking cloud mode entirely.
Changes
pypowerwall/cloud/teslapy/__init__.py: Overridefetch_token(),refresh_token(), andrequest()to usehttpxwith HTTP/2, falling back torequestsifhttpxis unavailablepypowerwall/tesla_auth.py: Usehttpxwith HTTP/2 for_refresh_access_token()and_exchange_code(), falling back torequests- TLS 1.3 pinning:
_httpx_auth_verify()creates anssl.SSLContextpinned to TLS 1.3 (mirroring TeslaMate #5406), applied to all httpx Tesla endpoints - Session header forwarding: httpx calls now forward full session headers (
Content-Type,X-Tesla-User-Agent, etc.) to match the original requests fingerprint - Proxy support: All httpx call sites forward
self.proxiesandself.trust_envfrom the session _HTTP2Responsewrapper: Makeshttpx.Responsecompatible with existingrequests.Responsecode pathsrequirements.txt:httpx[http2]>=0.27.0— the[http2]extra ensuresh2is installed
Fixes
- Fixes 403 errors during
setupflow (sitelist retrieval) — Powerwall-Dashboard #779 - Fixes 403 errors during normal cloud-mode polling (PRODUCT_LIST, SITE_DATA, etc.)
- Docker workaround from #317 should no longer be needed — TLS pinning is now handled at the code level
Full changelog: v0.15.10...v0.15.11