|
558 | 558 | 31200: {'name': 'battery_power_high', 'scale': 1, 'unit': '', 'pair': 31201}, |
559 | 559 | 31201: {'name': 'battery_power_low', 'scale': 1, 'unit': '', 'pair': 31200, |
560 | 560 | 'combined_scale': 0.1, 'combined_unit': 'W', 'signed': True}, |
| 561 | + # Energy counters. Per VPP 2.03 §2.2 rows 66-69, 31202/31204/31206/31208 are ALL |
| 562 | + # energy in 0.1 kWh — daily and cumulative, charge and discharge. v1.2.1 mapped |
| 563 | + # 31204 and 31208 as charge/discharge POWER in watts, inherited from the first-gen |
| 564 | + # MIN TL-XH profile. Confirmed wrong against a field scan: those registers read |
| 565 | + # 37.9 and 29.2, coherent as cumulative kWh on a system with 72.7 kWh lifetime |
| 566 | + # generation, nonsensical as 37.9 W / 29.2 W (Issue #361). |
561 | 567 | 31202: {'name': 'charge_energy_today_high', 'scale': 1, 'unit': '', 'pair': 31203}, |
562 | 568 | 31203: {'name': 'charge_energy_today_low', 'scale': 1, 'unit': '', 'pair': 31202, |
563 | 569 | 'combined_scale': 0.1, 'combined_unit': 'kWh'}, |
564 | | - 31204: {'name': 'charge_power_high', 'scale': 1, 'unit': '', 'pair': 31205}, |
565 | | - 31205: {'name': 'charge_power_low', 'scale': 1, 'unit': '', 'pair': 31204, |
566 | | - 'combined_scale': 0.1, 'combined_unit': 'W', 'signed': True}, |
| 570 | + 31204: {'name': 'charge_energy_total_high', 'scale': 1, 'unit': '', 'pair': 31205}, |
| 571 | + 31205: {'name': 'charge_energy_total_low', 'scale': 1, 'unit': '', 'pair': 31204, |
| 572 | + 'combined_scale': 0.1, 'combined_unit': 'kWh', |
| 573 | + 'desc': 'Cumulative battery charge (VPP 2.03 row 67)'}, |
567 | 574 | 31206: {'name': 'discharge_energy_today_high', 'scale': 1, 'unit': '', 'pair': 31207}, |
568 | 575 | 31207: {'name': 'discharge_energy_today_low', 'scale': 1, 'unit': '', 'pair': 31206, |
569 | 576 | 'combined_scale': 0.1, 'combined_unit': 'kWh'}, |
570 | | - 31208: {'name': 'discharge_power_high', 'scale': 1, 'unit': '', 'pair': 31209}, |
571 | | - 31209: {'name': 'discharge_power_low', 'scale': 1, 'unit': '', 'pair': 31208, |
572 | | - 'combined_scale': 0.1, 'combined_unit': 'W', 'signed': True}, |
| 577 | + 31208: {'name': 'discharge_energy_total_high', 'scale': 1, 'unit': '', 'pair': 31209}, |
| 578 | + 31209: {'name': 'discharge_energy_total_low', 'scale': 1, 'unit': '', 'pair': 31208, |
| 579 | + 'combined_scale': 0.1, 'combined_unit': 'kWh', |
| 580 | + 'desc': 'Cumulative battery discharge (VPP 2.03 row 69)'}, |
573 | 581 | 31214: {'name': 'battery_voltage', 'scale': 0.1, 'unit': 'V', 'signed': True, |
574 | | - 'desc': 'Battery voltage (verified against app, Issue #361)'}, |
575 | | - 31215: {'name': 'battery_current', 'scale': 0.1, 'unit': 'A', 'signed': True, |
576 | | - 'desc': 'Battery current'}, |
| 582 | + 'desc': 'Battery voltage (INT16; verified against app, Issue #361)'}, |
| 583 | + # INT32 spanning 31215-31216, NOT a single register. Read as INT16 the value sits |
| 584 | + # in the high word and decodes to ~0 — the same defect reported for WIT in #247, |
| 585 | + # where -27.4 A appeared as -0.1 A. Verified here: battery power 2012 W over |
| 586 | + # 403.7 V = 4.98 A, and 31216 reads 49 -> 4.9 A. |
| 587 | + 31215: {'name': 'battery_current_high', 'scale': 1, 'unit': '', 'pair': 31216}, |
| 588 | + 31216: {'name': 'battery_current_low', 'scale': 1, 'unit': '', 'pair': 31215, |
| 589 | + 'combined_scale': 0.1, 'combined_unit': 'A', 'signed': True, |
| 590 | + 'desc': 'Battery current (INT32; positive=charging)'}, |
577 | 591 | 31217: {'name': 'battery_soc', 'scale': 1, 'unit': '%', |
578 | 592 | 'desc': 'Battery SOC (verified against app, Issue #361)'}, |
579 | | - 31222: {'name': 'battery_temp', 'scale': 0.1, 'unit': '°C', 'signed': True, |
580 | | - 'desc': 'Battery temperature'}, |
| 593 | + # Spec puts battery temperature at 31223, not 31222 — 31222 is the low word of the |
| 594 | + # reserved UINT32 at 31221 and reads 0. NOTE: 31223 also reads 0 on the MIN |
| 595 | + # 4200TL-XH2, while 31224 ("reserved for maximum battery temperature") reads 365 |
| 596 | + # -> 36.5 °C. Awaiting a field comparison before preferring 31224 (Issue #361). |
| 597 | + 31223: {'name': 'battery_temp', 'scale': 0.1, 'unit': '°C', 'signed': True, |
| 598 | + 'desc': 'Battery temperature (VPP 2.03 row 78)'}, |
581 | 599 | }, |
582 | 600 | 'holding_registers': { |
583 | 601 | **VPP_V201_HOLDING_1P, |
|
0 commit comments