Proxy: REST-fallback for remote_steering_wheel_heat_level_request - #466
Open
a2105z wants to merge 1 commit into
Open
Proxy: REST-fallback for remote_steering_wheel_heat_level_request#466a2105z wants to merge 1 commit into
a2105z wants to merge 1 commit into
Conversation
remote_steering_wheel_heat_level_request is supported by Fleet API REST but has no signed VehicleAction in the current protos (only power_on). Without a case, the proxy treated it as invalid_command / no-op instead of forwarding. Fall back to REST for heat_level and the related auto steering-wheel heat command, matching other REST-only endpoints. Fixes teslamotors#136
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.
Description
Fixes #136.
Problem
remote_steering_wheel_heater_request(on/off) is implemented via signedHvacSteeringWheelHeaterAction.power_on, butremote_steering_wheel_heat_level_requestwas missing from the proxy switch.Observed behavior through the proxy: clients got a useless success / no vehicle action. The same request against Fleet API REST works:
Root cause: the current Vehicle Command Protocol protos only define:
There is no signed
VehicleActionfor steering-wheel heat level (state hasStwHeatLevel, but no setter action). So a true end-to-end signed implementation is blocked until Tesla publishes that action. Meanwhile the proxy should not pretend the command is unsupported/no-op — it should forward to Fleet API REST, same asnavigation_requestand other REST-only commands.Solution
remote_steering_wheel_heat_level_request→ErrCommandUseRESTAPIsotesla-http-proxyforwards the original request to Fleet API (preserving body{"level":...}).remote_auto_steering_wheel_heat_climate_request(also Fleet-documented, also missing a signed action).Once a heat-level
VehicleActionlands in the protos, we can replace the REST fallback with a real signed implementation.@sethterashima @patrickdemers6 @agbpatro — this has been open since Jan 2024 with reporter follow-ups. REST fallback unblocks users today without inventing an unsupported signed payload.
Type of change
Checklist:
Confirm you have completed the following steps:
Test plan
go test ./pkg/proxy/ -count=1ExtractCommandActionreturnsErrCommandUseRESTAPIfor heat_level / auto heat{"level":2}to Fleet API path and returns REST success bodycurl https://localhost:4443/.../remote_steering_wheel_heat_level_request -d '{"level":2}'updates the vehicle (same as direct Fleet API)