Skip to content

Commit

Permalink
reduce inverterpower enable/disable
Browse files Browse the repository at this point in the history
## 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`
  • Loading branch information
reserve85 authored Mar 1, 2024
1 parent 449bd43 commit 4093497
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 4 additions & 3 deletions HoymilesZeroExport.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

__author__ = "Tobias Kraft"
__version__ = "1.80"
__version__ = "1.81"

import requests
import time
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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')
Expand Down
6 changes: 4 additions & 2 deletions HoymilesZeroExport_Config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# ---------------------------------------------------------------------
# --- 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) ---
Expand Down Expand Up @@ -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 ---
Expand Down

0 comments on commit 4093497

Please sign in to comment.