Add signed Parallax lock/unlock commands

Đang mở
#228 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python

Hướng nghiên cứu

Start by reviewing the existing SendRemoteCommand flow, phone-key derivation from send_vehicle_command, and the state-subscription entry points _start_subscription and __graphql_query. Compare the proposed messages in app/parallax/commands/body-commands.md with existing .proto files such as operation.proto; confirm the public API shape with maintainers before implementation. Done means approved message definitions, signed lock/unlock commands, state-result handling, and tests for success and failure or signature errors.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I'd like to add the Parallax way of locking and unlocking to the client, and want to agree on the shape before opening a PR.

What the app does. Android app 3.17.0 sends lock/unlock as sendParallaxPayload (SendRemoteCommand) with a signed protobuf: an HMAC-SHA256 over a serialized operation (body.locks.unlock / body.locks.lock), keyed with the same phone-key secret send_vehicle_command already derives. It then follows a vehicleCommandStatePx subscription for the result. There is no separate WAKE_VEHICLE: the request itself wakes a sleeping vehicle. The vehicle needs PVS_BD_CMD in supportedFeatures.

Tested. On an R1T with an enrolled phone key: unlock on a sleeping vehicle (waking, executing, success in 26 s) and lock on an awake one. The message layouts are written up in kaedenbrinkman/rivian-api (app/parallax/commands/body-commands.md).

Why here. I have this working in the Home Assistant integration, but it has to reach into _start_subscription and __graphql_query. Public methods would remove that.

Proposal. .proto files for the envelope, operation and state messages (like operation.proto), an encoder and decoder in rivian.parallax, and on Rivian a method to send a signed body command and one to follow its state.

Questions

  1. One call that sends and waits for completion, or the two pieces (send, subscribe) with a small helper on top? I lean to the pieces.
  2. Fine to add the new .proto files and generated modules?
  3. #218 added keyless send_vehicle_operation. This is a different, signed mutation, so I don't think they overlap. Say so if you see it differently.
  4. Is anyone already working on this?

Not tested: a bad or missing signature, closure commands (frunk, windows), failure paths. I'll open the integration PR once there is a client release.

Ngôn ngữ chính
Python
Star
32
Fork
17
Merge trung bình
12 giờ 18 phút
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.