The obd_hyundai_kia template shipped four PIDs that belong to other makes, so
a Hyundai or Kia never answered them:
22 132A → GM/Chevrolet (Malibu, Cruze, Trax, Spark)
22 2203 + ATSH743 → Renault Samsung (SM5, SM6, QM3, QM6)
22 FD40 → SsangYong (Korando, Rexton W, Tivoli)
22 F22E → SsangYong Tivoli
The odometer formulas were wrong independently of the PID: FD40 reads the
odometer from bytes U:V, not a:b.
Replace them with the HKMC instrument cluster DID, which carries odometer,
fuel level and cluster voltage in one response:
ATSH7C6 + 22 B002 → 62 B0 02 [a][b][c][d][e][f][g][h][i] …
e → fuel level e*0.5 L
f → cluster volts f*0.078125 V
g:h:i → odometer 24-bit km
Cross-checked against the Elantra CN7 PID list, JejuSoul/OBD-PIDs-for-HKMC-EVs
and the awesomeit Torque plugin database (35 HKMC models, 2013 onwards).
Requires hassble-android to group sensors by (mode, pid) and to expose
response bytes past h — all three sensors share one PID and the odometer
needs byte i.
Also document the formula byte range and the ATSH restore rule in both READMEs.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Remove redundant OBD initialization commands (ATZ, ATE0, ATL0, ATS0, ATH0) from configs. config.yaml now only uses ATSP6 for the device, and templates.yaml clears init_commands for one template and sets only ATSP6 for the other. This reduces unnecessary reset/echo/linefeed commands and relies on explicit protocol selection.