File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## V 1.96
4+ ### script
5+ * bugfix: value of HOY_BATTERY_AVERAGE_CNT was ignored
6+
37## V1.95
48### script
59* publish an online/offline status message to MQTT
Original file line number Diff line number Diff line change 1515# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
1717__author__ = "Tobias Kraft"
18- __version__ = "1.95 "
18+ __version__ = "1.96 "
1919
2020import time
2121from requests .sessions import Session
@@ -397,7 +397,7 @@ def GetHoymilesPanelMinVoltage(pInverterId):
397397 HOY_PANEL_MIN_VOLTAGE_HISTORY_LIST [pInverterId ].append (DTU .GetPanelMinVoltage (pInverterId ))
398398
399399 # calculate mean over last x values
400- if len (HOY_PANEL_MIN_VOLTAGE_HISTORY_LIST [pInverterId ]) > 5 :
400+ if len (HOY_PANEL_MIN_VOLTAGE_HISTORY_LIST [pInverterId ]) > HOY_BATTERY_AVERAGE_CNT [ pInverterId ] :
401401 HOY_PANEL_MIN_VOLTAGE_HISTORY_LIST [pInverterId ].pop (0 )
402402 from statistics import mean
403403
@@ -1439,7 +1439,7 @@ def CreateDTU() -> DTU:
14391439 HOY_BATTERY_IGNORE_PANELS .append (config .get ('INVERTER_' + str (i + 1 ), 'HOY_BATTERY_IGNORE_PANELS' ))
14401440 HOY_PANEL_VOLTAGE_LIST .append ([])
14411441 HOY_PANEL_MIN_VOLTAGE_HISTORY_LIST .append ([])
1442- HOY_BATTERY_AVERAGE_CNT .append (config .getint ('INVERTER_' + str (i + 1 ), 'HOY_BATTERY_AVERAGE_CNT' ))
1442+ HOY_BATTERY_AVERAGE_CNT .append (config .getint ('INVERTER_' + str (i + 1 ), 'HOY_BATTERY_AVERAGE_CNT' , fallback = 1 ))
14431443SLOW_APPROX_LIMIT = CastToInt (GetMaxWattFromAllInverters () * config .getint ('COMMON' , 'SLOW_APPROX_LIMIT_IN_PERCENT' ) / 100 )
14441444
14451445CONFIG_PROVIDER = ConfigFileConfigProvider (config )
You can’t perform that action at this time.
0 commit comments