diff --git a/CHANGELOG.md b/CHANGELOG.md
index 375797b..c7a0bf8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog
+## V1.81
+### script
+* add option to enable/disable to set the inverter to min watts when the powermeter can´t be read out. https://github.com/reserve85/HoymilesZeroExport/issues/28#issuecomment-1967306742 + https://github.com/reserve85/HoymilesZeroExport/issues/74
+### config
+* add `COMMON`: `SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR`
+
## V1.80
### script
* add ESPHome for intermediate power meter
diff --git a/HoymilesZeroExport.py b/HoymilesZeroExport.py
index 1286ab3..773b35a 100644
--- a/HoymilesZeroExport.py
+++ b/HoymilesZeroExport.py
@@ -15,7 +15,7 @@
# along with this program. If not, see .
__author__ = "Tobias Kraft"
-__version__ = "1.80"
+__version__ = "1.81"
import requests
import time
@@ -379,7 +379,7 @@ def GetHoymilesActualPower():
logger.info(f"intermediate meter {DTU.__class__.__name__}: {Watts} Watt")
except:
logger.error("Exception at GetHoymilesActualPower")
- if GetBatteryMode:
+ if SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR:
SetLimit(0)
raise
@@ -390,7 +390,7 @@ def GetPowermeterWatts():
return Watts
except:
logger.error("Exception at GetPowermeterWatts")
- if GetBatteryMode:
+ if SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR:
SetLimit(0)
raise
@@ -1126,6 +1126,7 @@ def CreateDTU() -> DTU:
SET_POWERSTATUS_CNT = config.getint('COMMON', 'SET_POWERSTATUS_CNT')
SLOW_APPROX_FACTOR_IN_PERCENT = config.getint('COMMON', 'SLOW_APPROX_FACTOR_IN_PERCENT')
LOG_TEMPERATURE = config.getboolean('COMMON', 'LOG_TEMPERATURE')
+SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR = config.getboolean('COMMON', 'SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR', fallback=False)
POWERMETER_TARGET_POINT = config.getint('CONTROL', 'POWERMETER_TARGET_POINT')
POWERMETER_TOLERANCE = config.getint('CONTROL', 'POWERMETER_TOLERANCE')
POWERMETER_MAX_POINT = config.getint('CONTROL', 'POWERMETER_MAX_POINT')
diff --git a/HoymilesZeroExport_Config.ini b/HoymilesZeroExport_Config.ini
index 96ed3a1..e33c3d4 100644
--- a/HoymilesZeroExport_Config.ini
+++ b/HoymilesZeroExport_Config.ini
@@ -15,11 +15,11 @@
# along with this program. If not, see .
# ---------------------------------------------------------------------
-# --- DO NOT DELETE ANY ENTRIES HERE - else your script won´t start ---
+# --- DO NOT DELETE ANY ENTRIES HERE - else your script won't start ---
# ---------------------------------------------------------------------
[VERSION]
-VERSION = 1.80
+VERSION = 1.81
[SELECT_DTU]
# --- define your DTU (only one) ---
@@ -220,6 +220,8 @@ SET_POWERSTATUS_CNT = 10
LOG_TEMPERATURE = false
# delay time after turning the inverter off or on
SET_POWER_STATUS_DELAY_IN_SECONDS = 10
+# define if you want to set your inverter to min-limit when your powermeter can't be read out
+SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR = false
[CONTROL]
# --- global defines for control behaviour ---