Fatih'sMG4 — ABRP telemetry for an MG4 EH32 on SWI69

A fork of malys/EVABRPUploader (itself a fork of Leon Kernan's ABRP_Uploader)
carrying the changes that make it work on this car. History starts here: the
tree is what matters, and the upstream projects are where the earlier work
belongs.

EVHardware is vendored rather than tracked as a submodule, so one clone
builds.

Telemetry. SOC, battery power and range read as unavailable on SWI69 because
the vendor fallbacks were gated to SWI68 alone, while the property ids they
use are the ones this car publishes — the gates now admit SWI69. Tyre
pressure, the odometer and charge status come from the vendor block too,
since the generic properties for all three are declared here and never
publish. Tyre pressure is confirmed on the vehicle; the other two are not
yet.

Vehicle page. Every signal the car answers, in a table. One that it does not
publish shows a dash: an unimplemented VHAL property returns zero, and
"0 °C" would read as a measurement.

Wi-Fi page. Joins a network the unit already has saved, so a phone hotspot
does not need a trip into Settings on every drive. Tried on the upload tick
and from a button, skipped while already associated. This leans on the unit
being API 28 and the build being platform-signed — getConfiguredNetworks and
enableNetwork are closed to ordinary apps from API 29 — and fails quietly
where that does not hold.

The OTA updater points at this repository. An APK from upstream is signed
with a different key, which Android will not install over a platform-signed
build.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
TCFDONMEZ
2026-09-22 10:45:00 +03:00
co-authored by Claude
commit 2fd7b2dde1
245 changed files with 35594 additions and 0 deletions
+242
View File
@@ -0,0 +1,242 @@
<!-- GENERATED by CatalogueDocTest; do not edit by hand. -->
# The EVTasker catalogue
Every condition a rule can test and every action it can run, straight out of `ConditionType` and `ActionType`. *Firmware* is what the entry is annotated for; "any" means it depends on no vehicle firmware at all, not that it needs nothing — a notification still needs the permission, a call still needs a paired phone. The car's own Diagnostic screen stays the only answer for the car in front of you.
## Conditions
### Context
| Condition | Entry | Tested against | Firmware |
|---|---|---|---|
| Bluetooth phone connected | `BT_DEVICE_CONNECTED` | a paired phone | any |
| Any Bluetooth device connected | `ANY_BT_CONNECTED` | on / off | any |
| Phone on board (Bluetooth) | `BT_DEVICE_ONBOARD` | a paired phone | any |
| Bluetooth hands-free phone | `BT_DEVICE_HANDSFREE` | a paired phone | any |
| Time of day | `TIME_OF_DAY` | a start and an end time | any |
| Day of week | `DAY_OF_WEEK` | weekdays | any |
| Exact date | `DATE` | a calendar date | any |
| Firmware generation | `FIRMWARE_GEN` | a list the app fills in | any |
| Near a place | `LOCATION_WITHIN` | a point and a radius (m) | any |
| Physical buttons | `PHYSICAL_BUTTON` | a button, short or long press | any |
| Wi-Fi network | `WIFI_SSID` | free text | any |
| Call in progress | `IN_CALL` | on / off | any |
| Drive duration | `DRIVE_DURATION` | 0…600 min (=, <, >) | any |
| Random chance | `RANDOM_CHANCE` | 1…100 % | any |
| Doors locked | `DOORS_LOCKED` | on / off | SWI68, SWI165 |
| Front door open | `FRONT_DOOR_OPEN` | on / off | SWI133 |
| Data used today | `DATA_USED_TODAY` | 0…100000 MB (=, <, >) | any |
| Data used this month | `DATA_USED_MONTH` | 0…100000 MB (=, <, >) | any |
### Environment
| Condition | Entry | Tested against | Firmware |
|---|---|---|---|
| Outside temperature | `OUTSIDE_TEMP` | -30…50 °C (=, <, >) | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Weather | `WEATHER_NOW` | Clear, Cloudy, Rain, Snow, Thunderstorm, Fog, Wind | any |
### Driving
| Condition | Entry | Tested against | Firmware |
|---|---|---|---|
| Ignition state | `IGNITION_STATE` | Locked, Off, Accessory, Running, Starting | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Gear in P | `IN_PARK` | on / off | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Speed | `SPEED` | 0…200 km/h (=, <, >) | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Drive mode | `DRIVE_MODE` | Eco, Normal, Sport, Snow, Custom | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Regeneration | `REGEN_LEVEL` | Low, Medium, High, Adaptive, Off, One pedal | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Odometer | `ODOMETER` | 0…500000 km (=, <, >) | any |
| Energy saving | `ENERGY_SAVING` | on / off | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
### Energy
| Condition | Entry | Tested against | Firmware |
|---|---|---|---|
| Battery level | `BATTERY_LEVEL` | 0…100 % (=, <, >) | SWI68, SWI165 |
| Charging | `CHARGING` | on / off | SWI68, SWI165 |
| Charge limit | `CHARGE_LIMIT` | 0…100 % (=, <, >) | SWI68, SWI165 |
| Charging state | `CHARGING_STATUS` | Unplugged, Charging (AC), Charging (DC), Plugged in, not charging, Charge complete, Charging fault | SWI68, SWI165 |
| Scheduled charging on | `CHARGE_SCHEDULE_ENABLED` | on / off | SWI68, SWI165 |
| Charging starts at | `CHARGE_WINDOW_START` | a time of day (=, <, >) | SWI68, SWI165 |
| Charging stops at | `CHARGE_WINDOW_STOP` | a time of day (=, <, >) | SWI68, SWI165 |
| Remaining range | `RANGE_ESTIMATE` | 0…600 km (=, <, >) | SWI68, SWI165 |
| Battery pre-heating on | `BATTERY_PREHEAT` | on / off | SWI68, SWI165 |
### Climate
| Condition | Entry | Tested against | Firmware |
|---|---|---|---|
| Climate on | `CLIMATE_ON` | on / off | SWI68, SWI165 |
| Air conditioning on | `AC_ON` | on / off | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Climate AUTO on | `HVAC_AUTO` | on / off | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Air recirculation on | `RECIRC` | on / off | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Fan speed | `FAN_SPEED` | 0…11 (=, <, >) | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Set temperature | `TEMPERATURE_SET` | 17…33 °C (=, <, >) | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Passenger temperature | `PASSENGER_TEMP` | 17…33 °C (=, <, >) | SWI68, SWI165 |
| ECON mode on | `ECON_MODE` | on / off | SWI68, SWI165 |
| Windscreen defroster on | `FRONT_DEFROST` | on / off | SWI68, SWI165 |
| Rear window defroster on | `REAR_DEFROST` | on / off | SWI68, SWI165 |
| A window is open | `WINDOW_OPEN` | on / off | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Window opening | `WINDOW_POSITION` | 0…100 % (=, <, >) | SWI68, SWI165 |
| Driver window opening | `WINDOW_DRIVER` | 0…100 % (=, <, >) | SWI68, SWI165 |
| Passenger window opening | `WINDOW_PASSENGER` | 0…100 % (=, <, >) | SWI68, SWI165 |
| Rear left window opening | `WINDOW_REAR_LEFT` | 0…100 % (=, <, >) | SWI68, SWI165 |
| Rear right window opening | `WINDOW_REAR_RIGHT` | 0…100 % (=, <, >) | SWI68, SWI165 |
### Comfort
| Condition | Entry | Tested against | Firmware |
|---|---|---|---|
| Left seat heating | `SEAT_HEAT_LEFT` | 0…3 (=, <, >) | SWI133, SWI68, SWI165 |
| Right seat heating | `SEAT_HEAT_RIGHT` | 0…3 (=, <, >) | SWI133, SWI68, SWI165 |
| Steering wheel heating | `STEERING_HEAT` | on / off | SWI133, SWI68, SWI165 |
| Screen brightness | `SCREEN_BRIGHTNESS` | 5…100 % (=, <, >) | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
### Audio
| Condition | Entry | Tested against | Firmware |
|---|---|---|---|
| Media playing | `MEDIA_PLAYING` | on / off | any |
| Radio playing | `RADIO_PLAYING` | on / off | SWI68, SWI165 |
| Media volume | `MEDIA_VOLUME` | 0…max (=, <, >) | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
### Driver assistance
| Condition | Entry | Tested against | Firmware |
|---|---|---|---|
| Emergency braking (AEB) | `AEB_ENABLED` | on / off | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| AEB mode | `AEB_MODE` | Alert only, Alert + braking | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| AEB sensitivity | `AEB_SENSITIVITY` | Low, Standard, High | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| ELK mode | `ELK_MODE` | Off, Warning (LDW), Assist (LDP), Emergency keeping (ELK) | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| ELK sensitivity | `ELK_SENSITIVITY` | Low, Standard, High | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| ACC / TJA mode | `ACC_TJA_MODE` | Off, Adaptive cruise (ACC), Traffic jam assist (TJA) | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Speed limiter | `LIMITER_MODE` | Off, Manual, Intelligent | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Traffic sign recognition (TSR) | `TSR` | on / off | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Overspeed alarm | `OVERSPEED_ALARM` | on / off | SWI133, SWI132 |
| Speed limit tone | `SPEED_LIMIT_TONE` | on / off | SWI133, SWI132 |
| ADAS sound warning | `SOUND_WARNING` | on / off | SWI68, SWI165, SWI69, SWI131, SWI132 |
A reading the car does not answer makes the rule **not evaluable**: it does not fire, and it does not count as false.
## Actions
### Profile
| Action | Entry | Asks for | When stopped only | Firmware |
|---|---|---|:--:|---|
| Apply a profile | `APPLY_PROFILE` | an EVProfile profile | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Ask for a profile | `SHOW_PROFILE_PICKER` | — | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
### Driving
| Action | Entry | Asks for | When stopped only | Firmware |
|---|---|---|:--:|---|
| Drive mode | `SET_DRIVE_MODE` | Eco, Normal, Sport, Snow, Custom | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Regeneration | `SET_REGEN_LEVEL` | Low, Medium, High, Adaptive, Off, One pedal | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| One pedal driving | `SET_ONE_PEDAL` | on / off | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Energy saving | `SET_ENERGY_SAVING` | on / off | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
### Comfort
| Action | Entry | Asks for | When stopped only | Firmware |
|---|---|---|:--:|---|
| Left seat heating | `SET_SEAT_HEAT_LEFT` | 0…3 | — | SWI133, SWI68, SWI165 |
| Right seat heating | `SET_SEAT_HEAT_RIGHT` | 0…3 | — | SWI133, SWI68, SWI165 |
| Steering wheel heating | `SET_STEERING_HEAT` | on / off | — | SWI133, SWI68, SWI165 |
| Screen brightness | `SET_SCREEN_BRIGHTNESS` | 5…100 % | — | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
### Climate
| Action | Entry | Asks for | When stopped only | Firmware |
|---|---|---|:--:|---|
| Climate on/off | `SET_CLIMATE_POWER` | on / off | — | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Cabin temperature | `SET_CABIN_TEMP` | 17…33 °C | — | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Passenger temperature | `SET_PASSENGER_TEMP` | 17…33 °C | — | SWI68, SWI165 |
| Air conditioning | `SET_AC` | on / off | — | SWI68, SWI165, SWI69, SWI131, SWI132 |
| ECON mode | `SET_ECON` | on / off | — | SWI68, SWI165 |
| Climate AUTO | `SET_CLIMATE_AUTO` | on / off | — | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Air recirculation | `SET_RECIRCULATION` | on / off | — | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Fan level | `SET_FAN_LEVEL` | 0…11 | — | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Windscreen defroster | `SET_FRONT_DEFROST` | on / off | — | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Rear window defroster | `SET_REAR_DEFROST` | on / off | — | SWI68, SWI165, SWI69, SWI131, SWI132 |
| All windows ⚠️ | `SET_WINDOWS` | Closed, Open | yes | SWI68, SWI165 |
| Driver window ⚠️ | `SET_WINDOW_DRIVER` | Closed, Open | yes | SWI68, SWI165 |
| Passenger window ⚠️ | `SET_WINDOW_PASSENGER` | Closed, Open | yes | SWI68, SWI165 |
| Rear left window ⚠️ | `SET_WINDOW_REAR_LEFT` | Closed, Open | yes | SWI68, SWI165 |
| Rear right window ⚠️ | `SET_WINDOW_REAR_RIGHT` | Closed, Open | yes | SWI68, SWI165 |
| Door locks | `SET_DOOR_LOCK` | on / off | — | SWI68, SWI165 |
### Energy
| Action | Entry | Asks for | When stopped only | Firmware |
|---|---|---|:--:|---|
| Charge limit | `SET_CHARGE_LIMIT` | 40…100 % | — | SWI68, SWI165 |
| Allow charging | `SET_CHARGING_ENABLED` | on / off | — | SWI68, SWI165 |
| Scheduled charging | `SET_CHARGE_SCHEDULE` | on / off | — | SWI68, SWI165 |
| Charging window | `SET_CHARGE_WINDOW` | a start and an end time | — | SWI68, SWI165 |
| Battery pre-heating | `SET_BATTERY_PREHEAT` | on / off | — | SWI68, SWI165 |
### Audio
| Action | Entry | Asks for | When stopped only | Firmware |
|---|---|---|:--:|---|
| Media volume | `SET_MEDIA_VOLUME` | 0…max | — | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Media volume, step | `ADJUST_MEDIA_VOLUME` | -30…30 | — | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Left / right balance | `SET_AUDIO_BALANCE` | -9…9 | — | SWI69, SWI131, SWI132 |
| Front / rear fader | `SET_AUDIO_FADER` | -9…9 | — | SWI69, SWI131, SWI132 |
| Tone | `SET_TONE_CONTROL` | -9…9 | — | SWI69, SWI131, SWI132 |
| Bose sound profile | `SET_BOSE_SOUND_TYPE` | 0…3 | — | SWI69, SWI131, SWI132 |
| 3D effect | `SET_3D_EFFECT` | 0…3 | — | SWI69, SWI131, SWI132 |
| Speed-adaptive volume | `SET_SPEED_VOLUME` | 0…3 | — | SWI69, SWI131, SWI132 |
| Play the radio | `PLAY_RADIO` | — | — | SWI68, SWI165 |
| Radio band and station | `TUNE_RADIO` | band (AM, FM, DAB), frequency, play | — | SWI68, SWI165 |
| Next radio station | `RADIO_NEXT_STATION` | — | — | SWI68, SWI165 |
| Previous radio station | `RADIO_PREV_STATION` | — | — | SWI68, SWI165 |
| Silence the radio | `PAUSE_RADIO` | — | — | SWI68, SWI165 |
| Radio play/pause | `RADIO_PLAY_PAUSE` | — | — | SWI68, SWI165 |
| Open the radio screen | `OPEN_RADIO_SCREEN` | — | yes | SWI68, SWI165 |
### Driver assistance
| Action | Entry | Asks for | When stopped only | Firmware |
|---|---|---|:--:|---|
| Emergency braking (AEB) | `SET_AEB_ENABLED` | on / off | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| AEB mode | `SET_AEB_MODE` | Alert only, Alert + braking | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| AEB sensitivity | `SET_AEB_SENSITIVITY` | Low, Standard, High | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Stability control (ESC) | `SET_ESC` | on / off | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Drowsiness warning | `SET_DROWSINESS` | on / off | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Drowsiness warning sensitivity | `SET_DROWSINESS_SENSITIVITY` | Low, Standard, High | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| ELK mode | `SET_ELK_MODE` | Off, Warning (LDW), Assist (LDP), Emergency keeping (ELK) | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| ELK sensitivity | `SET_ELK_SENSITIVITY` | Low, Standard, High | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| ACC / TJA mode | `SET_ACC_TJA_MODE` | Off, Adaptive cruise (ACC), Traffic jam assist (TJA) | yes | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Speed limiter | `SET_LIMITER_MODE` | Off, Manual, Intelligent | yes | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Traffic sign recognition (TSR) | `SET_TSR` | on / off | yes | SWI133, SWI68, SWI165, SWI69, SWI131, SWI132 |
| Overspeed alarm | `SET_OVERSPEED_ALARM` | on / off | yes | SWI133, SWI132 |
| Speed limit tone | `SET_SPEED_LIMIT_TONE` | on / off | yes | SWI133, SWI132 |
| ADAS sound warning | `SET_SOUND_WARNING` | on / off | yes | SWI68, SWI165, SWI69, SWI131, SWI132 |
| Lane departure sound warning | `SET_LAS_WARNING_SOUND` | on / off | — | SWI132 |
| Lane departure steering vibration | `SET_LAS_WARNING_VIBRATION` | on / off | — | SWI132 |
### System
| Action | Entry | Asks for | When stopped only | Firmware |
|---|---|---|:--:|---|
| Launch an app | `LAUNCH_APP` | an installed app | — | any |
| Show a notification | `SHOW_NOTIFICATION` | free text | — | any |
| Speak a message | `SPEAK_TEXT` | free text | — | any |
| Navigate to | `NAVIGATE_TO` | an address or coordinates | — | any |
| Ask for confirmation | `ASK_CONFIRM` | a question, and how long to wait | — | any |
| Send a text message | `SEND_SMS` | a number or a contact, and a message | — | any |
| Enable a rule | `ENABLE_RULE` | one of your rules | — | any |
| Disable a rule | `DISABLE_RULE` | one of your rules | — | any |
| Media control | `MEDIA_CONTROL` | Play / pause, Next track, Previous track | — | any |
| Bluetooth | `SET_BLUETOOTH` | on / off | — | any |
| Wi-Fi | `SET_WIFI` | on / off | — | any |
| Call webhook | `WEBHOOK` | a URL, and an optional body | — | any |
| Wait | `DELAY` | 1…60 s | — | any |
| Call | `CALL_NUMBER` | a number or a contact | — | SWI68, SWI165 |
| Call a contact | `CALL_CONTACT` | a number or a contact | — | SWI68, SWI165 |
⚠️ — the firmware carries the property, but nothing establishes that writing it does anything (`ActionType.writeProven`). Those actions are hidden from the editor and refused by the executor until one is observed to work.
The per-generation grid is in [firmware-matrix.md](firmware-matrix.md), generated from the same annotations.