Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,6 +40,7 @@ def obtener_datos_colmena():
|
|
40 |
respuesta = requests.get(NODE_RED_URL, auth=(USERNAME, PASSWORD), timeout=5)
|
41 |
if respuesta.status_code == 200:
|
42 |
datos = respuesta.json()
|
|
|
43 |
if "data" in datos and isinstance(datos["data"], list) and datos["data"]:
|
44 |
return datos["data"][-1] # Último registro
|
45 |
return {"error": "No hay datos recientes en Node-RED."}
|
|
|
40 |
respuesta = requests.get(NODE_RED_URL, auth=(USERNAME, PASSWORD), timeout=5)
|
41 |
if respuesta.status_code == 200:
|
42 |
datos = respuesta.json()
|
43 |
+
print("🔍 Datos recibidos de Node-RED:", datos) # <-- Agregamos este print()
|
44 |
if "data" in datos and isinstance(datos["data"], list) and datos["data"]:
|
45 |
return datos["data"][-1] # Último registro
|
46 |
return {"error": "No hay datos recientes en Node-RED."}
|