implement healthcheck
This commit is contained in:
@@ -10,6 +10,7 @@ import backoff
|
||||
from suntime import Sun
|
||||
import goodwe
|
||||
import paho.mqtt.client as mqtt
|
||||
from pathlib import Path
|
||||
|
||||
# -----------------------------
|
||||
# CONFIGURATION
|
||||
@@ -125,6 +126,8 @@ async def main_loop():
|
||||
return await goodwe.connect(ip)
|
||||
|
||||
while True:
|
||||
Path("/tmp/healthy").touch()
|
||||
|
||||
if not is_operational_hours():
|
||||
mqtt_log.info("Outside operational hours (Night). Sleeping 10m.")
|
||||
active_inverter = None
|
||||
|
||||
Reference in New Issue
Block a user