Skip to content

Commit

Permalink
Merge pull request #236 from reserve85/dev
Browse files Browse the repository at this point in the history
Bugfix newLimitSetpoint
  • Loading branch information
reserve85 authored Aug 29, 2024
2 parents fa1f5f6 + 4d1a653 commit 4690307
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## V 1.101
### script
* Bugfix newLimitSetpoint for OpenDTU (https://github.com/reserve85/HoymilesZeroExport/issues/235)

## V 1.100
### script
* improve startup: init newLimitSetpoint
Expand Down
8 changes: 4 additions & 4 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.100"
__version__ = "1.101"

import time
from requests.sessions import Session
Expand Down Expand Up @@ -1109,6 +1109,8 @@ def CheckMinVersion(self):
MinVersion = 'v24.2.12'
ParsedData = self.GetJson('/api/system/status')
OpenDTUVersion = str((ParsedData["git_hash"]))
if ("-Database" in OpenDTUVersion): #trim string "v24.5.27-Database"
OpenDTUVersion = OpenDTUVersion.replace("-Database", "")
logger.info('OpenDTU: Current Version: %s',OpenDTUVersion)
if version.parse(OpenDTUVersion) < version.parse(MinVersion):
logger.error('Error: Your OpenDTU Version is too old! Please update at least to Version %s - you can find the newest dev-releases here: https://github.com/tbnobody/OpenDTU/actions',MinVersion)
Expand Down Expand Up @@ -1614,7 +1616,7 @@ def emit(self, record):

try:
logger.info("---Init---")

newLimitSetpoint = 0
DTU.CheckMinVersion()
if GetHoymilesAvailable():
for i in range(INVERTER_COUNT):
Expand All @@ -1623,8 +1625,6 @@ def emit(self, record):
SetLimit(newLimitSetpoint)
GetHoymilesActualPower()
GetCheckBattery()
else:
newLimitSetpoint = 0
GetPowermeterWatts()
except Exception as e:
if hasattr(e, 'message'):
Expand Down

0 comments on commit 4690307

Please sign in to comment.