Commit Graph
7 Commits
Author SHA1 Message Date
eiggerandClaude Opus 5 0b368acd79 feat(obd): add the real odometer sensors to the Accent template
Replace the log-only probe with actual sensors now that OBD sensors can
extract values by byte offset. All three come from the same 21 03 response on
the engine ECU:

  offset 49  odometer at the last DPF regeneration
  offset 53  distance driven since that regeneration
  offset 57  total odometer

Each is a 32-bit big-endian value scaled by 0.001 to give kilometres. The two
DPF fields are marked diagnostic and exist as a cross-check: the value at 49
plus the value at 53 should equal the value at 57, which tells us the offsets
are right rather than merely plausible.

Whether this car's 21 03 frame reaches byte 57 is still unverified. If it does
not, decodeStructured returns null and nothing is published, so the sensors
stay empty instead of reporting a wrong distance. The probe is kept for now so
the raw response still lands in the log either way.

Document `decode` on OBD sensors in both READMEs.

Needs hassble-android feat/obd-offset-decode.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 11:06:07 +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 e787fab0b5 docs: Add contribution guidelines and templates for English and Korean 2026-06-26 09:12:59 +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
eiggerandClaude Sonnet 4.6 20d2a273a4 docs: split README into English and Korean versions
README.md rewritten as English-only with cross-link to README.ko.md.
README.ko.md added as Korean-only translation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 22:29:08 +09:00
eiggerandClaude Sonnet 4.6 476a6044f1 docs: add comprehensive bilingual config schema reference (EN/KO)
Full documentation of every config.yaml field — root structure, defaults,
all three device sources (advertisement/gatt_notify/obd), match conditions,
decode types, controls, publish rules, OBD preset table, and 5 full examples.
Includes common pitfalls (hex literals, AND-logic, instance_mode, source_field).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-23 21:27:49 +09:00
eigger 981041a94b Initial commit with config.yaml, README, and LICENSE 2026-06-22 13:19:54 +09:00