Fix bug
Build, push image, and notify Watchtower / build-image (push) Successful in 48s
Build, push image, and notify Watchtower / notify (push) Successful in 11s

This commit is contained in:
2026-08-17 17:28:47 +02:00
parent 44a6be9090
commit 50eb4fe87c
+5 -3
View File
@@ -300,7 +300,7 @@ def on_new_alert(alert: Alert):
# Sends to cloud server
alert_dict = alert.to_dict()
logs_list = get_systemd_logs(lines=200, service_name="smartwave")
logs_list = asyncio.run(get_systemd_logs(lines=200, service_name="smartwave"))
payload = {
"orchestrator_id": DEVICE_ID,
@@ -349,9 +349,11 @@ def read_local_sensors(microwave_id, initial_dish_height):
print(f"[{microwave_id}] ALERT: Unsafe temperature in technical compartment detected! Temp: {temp}°C, Humidity: {hum}%")
alert = Alert(
AlertType.TEMPERATURE_ALERT,
f"Unsafe temperature in technical compartment detected! Temp: {temp}/{config.MAX_ALLOWED_TEMPERATURE_COOKING_COMPARTMENT}°C, Humidity: {hum}%"
f"Unsafe temperature in technical compartment detected! Temp: {temp}/{config.MAX_ALLOWED_TEMPERATURE_COOKING_COMPARTMENT}°C, Humidity: {hum}%",
redistributed=False
)
lora.send_reliable(payloads.lora_new_alert(alert), max_retries=5)
# lora.send_reliable(payloads.lora_new_alert(alert), max_retries=5)
alert_manager.add_alert(alert)
return None # Abort further processing if unsafe temperature detected
except Exception as e:
log(f"[{microwave_id}] DHT read warning: {e}")