|
97 | 97 | # hard filter available, so exclusion has to happen here. |
98 | 98 | NO_BATTERY_TEMP: Set[str] = {"battery_temp"} |
99 | 99 |
|
100 | | -# Same mechanism, different sensor. dcdc_temp reads register 3176 (Bdc1Temp1) on MOD/MID |
101 | | -# and has no equivalent anywhere in the SPA ranges, so a profile that wants the ordinary |
102 | | -# inverter/IPM/boost temperatures has to subtract it or ship a permanent 0.0 °C. |
103 | | -NO_DCDC_TEMP: Set[str] = {"dcdc_temp"} |
| 100 | +# dcdc_temp is NOT in TEMPERATURE_SENSORS, and must not be put back there. |
| 101 | +# |
| 102 | +# It was, briefly, and the consequences were the exact bug the change above exists to |
| 103 | +# prevent. The #362 fix identified register 3176 on MOD/MID as the DC-DC stage and added |
| 104 | +# "dcdc_temp" to the shared TEMPERATURE_SENSORS group — which almost every profile |
| 105 | +# includes. Only three register maps define the register at all, so every other model |
| 106 | +# gained a "DC-DC Temperature" entity reporting 0.0 °C: a phantom created while fixing a |
| 107 | +# phantom, verified on the two profiles that have the register and on none of the |
| 108 | +# twenty-six that don't. |
| 109 | +# |
| 110 | +# Opt in per profile instead. A sensor group shared by everything is the wrong home for |
| 111 | +# a sensor only a few models can populate, because adding to it is silent and the failure |
| 112 | +# is invisible — nothing errors, an entity simply reports freezing forever. |
| 113 | +DCDC_TEMP_SENSOR: Set[str] = {"dcdc_temp"} |
104 | 114 |
|
105 | 115 | BMS_SENSORS: Set[str] = { |
106 | 116 | "bms_status", "bms_error", "bms_warn_info", |
|
112 | 122 |
|
113 | 123 | TEMPERATURE_SENSORS: Set[str] = { |
114 | 124 | "inverter_temp", "ipm_temp", "boost_temp", |
115 | | - # MOD/MID expose Bdc1Temp1 at register 3176 — the battery-side DC-DC stage. It was |
116 | | - # mapped as battery_temp until #362 identified it against ShineApp. Only appears |
117 | | - # where a profile actually defines the register, so this is a no-op elsewhere. |
118 | | - "dcdc_temp", |
| 125 | + # dcdc_temp deliberately absent — see DCDC_TEMP_SENSOR below. It was added here with |
| 126 | + # the note "only appears where a profile actually defines the register, so this is a |
| 127 | + # no-op elsewhere", which is the belief this whole file warns against: membership of |
| 128 | + # the sensor set is what creates the entity, and the register only decides whether it |
| 129 | + # has a value. It was not a no-op; it put 0.0 °C on twenty-six profiles. |
119 | 130 | } |
120 | 131 |
|
121 | 132 | STATUS_SENSORS: Set[str] = { |
|
613 | 624 | # SPH TL3 SERIES - Hybrid Storage (Three Phase with Battery) |
614 | 625 | # ======================================================================== |
615 | 626 |
|
| 627 | + # dcdc_temp is subtracted from both: it reads register 3176 (Bdc1Temp1), which |
| 628 | + # exists on MOD/MID and nowhere in the SPH-TL3 map. It was in the sensor set anyway, |
| 629 | + # so every SPH-TL3 install has been publishing a DC-DC temperature of 0.0 °C. Found |
| 630 | + # while checking the same class of fault on SPA-TL3 (#360); the other two phantom |
| 631 | + # temperatures here were fixable by adding registers 94/95, this one is not. |
616 | 632 | "sph_tl3_3000_10000": { |
617 | 633 | "name": "SPH-TL3 Series 3000-10000", |
618 | 634 | "description": "Hybrid 3-phase inverter with battery storage (3-10kW)", |
|
667 | 683 | # GrowattData field, so a hasattr() gate cannot suppress it — the sensor |
668 | 684 | # would be created and publish 0.0 degrees forever. That is the v1.4.1 |
669 | 685 | # battery-temp bug exactly, and the sensor set is the only hard filter. |
670 | | - (TEMPERATURE_SENSORS - NO_DCDC_TEMP) | |
| 686 | + TEMPERATURE_SENSORS | |
671 | 687 | # Every BMS sensor is gated on hasattr(), so only the four registers this |
672 | 688 | # profile actually defines (1083/1085/1095/1096) create entities (#360). |
673 | 689 | BMS_SENSORS | |
|
688 | 704 | # entry — the alternative considered was renaming the SPH-TL3 option to mention SPA, |
689 | 705 | # which would have made phantom PV entities the documented behaviour. |
690 | 706 | # |
691 | | - # ENERGY_SENSORS (energy_today/energy_total) is excluded for the same reason it is |
692 | | - # excluded from the single-phase SPA profile above: on the SPH map those count PV |
693 | | - # generation. Excluding a sensor that would have read zero costs nothing; including |
694 | | - # one is the defect being fixed here. |
| 707 | + # ENERGY_SENSORS was excluded on the assumption that energy_today/energy_total count |
| 708 | + # PV generation on the SPH map, which an AC-coupled unit has none of. A full scan of |
| 709 | + # the #360 device refuted that: |
| 710 | + # |
| 711 | + # input 53/54 = 0/20 -> 2.0 kWh today |
| 712 | + # input 55/56 = 0/23139 -> 2313.9 kWh total |
| 713 | + # |
| 714 | + # and the SPA extended block agrees exactly at 2053-2056, which is a second address |
| 715 | + # reporting the same quantity. These count what the inverter puts out, and a battery |
| 716 | + # discharging through it produces output like anything else. Restored. |
| 717 | + # |
| 718 | + # Worth recording how close this came to shipping wrong: the reporter checked the |
| 719 | + # same registers and said there were no real values there, because 53 and 55 are the |
| 720 | + # HIGH words and both read zero. The data was in 54 and 56. The scan CSV settled in |
| 721 | + # seconds what two rounds of asking could not. |
695 | 722 | "spa_tl3_4000_10000_v201": { |
696 | 723 | "name": "SPA-TL3 (AC Storage) 4-10kW", |
697 | 724 | "description": "Three-phase AC-coupled battery storage, no solar DC inputs (VPP V2.01)", |
|
707 | 734 | POWER_FLOW_SENSORS | |
708 | 735 | CONSUMPTION_SENSORS | |
709 | 736 | ENERGY_BREAKDOWN_SENSORS | |
| 737 | + ENERGY_SENSORS | |
710 | 738 | BATTERY_SENSORS | |
711 | 739 | BMS_SENSORS | |
712 | 740 | TEMPERATURE_SENSORS | |
|
791 | 819 | "has_pv3": True, |
792 | 820 | "has_battery": True, |
793 | 821 | "max_power_kw": 15.0, |
794 | | - "sensors": (HYBRID_3P_SENSORS | PV3_SENSORS | BACKUP_BOX_SENSORS) - NO_BATTERY_TEMP, |
| 822 | + "sensors": ((HYBRID_3P_SENSORS | PV3_SENSORS | BACKUP_BOX_SENSORS | DCDC_TEMP_SENSOR) |
| 823 | + - NO_BATTERY_TEMP), |
795 | 824 | }, |
796 | 825 |
|
797 | 826 | "mod_6000_15000tl3_xh_v201": { |
|
803 | 832 | "has_pv3": True, |
804 | 833 | "has_battery": True, |
805 | 834 | "max_power_kw": 15.0, |
806 | | - "sensors": (HYBRID_3P_SENSORS | PV3_SENSORS | BACKUP_BOX_SENSORS) - NO_BATTERY_TEMP, |
| 835 | + "sensors": ((HYBRID_3P_SENSORS | PV3_SENSORS | BACKUP_BOX_SENSORS | DCDC_TEMP_SENSOR) |
| 836 | + - NO_BATTERY_TEMP), |
807 | 837 | }, |
808 | 838 |
|
809 | 839 | # MID 11-30KTL3-XH / MID 8-15KTL3-XHL/JP — three-phase commercial hybrid |
|
821 | 851 | "has_pv3": True, |
822 | 852 | "has_battery": True, |
823 | 853 | "max_power_kw": 30.0, |
824 | | - "sensors": (HYBRID_3P_SENSORS | PV3_SENSORS | BACKUP_BOX_SENSORS) - NO_BATTERY_TEMP, |
| 854 | + "sensors": ((HYBRID_3P_SENSORS | PV3_SENSORS | BACKUP_BOX_SENSORS | DCDC_TEMP_SENSOR) |
| 855 | + - NO_BATTERY_TEMP), |
825 | 856 | }, |
826 | 857 |
|
827 | 858 | # ======================================================================== |
|
0 commit comments