Beginning of cooking cycle
Build, push image, and notify Watchtower / build-image (push) Successful in 1m21s
Build, push image, and notify Watchtower / notify (push) Successful in 17s

This commit is contained in:
2026-07-31 21:50:42 +02:00
parent 8ac5db22c1
commit 7299a50198
11 changed files with 552 additions and 86 deletions
+9
View File
@@ -1,5 +1,6 @@
import grovepi
import math
import time
from sensors.lock import grove_lock
# Connect the Grove Temperature & Humidity Sensor Pro to digital port D3
@@ -20,3 +21,11 @@ def get_temperature_and_humidity():
else:
print("Error reading from DHT sensor")
return None, None
def get_temperature_and_humidity_with_retry(max_retries=3):
for _ in range(max_retries): # Try up to max_retries times
temp, humidity = get_temperature_and_humidity()
if temp is not None and humidity is not None:
return temp, humidity
time.sleep(1) # Wait a bit before retrying
return None, None