Skip to content

drivers/techem: fix swapped MVT rows, Vario kWh scale, add MK-Radio v0x52 - #5

Open
dixonbg wants to merge 1 commit into
i12bp8:mainfrom
dixonbg:drivers/techem-mvt-fix
Open

dixonbg wants to merge 1 commit into
i12bp8:mainfrom
dixonbg:drivers/techem-mvt-fix

Conversation

@dixonbg

@dixonbg dixonbg commented Nov 3, 2026 •

Copy link
Copy Markdown

Problem

Several Techem MVT rows have version and type swapped compared with wmbusmeters, where mvt = TCH,<version>,<type> matches the WmbusMVT {manuf, version, medium} order. As a result MK-Radio 3/4/3a water, Compact V heat, Vario 451 heat and TSD2 smoke frames never reach their driver. They fall through to the generic OMS walker, which prints nonsense, e.g. a warm-water meter shown as:

TCH Heat (volumetric) v0x52
VolFlow: 1194806222389 m^3/h

Changes

Driver Before (V,T) After (V,T) wmbusmeters ref
mkradio3 62/74, 72/74 74/62, 74/72 (+52/62, 52/72) mkradio3.xmq
mkradio4 62/70, 72/70, 62/95, 72/95 95/62, 95/72, 70/62, 70/72 mkradio4.xmq
mkradio4a 95/37 via compact decoder 95/37 via OMS walker mkradio4a.xmq
mkradio3a 72/50 50/72 mkradio3a.xmq
compact5 04/45, C3/45, 43/45, 43/39, 43/22 45/04, 45/C3, 22/43, 45/43, 39/43 compact5.xmq
vario451 04/27, C3/27 27/04, 27/C3 vario451.xmq
vario451mid / vario411 17/04, 28/04 via compact decoder same rows via OMS walker vario451mid.xmq, vario411.xmq
tsd2 F0/76 (+ 00/76) 76/F0 tsd2.xmq
fhkv + reversed 80/69, 80/94 removed (not in wmbusmeters) fhkvdataiii/iv.xmq

Other fixes:

  • Vario 451 kWh was 100× too high. MJ→kWh used raw × 250 / 9; it is raw / 3.6 (matches the wmbusmeters vario451 test: 3642 / 2729 kWh, previously 364222 / 272944).
  • MK-Radio water v0x52 added. It is not in wmbusmeters, but field captures have the MK-Radio 3 layout with valid billing dates (prev 2026-09-30, current = capture day) and plausible volumes across 11 meters, warm and cold.
  • Water titles now say warm/cold water (type 0x62/0x72); MK-Radio 4 also shows billing dates (they are valid in v0x95 captures; invalid ones render -).
  • TSD2 decodes status (OK / SMOKE / DEFECT) and the billing date, per tsd2.xmq.

Captured frames (meter IDs anonymised)

v0x52 warm water (T=0x62):

2F446850785634125262A2063E351E003016010000000001010002010102010300000003
020000020000000100010000

→ Now 3.1 m3 / Period 0.1 / Last 3.0 / Reset 2026-09-30 / Read 2026-11-03

v0x52 cold water (T=0x72):

2F446850214365875272A2063E35DE003016140000000209100F0E0B0904040303020305
060302020004050602040503

→ Now 24.2 m3 / Period 2.0 / Last 22.2

v0x95 warm water (T=0x62):

2F446850111111119562A2063E35F8023016000000000000000005060004060
80B0E090B0E0C0A120B0C0E0A0A0E0207

→ Now 76.0 m3 / Reset 2026-09-30 / Read 2026-11-03

Checklist

  • Captured frames included (above, IDs anonymised)
  • (M, V, T) triples from captures: TCH/52/62, TCH/52/72, TCH/95/62
  • wmbusmeters reference files: drivers/src/{mkradio3,mkradio3a,mkradio4,mkradio4a,compact5,vario451,vario451mid,vario411,tsd2,fhkvdataiii,fhkvdataiv}.xmq
  • Build is clean (ufbt, official firmware 1.5.1 / API 88.2, no warnings)
  • Tested on hardware (Flipper, internal CC1101): 15 Techem water meters decode with consistent dates and plausible volumes; 19 FHKV HCAs (unchanged decoder) still decode
  • Replayed offline: new tests/test_techem_water.c and tests/test_techem_other.c use the wmbusmeters test vectors; make -C tests check passes

Heat meters and TSD2 were not available on hardware; they are verified only against the wmbusmeters test vectors.

🤖 Generated with Claude Code

Several Techem MVT rows had version and type swapped relative to
wmbusmeters (`mvt = TCH,<version>,<type>`), so MK-Radio 3/4/3a water,
Compact V heat, Vario 451 heat and TSD2 smoke frames never matched
their driver and fell through to the generic OMS walker, which printed
nonsense (e.g. "Heat (volumetric) VolFlow: 1194806222389 m^3/h").

- Align all Techem MVT rows with wmbusmeters drivers/src/*.xmq.
- Add MK-Radio water version 0x52 (field captures, MK-Radio 3 layout).
- Title water meters warm/cold; show billing dates for MK-Radio 4.
- MK-Radio 4a, Vario 451 MID and Vario 411 are OMS DIF/VIF frames:
  route them to the generic walker.
- Fix Vario 451 MJ->kWh conversion (raw / 3.6, was raw * 250 / 9).
- Decode TSD2 smoke status (OK / SMOKE / DEFECT) and billing date.
- Drop reversed duplicate FHKV rows.
- Host tests with wmbusmeters vectors and field captures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant