Skip to content

Commit

Permalink
OpenDTU: check "producing"
Browse files Browse the repository at this point in the history
OpenDTU: check for "producing" -> try to fix #242 and #211
  • Loading branch information
reserve85 committed Sep 13, 2024
1 parent 4bc09c3 commit 7e75457
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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.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)
Expand Down
4 changes: 2 additions & 2 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.103"
__version__ = "1.104"

import time
from requests.sessions import Session
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 7e75457

Please sign in to comment.