Skip to content

Commit 4093497

Browse files
authored
reduce inverterpower enable/disable
## V1.81 ### script * add option to enable/disable to set the inverter to min watts when the powermeter can´t be read out. #28 (comment) + #74 ### config * add `COMMON`: `SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR`
1 parent 449bd43 commit 4093497

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## V1.81
4+
### script
5+
* 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
6+
### config
7+
* add `COMMON`: `SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR`
8+
39
## V1.80
410
### script
511
* add ESPHome for intermediate power meter

HoymilesZeroExport.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

1717
__author__ = "Tobias Kraft"
18-
__version__ = "1.80"
18+
__version__ = "1.81"
1919

2020
import requests
2121
import time
@@ -379,7 +379,7 @@ def GetHoymilesActualPower():
379379
logger.info(f"intermediate meter {DTU.__class__.__name__}: {Watts} Watt")
380380
except:
381381
logger.error("Exception at GetHoymilesActualPower")
382-
if GetBatteryMode:
382+
if SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR:
383383
SetLimit(0)
384384
raise
385385

@@ -390,7 +390,7 @@ def GetPowermeterWatts():
390390
return Watts
391391
except:
392392
logger.error("Exception at GetPowermeterWatts")
393-
if GetBatteryMode:
393+
if SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR:
394394
SetLimit(0)
395395
raise
396396

@@ -1126,6 +1126,7 @@ def CreateDTU() -> DTU:
11261126
SET_POWERSTATUS_CNT = config.getint('COMMON', 'SET_POWERSTATUS_CNT')
11271127
SLOW_APPROX_FACTOR_IN_PERCENT = config.getint('COMMON', 'SLOW_APPROX_FACTOR_IN_PERCENT')
11281128
LOG_TEMPERATURE = config.getboolean('COMMON', 'LOG_TEMPERATURE')
1129+
SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR = config.getboolean('COMMON', 'SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR', fallback=False)
11291130
POWERMETER_TARGET_POINT = config.getint('CONTROL', 'POWERMETER_TARGET_POINT')
11301131
POWERMETER_TOLERANCE = config.getint('CONTROL', 'POWERMETER_TOLERANCE')
11311132
POWERMETER_MAX_POINT = config.getint('CONTROL', 'POWERMETER_MAX_POINT')

HoymilesZeroExport_Config.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

1717
# ---------------------------------------------------------------------
18-
# --- DO NOT DELETE ANY ENTRIES HERE - else your script won´t start ---
18+
# --- DO NOT DELETE ANY ENTRIES HERE - else your script won't start ---
1919
# ---------------------------------------------------------------------
2020

2121
[VERSION]
22-
VERSION = 1.80
22+
VERSION = 1.81
2323

2424
[SELECT_DTU]
2525
# --- define your DTU (only one) ---
@@ -220,6 +220,8 @@ SET_POWERSTATUS_CNT = 10
220220
LOG_TEMPERATURE = false
221221
# delay time after turning the inverter off or on
222222
SET_POWER_STATUS_DELAY_IN_SECONDS = 10
223+
# define if you want to set your inverter to min-limit when your powermeter can't be read out
224+
SET_INVERTER_TO_MIN_ON_POWERMETER_ERROR = false
223225

224226
[CONTROL]
225227
# --- global defines for control behaviour ---

0 commit comments

Comments
 (0)