fix(transport): auto-derive v1r login password from full gateway password - #7
Merged
Conversation
…sword The gateway's local /api/login/Basic only accepts the last 5 characters of the gateway/WiFi password, an undocumented Tesla convention (also auto-derived by pypowerwall's v1r path) discovered live against real hardware: the full saved password 401s, the last-5 truncation succeeds. PowerwallClient(gateway_password=...) still takes the full password; V1rTransport now derives the 5-char value internally instead of silently 401ing on every caller who doesn't already know the trick out-of-band.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
/api/login/Basiconly accepts the last 5 characters of the gateway/WiFi password, not the full value.jasonacox/pypowerwall's v1r path auto-derives it the same way, rather than documenting it as a caller burden.aiopowerwallpreviously tookgateway_passwordand passed it straight through unverbatim, so every caller had to already know the last-5 trick out-of-band or get a bare 401 with no hint why.V1rTransportnow derives the 5-char customer password internally (_customer_password, truncates to the last 5 characters).PowerwallClient(gateway_password=...)keeps taking the full gateway/WiFi password - the value callers already have and the value the constructor docstring and README document.V1rTransport.login()sends the derived 5-char value over the wire, given a full password input. No live-hardware test added (per the brief, the live proof already exists).