From 7e7545761ebd6354f47ed236dafab2e14db11da2 Mon Sep 17 00:00:00 2001 From: reserve85 Date: Fri, 13 Sep 2024 14:12:53 +0200 Subject: [PATCH] OpenDTU: check "producing" OpenDTU: check for "producing" -> try to fix https://github.com/reserve85/HoymilesZeroExport/issues/242 and https://github.com/reserve85/HoymilesZeroExport/issues/211 --- CHANGELOG.md | 4 ++++ HoymilesZeroExport.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c8e364..785855b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## V 1.104 +### script +* OpenDTU: check for "producing" -> try to fix https://github.com/reserve85/HoymilesZeroExport/issues/242 and https://github.com/reserve85/HoymilesZeroExport/issues/211 + ## V 1.103 ### script * removed SetLimit, SetLimitWithPriority -> only one Function for SetLimit (same routine for mixed mode, battery mode, non battery mode) diff --git a/HoymilesZeroExport.py b/HoymilesZeroExport.py index d99b2b1..2d11c9f 100644 --- a/HoymilesZeroExport.py +++ b/HoymilesZeroExport.py @@ -15,7 +15,7 @@ # along with this program. If not, see . __author__ = "Tobias Kraft" -__version__ = "1.103" +__version__ = "1.104" import time from requests.sessions import Session @@ -1007,7 +1007,7 @@ def CheckMinVersion(self): def GetAvailable(self, pInverterId: int): ParsedData = self.GetJson(f'/api/livedata/status?inv={SERIAL_NUMBER[pInverterId]}') - Reachable = bool(ParsedData['inverters'][0]["reachable"]) + Reachable = bool(ParsedData['inverters'][0]["reachable"]) and bool(ParsedData['inverters'][0]["producing"]) logger.info('OpenDTU: Inverter "%s" reachable: %s',NAME[pInverterId],Reachable) return Reachable