{"config":{"api_endpoint":"/iot/sensor/api/temperature","environment":"production","timezone":null,"version":"2.5.0","rate_limit_enabled":true,"rate_limit_requests":60,"rate_limit_period":60,"max_query_limit":1000,"default_query_limit":100,"sensor_validation_strict":true,"temperature_range":{"min":null,"max":null},"maintenance_mode":false,"auto_register_devices":true,"default_device_type":"esp8266","supported_sensor_types":["temperature","switch","pir"],"timestamp":"2026-05-16 15:36:48"},"supported_methods":["GET","POST","OPTIONS"],"endpoints":{"POST /":"Insert sensor data (ESP8266 V1 format)","GET /status":"System status and statistics","GET /health":"Health check endpoint","GET /metrics":"Application metrics (add ?format=prometheus for Prometheus format)","GET /config":"Configuration information","GET /data":"Retrieve sensor data with optional filters","GET /dispositivos":"Get devices and their sensors with optional filters","GET /valores":"Get latest value for a specific sensor (device_id and sensor_name required)"},"esp8266_format":{"required_fields":["device_id","readings[]"],"reading_structure":{"temperature_sensor":{"sensor_name":"string","type":"temperature","temperature":"float","unit":"string (C/F)","status":"connected/disconnected/error/out_of_range"},"switch_sensor":{"sensor_name":"string","type":"switch","state":"integer (0 or 1)","voltage":"string (0V or 3.3V)","state_changed":"boolean","sensor_subtype":"string (optional, e.g., MAGNETIC)"},"pir_sensor":{"sensor_name":"string","type":"pir","state":"integer (0 or 1)","voltage":"string (0V or 3.3V)","state_changed":"boolean","sensor_subtype":"string (optional, e.g., PIR)","motion_detected":"boolean (optional)"}}},"filters_dispositivos":{"?activos=true/false":"Filtrar por estado activo","?tipo_dispositivo=esp8266":"Filtrar por tipo de dispositivo","?desde=YYYY-MM-DD":"Dispositivos conectados desde fecha","?hasta=YYYY-MM-DD":"Dispositivos conectados hasta fecha","?con_sensores=true/false":"Solo dispositivos con sensores","?limit=50":"Límite de resultados (default: 50)","?offset=0":"Paginación","?order_by=ultima_conexion":"Campo para ordenar","?order_dir=ASC/DESC":"Dirección del orden"}}