Repository navigation
Commit 822d4e3
feat(decoders): add the enablers for the sensor decoding layer
Groundwork for ADR-006. No decoding happens yet, but everything stage 2
needs is now in place:
* the demodulated bit string is carried in metadata["bits"] for MS, MU and
MC messages. It was computed already but only its length was kept, and
the FHEM decoding logic this layer mirrors works on bits, not on hex.
* SensorEvent holds the interpreted measurements, and DecodedMessage gains
a single optional `sensor` field, so no existing signature changes. The
MQTT serializer drops that field, keeping state/messages byte identical
for current consumers.
* tools/fhem_testdata_import.py vendors the FHEM test vectors into
tests/data/fhem/. They carry the raw telegram, the expected stage 1
string and the expected stage 2 readings, which makes them the parity
reference for both stages. Vendoring keeps the suite independent of a
RFFHEM checkout sitting next to this one.
The new baseline test pins stage 1 at 86 of 99 reproduced vectors and
requires the five protocols with hardware behind them here (27, 50, 85,
125, 126) to match completely, so a stage 2 change cannot quietly damage
stage 1.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBqRw2DPXbSzhGBqB55cFZ1 parent 7f0b7c3 commit 822d4e3
9 files changed
Lines changed: 3331 additions & 1 deletion
File tree
- sd_protocols
- signalduino
- tests
- data/fhem
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
245 | 248 | | |
246 | 249 | | |
247 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
24 | 50 | | |
25 | 51 | | |
26 | 52 | | |
| |||
29 | 55 | | |
30 | 56 | | |
31 | 57 | | |
| 58 | + | |
32 | 59 | | |
33 | 60 | | |
34 | 61 | | |
| |||
0 commit comments