Skip to content

Commit e598bf3

Browse files
committed
feat(vehicle): add support for leapmotor
1 parent 6f9d2b2 commit e598bf3

4 files changed

Lines changed: 332 additions & 0 deletions

File tree

docs/devices/vehicles.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,45 @@ Manche Modelle (z.B. Niro EV) schalten bei geringen Ladeströmen (< 8A) intern a
504504
/>
505505
<!-- AUTO-GENERATED FROM TEMPLATE - PLEASE EDIT HERE https://github.com/evcc-io/evcc/tree/master/templates/definition/vehicle -->
506506
507+
## Leapmotor
508+
509+
Benötigt das App-Zertifikat aus der Leapmotor Android APK.
510+
Die Zertifikatsdateien (`app-cert.pem` und `app-key.pem`) können mit Tools wie `apktool` und `openssl` aus der APK extrahiert werden.
511+
Nutzer der leapmotor-ha Home Assistant Integration haben diese Dateien bereits.
512+
513+
<DeviceConfig
514+
code={`vehicles:
515+
- name: my_car
516+
type: leapmotor
517+
user: # Benutzerkonto, bspw. E-Mail Adresse
518+
password: # Passwort
519+
app_cert: /pfad/zu/app-cert.pem # App-Zertifikat (PEM), aus der Leapmotor Android APK extrahiert
520+
app_key: /pfad/zu/app-key.pem # App-Schlüssel (PEM), aus der Leapmotor Android APK extrahiert
521+
vin: LV... # Fahrzeugidentifikationsnummer, Nur erforderlich bei mehreren Fahrzeugen im Konto (optional)
522+
title: # Titel, Wird in der Benutzeroberfläche angezeigt (optional)
523+
capacity: 50 # Akkukapazität (kWh), optional`}
524+
advanced={`vehicles:
525+
- name: my_car
526+
type: leapmotor
527+
user: # Benutzerkonto, bspw. E-Mail Adresse
528+
password: # Passwort
529+
app_cert: /pfad/zu/app-cert.pem # App-Zertifikat (PEM), aus der Leapmotor Android APK extrahiert
530+
app_key: /pfad/zu/app-key.pem # App-Schlüssel (PEM), aus der Leapmotor Android APK extrahiert
531+
vin: LV... # Fahrzeugidentifikationsnummer, Nur erforderlich bei mehreren Fahrzeugen im Konto (optional)
532+
title: # Titel, Wird in der Benutzeroberfläche angezeigt (optional)
533+
capacity: 50 # Akkukapazität (kWh), optional
534+
icon: car # Icon, Wird in der Benutzeroberfläche angezeigt [car, bike, ...] (optional)
535+
phases: 3 # Maximale Phasenanzahl, Die maximale Anzahl der Phasen welche genutzt werden können (optional)
536+
mode: # Standardlademodus, Wird beim Anschließen eines Fahrzeugs verwendet. Möglich sind Off, Now, MinPV und PV, oder leer wenn keiner definiert werden soll (optional)
537+
minCurrent: 6 # Minimale Stromstärke (A), Definiert die minimale Stromstärke pro angeschlossener Phase die genutzt werden kann (optional)
538+
maxCurrent: 16 # Maximale Stromstärke (A), Definiert die maximale Stromstärke pro angeschlossener Phase die genutzt werden kann (optional)
539+
maxPower: 11000 # Ladeleistungs-Hinweis (W), Definiert die maximale Ladeleistung des Fahrzeugs (optional)
540+
identifiers: # Identifikation, Kann meist erst später eingetragen werden, siehe: https://docs.evcc.io/docs/features/vehicle (optional)
541+
priority: # Priorität, Priorität des Ladepunktes oder Fahrzeugs in Relation zu anderen Ladepunkten oder Fahrzeugen für die Zuweisung von PV-Energie (optional)
542+
cache: 15m # Cache, Zeitintervall für erneute Datenabfrage (optional)`}
543+
/>
544+
<!-- AUTO-GENERATED FROM TEMPLATE - PLEASE EDIT HERE https://github.com/evcc-io/evcc/tree/master/templates/definition/vehicle -->
545+
507546
## Lexus
508547
509548
Benötigt Lexus Link+ Connected Services Account.

i18n/en/docusaurus-plugin-content-docs/current/devices/vehicles.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,45 @@ Some models (e.g. Niro EV) switch internally to 2 phases at low charging current
504504
/>
505505
<!-- AUTO-GENERATED FROM TEMPLATE - PLEASE EDIT HERE https://github.com/evcc-io/evcc/tree/master/templates/definition/vehicle -->
506506
507+
## Leapmotor
508+
509+
Requires the app certificate extracted from the Leapmotor Android APK.
510+
The certificate files (`app-cert.pem` and `app-key.pem`) can be extracted from the APK using tools like `apktool` and `openssl`.
511+
Users of the leapmotor-ha Home Assistant integration already have these files.
512+
513+
<DeviceConfig
514+
code={`vehicles:
515+
- name: my_car
516+
type: leapmotor
517+
user: # Username, e.g. email address
518+
password: # Password
519+
app_cert: /path/to/app-cert.pem # App certificate (PEM), extracted from the Leapmotor Android APK
520+
app_key: /path/to/app-key.pem # App private key (PEM), extracted from the Leapmotor Android APK
521+
vin: LV... # Vehicle Identification Number, required only if multiple vehicles are on the account (optional)
522+
title: # Title, Will be displayed in the user interface (optional)
523+
capacity: 50 # Battery capacity (kWh), optional`}
524+
advanced={`vehicles:
525+
- name: my_car
526+
type: leapmotor
527+
user: # Username, e.g. email address
528+
password: # Password
529+
app_cert: /path/to/app-cert.pem # App certificate (PEM), extracted from the Leapmotor Android APK
530+
app_key: /path/to/app-key.pem # App private key (PEM), extracted from the Leapmotor Android APK
531+
vin: LV... # Vehicle Identification Number, required only if multiple vehicles are on the account (optional)
532+
title: # Title, Will be displayed in the user interface (optional)
533+
capacity: 50 # Battery capacity (kWh), optional
534+
icon: car # Icon, Will be displayed in the user interface [car, bike, ...] (optional)
535+
phases: 3 # Maximum number of phases, The maximum number of phases which can be used (optional)
536+
mode: # Default charging mode, Used when a vehicle is connected. Possible values are Off, Now, MinPV and PV, or empty if none should be set (optional)
537+
minCurrent: 6 # Minimum amperage (A), The minimum amperage per connected phase that can be used (optional)
538+
maxCurrent: 16 # Maximum amperage (A), The maximum amperage per connected phase that can be used (optional)
539+
maxPower: 11000 # Maximum charging power hint (W), Defines the maximum charging power of the vehicle (optional)
540+
identifiers: # Identification, Mostly this can be added later, see: https://docs.evcc.io/en/docs/features/vehicle (optional)
541+
priority: # Priority, Priority of the loadpoint or vehicle in relation to other loadpoints or vehicles for allocating pv energy (optional)
542+
cache: 15m # Cache, Time interval for data refresh (optional)`}
543+
/>
544+
<!-- AUTO-GENERATED FROM TEMPLATE - PLEASE EDIT HERE https://github.com/evcc-io/evcc/tree/master/templates/definition/vehicle -->
545+
507546
## Lexus
508547
509548
Requires Lexus Link+ Connected Services Account.
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
template: leapmotor
2+
product:
3+
identifier: leapmotor
4+
brand: Leapmotor
5+
render:
6+
- default: |
7+
type: leapmotor
8+
user: # Benutzerkonto, bspw. E-Mail Adresse
9+
password: # Passwort
10+
app_cert: /pfad/zu/app-cert.pem # App-Zertifikat (PEM), aus der Leapmotor Android APK extrahiert
11+
app_key: /pfad/zu/app-key.pem # App-Schlüssel (PEM), aus der Leapmotor Android APK extrahiert
12+
vin: LV... # Fahrzeugidentifikationsnummer, Nur erforderlich bei mehreren Fahrzeugen im Konto (optional)
13+
title: # Titel, Wird in der Benutzeroberfläche angezeigt (optional)
14+
capacity: 50 # Akkukapazität (kWh), optional
15+
advanced: |
16+
type: leapmotor
17+
user: # Benutzerkonto, bspw. E-Mail Adresse
18+
password: # Passwort
19+
app_cert: /pfad/zu/app-cert.pem # App-Zertifikat (PEM), aus der Leapmotor Android APK extrahiert
20+
app_key: /pfad/zu/app-key.pem # App-Schlüssel (PEM), aus der Leapmotor Android APK extrahiert
21+
vin: LV... # Fahrzeugidentifikationsnummer, Nur erforderlich bei mehreren Fahrzeugen im Konto (optional)
22+
title: # Titel, Wird in der Benutzeroberfläche angezeigt (optional)
23+
capacity: 50 # Akkukapazität (kWh), optional
24+
icon: car # Icon, Wird in der Benutzeroberfläche angezeigt [car, bike, bus, moped, motorcycle, rocket, scooter, taxi, tractor, rickshaw, shuttle, van, airpurifier, battery, bulb, climate, coffeemaker, compute, cooking, cooler, desktop, device, dishwasher, dryer, floorlamp, generic, heater, heatexchange, heatpump, kettle, laundry, laundry2, machine, meter, microwave, pump, smartconsumer, tool, waterheater] (optional)
25+
phases: 3 # Maximale Phasenanzahl, Die maximale Anzahl der Phasen welche genutzt werden können (optional)
26+
mode: # Standardlademodus, Wird beim Anschließen eines Fahrzeugs verwendet. Möglich sind Off, Now, MinPV und PV, oder leer wenn keiner definiert werden soll (optional)
27+
minCurrent: 6 # Minimale Stromstärke (A), Definiert die minimale Stromstärke pro angeschlossener Phase die genutzt werden kann (optional)
28+
maxCurrent: 16 # Maximale Stromstärke (A), Definiert die maximale Stromstärke pro angeschlossener Phase die genutzt werden kann (optional)
29+
maxPower: 11000 # Ladeleistungs-Hinweis (W), Definiert die maximale Ladeleistung des Fahrzeugs (optional)
30+
identifiers: # Identifikation, Kann meist erst später eingetragen werden, siehe: https://docs.evcc.io/docs/features/vehicle (optional)
31+
priority: # Priorität, Priorität des Ladepunktes oder Fahrzeugs in Relation zu anderen Ladepunkten oder Fahrzeugen für die Zuweisung von PV-Energie (optional)
32+
cache: 15m # Cache, Zeitintervall für erneute Datenabfrage (optional)
33+
params:
34+
- name: user
35+
description: Benutzerkonto
36+
help: bspw. E-Mail Adresse
37+
advanced: false
38+
optional: false
39+
- name: password
40+
description: Passwort
41+
advanced: false
42+
optional: false
43+
- name: app_cert
44+
example: /pfad/zu/app-cert.pem
45+
description: App-Zertifikat (PEM)
46+
help: aus der Leapmotor Android APK extrahiert
47+
advanced: false
48+
optional: false
49+
- name: app_key
50+
example: /pfad/zu/app-key.pem
51+
description: App-Schlüssel (PEM)
52+
help: aus der Leapmotor Android APK extrahiert
53+
advanced: false
54+
optional: false
55+
- name: vin
56+
example: LV...
57+
description: Fahrzeugidentifikationsnummer
58+
help: Nur erforderlich bei mehreren Fahrzeugen im Konto
59+
advanced: false
60+
optional: true
61+
- name: title
62+
description: Titel
63+
help: Wird in der Benutzeroberfläche angezeigt
64+
advanced: false
65+
optional: true
66+
- name: capacity
67+
example: 50
68+
unit: kWh
69+
description: Akkukapazität
70+
advanced: false
71+
optional: true
72+
- name: icon
73+
default: car
74+
choice: ['car', 'bike', 'bus', 'moped', 'motorcycle', 'rocket', 'scooter', 'taxi', 'tractor', 'rickshaw', 'shuttle', 'van', 'airpurifier', 'battery', 'bulb', 'climate', 'coffeemaker', 'compute', 'cooking', 'cooler', 'desktop', 'device', 'dishwasher', 'dryer', 'floorlamp', 'generic', 'heater', 'heatexchange', 'heatpump', 'kettle', 'laundry', 'laundry2', 'machine', 'meter', 'microwave', 'pump', 'smartconsumer', 'tool', 'waterheater']
75+
description: Icon
76+
help: Wird in der Benutzeroberfläche angezeigt
77+
advanced: true
78+
optional: true
79+
- name: phases
80+
example: 3
81+
description: Maximale Phasenanzahl
82+
help: Die maximale Anzahl der Phasen welche genutzt werden können
83+
advanced: true
84+
optional: true
85+
- name: mode
86+
description: Standardlademodus
87+
help: Wird beim Anschließen eines Fahrzeugs verwendet. Möglich sind Off, Now, MinPV und PV, oder leer wenn keiner definiert werden soll
88+
advanced: true
89+
optional: true
90+
- name: minCurrent
91+
example: 6
92+
unit: A
93+
description: Minimale Stromstärke
94+
help: Definiert die minimale Stromstärke pro angeschlossener Phase die genutzt werden kann
95+
advanced: true
96+
optional: true
97+
- name: maxCurrent
98+
example: 16
99+
unit: A
100+
description: Maximale Stromstärke
101+
help: Definiert die maximale Stromstärke pro angeschlossener Phase die genutzt werden kann
102+
advanced: true
103+
optional: true
104+
- name: maxPower
105+
example: 11000
106+
unit: W
107+
description: Ladeleistungs-Hinweis
108+
help: Definiert die maximale Ladeleistung des Fahrzeugs
109+
advanced: true
110+
optional: true
111+
- name: identifiers
112+
description: Identifikation
113+
help: 'Kann meist erst später eingetragen werden, siehe: https://docs.evcc.io/docs/features/vehicle'
114+
advanced: true
115+
optional: true
116+
- name: priority
117+
description: Priorität
118+
help: Priorität des Ladepunktes oder Fahrzeugs in Relation zu anderen Ladepunkten oder Fahrzeugen für die Zuweisung von PV-Energie
119+
advanced: true
120+
optional: true
121+
- name: cache
122+
example: 5m
123+
default: 15m
124+
description: Cache
125+
help: Zeitintervall für erneute Datenabfrage
126+
advanced: true
127+
optional: true
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
template: leapmotor
2+
product:
3+
identifier: leapmotor
4+
brand: Leapmotor
5+
render:
6+
- default: |
7+
type: leapmotor
8+
user: # Username, e.g. email address
9+
password: # Password
10+
app_cert: /path/to/app-cert.pem # App certificate (PEM), extracted from the Leapmotor Android APK
11+
app_key: /path/to/app-key.pem # App private key (PEM), extracted from the Leapmotor Android APK
12+
vin: LV... # Vehicle Identification Number, required only if multiple vehicles are on the account (optional)
13+
title: # Title, Will be displayed in the user interface (optional)
14+
capacity: 50 # Battery capacity (kWh), optional
15+
advanced: |
16+
type: leapmotor
17+
user: # Username, e.g. email address
18+
password: # Password
19+
app_cert: /path/to/app-cert.pem # App certificate (PEM), extracted from the Leapmotor Android APK
20+
app_key: /path/to/app-key.pem # App private key (PEM), extracted from the Leapmotor Android APK
21+
vin: LV... # Vehicle Identification Number, required only if multiple vehicles are on the account (optional)
22+
title: # Title, Will be displayed in the user interface (optional)
23+
capacity: 50 # Battery capacity (kWh), optional
24+
icon: car # Icon, Will be displayed in the user interface [car, bike, bus, moped, motorcycle, rocket, scooter, taxi, tractor, rickshaw, shuttle, van, airpurifier, battery, bulb, climate, coffeemaker, compute, cooking, cooler, desktop, device, dishwasher, dryer, floorlamp, generic, heater, heatexchange, heatpump, kettle, laundry, laundry2, machine, meter, microwave, pump, smartconsumer, tool, waterheater] (optional)
25+
phases: 3 # Maximum number of phases, The maximum number of phases which can be used (optional)
26+
mode: # Default charging mode, Used when a vehicle is connected. Possible values are Off, Now, MinPV and PV, or empty if none should be set (optional)
27+
minCurrent: 6 # Minimum amperage (A), The minimum amperage per connected phase that can be used (optional)
28+
maxCurrent: 16 # Maximum amperage (A), The maximum amperage per connected phase that can be used (optional)
29+
maxPower: 11000 # Maximum charging power hint (W), Defines the maximum charging power of the vehicle (optional)
30+
identifiers: # Identification, Mostly this can be added later, see: https://docs.evcc.io/en/docs/features/vehicle (optional)
31+
priority: # Priority, Priority of the loadpoint or vehicle in relation to other loadpoints or vehicles for allocating pv energy (optional)
32+
cache: 15m # Cache, Time interval for data refresh (optional)
33+
params:
34+
- name: user
35+
description: Username
36+
help: e.g. email address
37+
advanced: false
38+
optional: false
39+
- name: password
40+
description: Password
41+
advanced: false
42+
optional: false
43+
- name: app_cert
44+
example: /path/to/app-cert.pem
45+
description: App certificate (PEM)
46+
help: extracted from the Leapmotor Android APK
47+
advanced: false
48+
optional: false
49+
- name: app_key
50+
example: /path/to/app-key.pem
51+
description: App private key (PEM)
52+
help: extracted from the Leapmotor Android APK
53+
advanced: false
54+
optional: false
55+
- name: vin
56+
example: LV...
57+
description: Vehicle Identification Number
58+
help: required only if multiple vehicles are on the account
59+
advanced: false
60+
optional: true
61+
- name: title
62+
description: Title
63+
help: Will be displayed in the user interface
64+
advanced: false
65+
optional: true
66+
- name: capacity
67+
example: 50
68+
unit: kWh
69+
description: Battery capacity
70+
advanced: false
71+
optional: true
72+
- name: icon
73+
default: car
74+
choice: ['car', 'bike', 'bus', 'moped', 'motorcycle', 'rocket', 'scooter', 'taxi', 'tractor', 'rickshaw', 'shuttle', 'van', 'airpurifier', 'battery', 'bulb', 'climate', 'coffeemaker', 'compute', 'cooking', 'cooler', 'desktop', 'device', 'dishwasher', 'dryer', 'floorlamp', 'generic', 'heater', 'heatexchange', 'heatpump', 'kettle', 'laundry', 'laundry2', 'machine', 'meter', 'microwave', 'pump', 'smartconsumer', 'tool', 'waterheater']
75+
description: Icon
76+
help: Will be displayed in the user interface
77+
advanced: true
78+
optional: true
79+
- name: phases
80+
example: 3
81+
description: Maximum number of phases
82+
help: The maximum number of phases which can be used
83+
advanced: true
84+
optional: true
85+
- name: mode
86+
description: Default charging mode
87+
help: Used when a vehicle is connected. Possible values are Off, Now, MinPV and PV, or empty if none should be set
88+
advanced: true
89+
optional: true
90+
- name: minCurrent
91+
example: 6
92+
unit: A
93+
description: Minimum amperage
94+
help: The minimum amperage per connected phase that can be used
95+
advanced: true
96+
optional: true
97+
- name: maxCurrent
98+
example: 16
99+
unit: A
100+
description: Maximum amperage
101+
help: The maximum amperage per connected phase that can be used
102+
advanced: true
103+
optional: true
104+
- name: maxPower
105+
example: 11000
106+
unit: W
107+
description: Maximum charging power hint
108+
help: Defines the maximum charging power of the vehicle
109+
advanced: true
110+
optional: true
111+
- name: identifiers
112+
description: Identification
113+
help: 'Mostly this can be added later, see: https://docs.evcc.io/en/docs/features/vehicle'
114+
advanced: true
115+
optional: true
116+
- name: priority
117+
description: Priority
118+
help: Priority of the loadpoint or vehicle in relation to other loadpoints or vehicles for allocating pv energy
119+
advanced: true
120+
optional: true
121+
- name: cache
122+
example: 5m
123+
default: 15m
124+
description: Cache
125+
help: Time interval for data refresh
126+
advanced: true
127+
optional: true

0 commit comments

Comments
 (0)