Commit Graph
14 Commits
Author SHA1 Message Date
eiggerandClaude Opus 5 8243d1e8b8 feat(obd): add Accent RB diesel template with an odometer probe
The Accent does not expose the odometer through the cluster. OBDb's captured
command support for real cars records 7C6.7CE.22B002 as unsupported on the
2013, 2015 and 2019 Accent (2018 is the lone exception), which is exactly the
7F 22 22 conditionsNotCorrect this car returns. So obd_hyundai_kia, which is
correct for the 35 other HKMC models, cannot work here.

Add a template for the Accent RB diesel (1.6 TCI-U2) carrying what is known
to work on this car, plus a probe for the remaining unknown:

- fuel level as a percentage via standard 012F, recorded as supported on 7E0
  for every captured Accent year
- intake temperature and barometric pressure from 21 01, taken from the
  awesomeit profile for this exact model, year and engine
- probe_2103, which requests 21 03 purely so the response lands in the app
  log as raw hex

21 03 on the engine ECU is where OBDb's make-wide HYUNDAI_ODO_V2 lives, at
bytes 57-60 divided by 1000. Two neighbouring fields sit in the same frame —
the odometer at the last DPF regeneration at bytes 49-52, and the distance
driven since that regeneration at bytes 53-56 — and they are distinct values,
not the odometer. The awesomeit profile for this car reads bytes 53-55 of the
same 21 03 response, so the frame is known to arrive at least that far; the
odometer is two bytes beyond.

The probe is needed because formula variables only reach byte 19, so byte 57
cannot be addressed yet. Once the raw response confirms the frame length and
the value matches the dash, OBD sensors need offset-based decode and the probe
can be replaced by a real sensor.

Note the exception in obd_hyundai_kia so it points at this template.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 10:56:01 +09:00
eiggerandClaude Opus 5 7c6e3ace39 docs(obd): correct the 22B002 byte map note from OBDb data
The comment claimed some Kia clusters shift the odometer to i:k:k:l. That
misread a search snippet: bytes j:k:l are a separate field holding the same
odometer in miles for North American clusters, not an alternate km layout.

Verified against OBDb (obdb.community), where 11 Hyundai/Kia models —
Elantra, Sonata, Tucson, Kona, Santa Fe, Veloster, Forte, K5, Seltos,
Sportage, Telluride — all publish the identical layout for 7C6 / 22 B002:

  e      fuel level     (liters)
  f      cluster volts  div 12.8
  g:h:i  odometer       24-bit km
  j:h:l  odometer       24-bit miles

OBDb's 12.8 divisor for byte f equals the 0.078125 multiplier already in the
template, which confirms OBDb indexes bytes the same way Torque letters do,
i.e. excluding the 62 B0 02 echo. So g:h:i is right as written.

Fuel level stays at e*0.5. OBDb is split — Santa Fe and Soul carry div 2
while ten others carry no scale and max 255, the uncalibrated 8-bit default.
The awesomeit plugin (35 models) and the Elantra CN7 list both scale by 0.5,
and e*1.0989 % maps to a 45.5 L full tank, so 0.5 is the calibrated value.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 09:23:59 +09:00
eiggerandClaude Opus 5 d75bcd469a fix(obd): replace Hyundai/Kia template with the cluster 22B002 PIDs
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>
2026-07-30 00:29:02 +09:00
eigger 22fe8e88d3 test: 현대/기아 전체 PID 후보 추가 및 테스트용 update_interval 1s 설정 2026-07-29 23:29:49 +09:00
eigger 9f322c9486 fix: 표준 및 현대/기아 차종별 주행거리(A6, ED03, F22E), 연료잔량(2F, 002F) PID 후보 추가 2026-07-29 23:20:59 +09:00
eigger dea0c0c115 fix: 현대/기아 연료잔량(002F) 및 init_commands 정리 2026-07-29 23:19:51 +09:00
eigger f6ba3053c2 style: init_commands 간소화 (ATSP6, ATSH7E0) 2026-07-29 23:10:46 +09:00
eigger 8764564254 refactor: init_commands에만 ATSH7E0 헤더 지정하고 센서별 pre_commands 제거 2026-07-29 23:08:33 +09:00
eigger d57f05d7d5 fix: RPM, Speed, 연료잔량(%), 주행거리 전체 센서에 ATSH7E0 헤더 지정 2026-07-29 23:07:15 +09:00
eigger 9776838e0b fix: 현대/기아 PID 헤더(ATSH743, ATSH7E0) pre_commands 추가 2026-07-29 23:06:02 +09:00
eigger 730994fd0d add: 현대/기아 기본 OBD-II PID 템플릿 추가 (RPM, 속도, 연료잔량, 총 주행거리) 2026-07-29 22:33:53 +09:00
eigger 94ddb8fdda Simplify OBD init command lists
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.
2026-06-26 09:00:48 +09:00
eiggerandCursor 0fe6f00782 fix: align parking_beacon template with config.yaml (parking_floor)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 12:22:19 +09:00
eiggerandCursor e38b2cc954 Add templates.yaml for HassBle import template feature
Include Jaalee JHT, parking beacon, OBD, and GATT starter templates. Update README for fixed config.yaml + templates.yaml layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-25 12:13:55 +09:00