Commit c56322b
fix: EVC energy word order, unreachable protocol gates, reactive power, MIC-G2 sensors
Six hardware-verified fixes (raw Modbus TCP reads cross-checked against
the official protocol documents):
1. EVC Charge Added - Cumulative read 19660.8 kWh instead of 0.3 kWh:
the charger sends EQ_Total (0x10, u32) high-word-first. Adds the
per-sensor order32 override field (read path already honored it)
and sets order32="big" on charge_added_cum.
2. modbus_min=101/102 gates were unreachable: no device reports more
than 100 from register 0x82 (the values conflated the protocol
register with the document revision). Relaxed to 100 after raw-read
verification; misleading dataclass comments corrected; peakshaving
complementary pairs re-split at the documented boundary
(unscaled max=99, X1/X3-scaled min=100).
3. Grid Reactive Power L1/L2 showed ~26 Mvar: 0xC0/0xC2-as-S32 merged
two S16 values. L1/L2 now use the documented S32 registers 0xDE/0xE0
for protocol >=100 (raw-verified, phases sum to total) and the
legacy S16 quad for <=99; the V1.00-derived 0xC0/0xC2 S32 defs are
removed (doc error confirmed, resolves the open question in wills106#2099).
4. MIC pv_total_power removed: exact computed duplicate of
pv_power_total (same value_function, same device).
5. MIC-G2 measured power: doc V4.0 marks the whole 0x700-0x70A block
as EVC-only and its PowerToEV row proves the parenthetical addresses
carry a systematic -1 typo. The _alt sensors (l1/l2/l3), built on
that typo and reading Int32 at overlapping odd offsets, are removed;
the primaries (0x704/0x706/0x708, Int32 per the authoritative
address column) and measured_power_2 stay default-disabled - a
meter-attached test shows the firmware never serves per-phase
values there (handler echoes one buffer at every offset).
6. MIC-G2 Q Curve select always showed unknown: readback 0x347 is
byte-packed (mode in low byte, Pf in high byte) but was decoded as
full u16. Now REGISTER_U8L.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 2178c86 commit c56322b
3 files changed
Lines changed: 43 additions & 111 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
208 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
209 | 210 | | |
210 | 211 | | |
211 | 212 | | |
| |||
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
255 | | - | |
256 | | - | |
| 256 | + | |
| 257 | + | |
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
| |||
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
271 | | - | |
272 | | - | |
| 272 | + | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
291 | | - | |
292 | | - | |
| 292 | + | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | | - | |
311 | | - | |
| 311 | + | |
| 312 | + | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
| |||
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
339 | | - | |
340 | | - | |
| 340 | + | |
| 341 | + | |
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
| |||
0 commit comments