fix: setpoint clamp, thread safety, error handling, real-time kWh counters; cleanup repo

This commit is contained in:
bart
2026-11-11 18:57:25 +01:00
parent 0b17034b68
commit 651676afda
12 changed files with 89 additions and 27996 deletions
+6 -3
View File
@@ -51,13 +51,13 @@ mqtt = mqtthandler.handler(cm)
if 'battery_total' in config:
try:
cm.set_battery_total_net_delivery(float(config['battery_total']['net_delivery']))
except:
except Exception:
logger.error("Unable to load net_delivery {}".format(config['battery_total']['net_delivery']))
exit()
try:
cm.set_battery_total_net_usage(float(config['battery_total']['net_usage']))
except:
except Exception:
logger.error("Unable to load net_usage {}".format(config['battery_total']['net_usage']))
exit()
@@ -113,7 +113,10 @@ def update():
def main():
while True:
update()
try:
update()
except Exception:
logger.exception("Update failed, retrying next cycle")
time.sleep(10)