Compare commits

..

3 Commits

Author SHA1 Message Date
Ninluc e68ffd9b8b Fix
Build, push image, and notify Watchtower / build-image (push) Successful in 43s
Build, push image, and notify Watchtower / notify (push) Successful in 10s
2026-08-25 20:07:38 +02:00
Ninluc 49fd566457 Idk
Build, push image, and notify Watchtower / build-image (push) Successful in 48s
Build, push image, and notify Watchtower / notify (push) Successful in 10s
2026-08-25 20:01:36 +02:00
Ninluc dd37465546 OOpsie
Build, push image, and notify Watchtower / build-image (push) Successful in 50s
Build, push image, and notify Watchtower / notify (push) Successful in 13s
2026-08-25 19:23:10 +02:00
4 changed files with 13 additions and 12 deletions
+8 -8
View File
@@ -911,15 +911,15 @@ class EdamamAPI:
""")
url = "https://api.edamam.com/api/vision/v1/nutrients"
url = "https://api.edamam.com/api/vision/v1/nutrients?app_id=09cb5bd7&app_key=8b2730f3c7f4f075cc939da3fa0c49fb&beta=true&servings=1"
# Query parameters as specified by the YAML schema
params = {
"app_id": EDAMAM_APP_ID__FOOD,
"app_key": EDAMAM_APP_KEY__FOOD,
"beta": "true" # Recommended since vision is in Beta
}
print("params:", params)
# params = {
# "app_id": EDAMAM_APP_ID__FOOD,
# "app_key": EDAMAM_APP_KEY__FOOD,
# "beta": "true" # Recommended since vision is in Beta
# }
# print("params:", params)
# Specify the media type in the header
headers = {
@@ -932,7 +932,7 @@ class EdamamAPI:
response = requests.post(
url,
params=params,
# params=params,
headers=headers,
data=raw_image_bytes
)
+3 -2
View File
@@ -1,6 +1,7 @@
import cv2
import numpy as np
from typing import Dict, Any, Optional
import sys
sys.path.insert(0, '..')
try:
from shared import config
@@ -80,13 +81,13 @@ class MicrowaveDishAnalyzer:
return 0.85 # Default factor for plated meals
def estimate_volume(
self, image_path: str, height_cm: float, food_label: str = "", config: Optional[Any] = None
self, image_path: str, height_cm: float, food_label: str = ""
) -> Dict[str, float]:
"""
Computes total physical volume in cm³ (mL).
Volume = Area (cm²) * Height (cm) * Shape Factor
"""
area_cm2 = self.calculate_surface_area_cm2(image_path, config=config)
area_cm2 = self.calculate_surface_area_cm2(image_path)
k_shape = self._get_shape_factor(food_label)
volume_cm3 = area_cm2 * height_cm * k_shape
+1 -1
View File
@@ -480,7 +480,7 @@ async def on_new_alert(alert: Alert):
# Send the alert to the lora device
payload = payloads.lora_new_alert(alert)
print(f"[Alert Handling] Sending alert to LoRa device: {payload}")
if lora.send_reliable(payload):
if lora.send_reliable(payload, max_retries=7):
microwave_states["2"].set_cooking_state(CookingStates.ALERT)
# --- HARDWARE CONTROLLERS ---
+1 -1
View File
@@ -81,7 +81,7 @@ class BaseLoraDevice:
return packet
def send_reliable(self, payload, max_retries=4, ack_timeout=3.0):
def send_reliable(self, payload, max_retries=5, ack_timeout=3.0):
"""Sends a payload and listens in a single continuous RX window for the ACK."""
with self.tx_lock: