Skip to content

feat(vehicle): add support for LeapMotor API#29666

Draft
syphernl wants to merge 3 commits intoevcc-io:masterfrom
syphernl:feat/leapmotor_api_integration
Draft

feat(vehicle): add support for LeapMotor API#29666
syphernl wants to merge 3 commits intoevcc-io:masterfrom
syphernl:feat/leapmotor_api_integration

Conversation

@syphernl
Copy link
Copy Markdown
Contributor

@syphernl syphernl commented May 5, 2026

Summary

Adds support for the LeapMotor API (used by the official mobile app).

There is currently no public API, but the community has reverse-engineered the API used by the app:

This integration enables EVCC to retrieve key vehicle data such as SoC and cable connection status.

Certificate requirements

The API requires app-level mTLS client certificate material (app_cert.pem and app_key.pem).

These files are not provided and are not automatically retrieved.

Publishing or distributing such credentials would expose reusable authentication material.
Users must supply their own legitimate certificate material.

There is currently no official or user-friendly way to obtain these certificates.

Community resources may discuss possible approaches or compatible material, but users are responsible for reviewing and deciding whether such methods are appropriate for their setup.

Security / scope notes

  • This PR contains integration code only (no APKs, extracted assets, or credentials)
  • No secrets, tokens, certificates, or traffic captures are included
  • Intended for use with the user’s own account and vehicle

Caveats

  • Relies on an unofficial, reverse-engineered API
  • May break if Leapmotor changes the API or authentication flow
  • Requires external certificate material not covered here

Status

This PR is currently untested with a real vehicle, as I have not yet received mine. Leaving this as a draft until it can be validated in practice. Hopefully someone in the community is able to do so.

Todo

  • Review and simplify the implementation where possible
  • Test with real vehicles (e.g. T03, B10, C10)

Docs

Docs are being worked on in evcc-io/docs#1049

Help wanted

If you own a Leapmotor and can test this integration, feedback would be very helpful.

References

syphernl added 2 commits May 5, 2026 15:30
- Remove EnsureAuth (dead code, had TOCTOU race)
- Make addAuthHeaders void (return value was always ignored)
- Drop Python-style inline comments in deriveP12Password
- Collapse SM4 section divider to single comment line
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