Skip to content

feat: open and close a power tailgate (control_tailgate) - #62

Open
townsmcp wants to merge 1 commit into
SAIC-iSmart-API:developfrom
townsmcp:feat/power-tailgate-upstream
Open

townsmcp wants to merge 1 commit into
SAIC-iSmart-API:developfrom
townsmcp:feat/power-tailgate-upstream

Conversation

@townsmcp

@townsmcp townsmcp commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Adds control_tailgate(vin, action=TailgateAction.OPEN | TailgateAction.CLOSE) for cars with a power tailgate.

It sends what the iSmart app sends on my MG S6 EV (UK, Trophy), from decrypted app traffic captured with mitmproxy on 7 Nov 2026:

Action Request type Parameters Result on the car
Open 9 31 = 1 Accepted; tailgate opened; bootStatus then 1
Close 9 31 = 2 Accepted; tailgate closed; bootStatus then 0

The app sends no end-of-parameters marker (255) with it, so neither does this.

  • New: RvcReqType.TAILGATE = "9", RvcParamsId.TAILGATE = 31, and TailgateAction (OPEN = 1, CLOSE = 2) in locks.
  • open_tailgate is unchanged. It unlocks lock 2, which releases the latch; the app calls that "Unlock Tailgate". Its docstring now says so.
  • README: added to the supported functionality list.
  • Tests: tests/test_power_tailgate.py checks open and close send exactly the captured request, and that open_tailgate is unchanged.

Only the S6 EV has been checked. Cars without a power tailgate are expected to refuse it. I've had it running in mg-saic-ha since today (as an opt-in "Has Power Tailgate" option), with open and close both confirmed on the car.

control_tailgate(vin, action=TailgateAction.OPEN/CLOSE) sends what the
iSmart app sends on an MG S6 EV (decrypted app traffic, UK): request type 9
with a single parameter, 31 = 1 (open) or 2 (close), and no
end-of-parameters marker. On that car both were accepted, the tailgate
moved, and bootStatus then read 1 and 0. open_tailgate (unlock of lock 2,
"Unlock Tailgate" in the app) is unchanged.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant