diff --git a/main.py b/main.py index ec63ec5..0825366 100644 --- a/main.py +++ b/main.py @@ -47,8 +47,10 @@ def main(): shutdown_triggered = False while running: line = ser.readline().decode(errors="ignore").strip() - - if line == "0": + if line == "": + logger.warning("No serial data") + continue + elif line == "0": logger.debug("Inverter Online") inverter_offline_counter = 0 elif inverter_offline_counter >= shutdown_timer: