{"id":30496223,"url":"https://github.com/medialabuniovi/ventanaiotapp","last_synced_at":"2025-08-25T01:23:24.915Z","repository":{"id":307465329,"uuid":"1029594821","full_name":"MediaLabUniovi/ventanaiotapp","owner":"MediaLabUniovi","description":"React Native + expo mobile APP","archived":false,"fork":false,"pushed_at":"2025-07-31T09:52:26.000Z","size":691,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-31T13:16:56.669Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MediaLabUniovi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-31T09:25:01.000Z","updated_at":"2025-07-31T09:52:29.000Z","dependencies_parsed_at":"2025-07-31T13:28:08.305Z","dependency_job_id":null,"html_url":"https://github.com/MediaLabUniovi/ventanaiotapp","commit_stats":null,"previous_names":["medialabuniovi/ventanaiotapp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/MediaLabUniovi/ventanaiotapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaLabUniovi%2Fventanaiotapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaLabUniovi%2Fventanaiotapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaLabUniovi%2Fventanaiotapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaLabUniovi%2Fventanaiotapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MediaLabUniovi","download_url":"https://codeload.github.com/MediaLabUniovi/ventanaiotapp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MediaLabUniovi%2Fventanaiotapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271990552,"owners_count":24854703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-25T01:23:23.012Z","updated_at":"2025-08-25T01:23:24.903Z","avatar_url":"https://github.com/MediaLabUniovi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/a5c3c3be-563e-4179-afa5-3941372ae835\" width=\"300\"/\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/7bcad705-e5a8-40a5-83cf-ca03bca8bd80\" width=\"300\"/\u003e\n\u003c/p\u003e\n\n\n\n---\n\n#  App de Control sistema de ventilación inteligente (React Native + Expo)\n\nEste proyecto es una **aplicación móvil desarrollada con React Native y Expo** que permite controlar un mecanismo de apertura/cierre de una ventana mediante el protocolo **MQTT**.\n\nLa app se comunica con un microcontrolador **ESP32** que ejecuta la lógica física del sistema.\n\n---\n\n##  Funcionalidades principales\n\n* Conectar con un broker MQTT (público o privado).\n* Abrir o cerrar la ventana manualmente (0–100%).\n* Activar o desactivar el modo automático.\n* Configurar tramos horarios y parámetros del algoritmo de apertura.\n* Recibir el estado actual del mecanismo en tiempo real.\n\n---\n\n##  Estructura destacada del proyecto\n\n* **`/services/mqttService.ts`**:\n  Archivo central que gestiona la conexión con el broker MQTT, la suscripción a los topics y la publicación de mensajes desde cualquier pantalla.\n\n* **Pantallas principales**:\n\n  * `HomeScreen.tsx`: Control de la ventana en tiempo real.\n  * `SettingsScreen.tsx`: Configuración de horarios, modo automático y pesos del algoritmo.\n\n---\n\n##  Configuración de `mqttService.ts`\n\nAntes de ejecutar la app, debes configurar el archivo **`/services/mqttService.ts`** con los datos de tu broker MQTT:\n\n```ts\nconst WS_HOST = 'wss://\u003ctu-broker-mqtt\u003e:\u003cpuerto\u003e';\nconst MQTT_USER = '\u003cusuario\u003e';\nconst MQTT_PASS = '\u003ccontraseña\u003e';\n\nexport const client: MqttClient = mqtt.connect(WS_HOST, {\n  username: MQTT_USER,\n  password: MQTT_PASS,\n  keepalive: 60,\n  reconnectPeriod: 2000,\n  clientId: 'expo-' + Date.now(),\n});\n```\n\n### Topics usados\n\n* **Publicación**:\n\n  * `casa/ventana/cmd` → posición de la ventana (0–100)\n  * `casa/ventana/modo/estado` → `\"auto\"` / `\"manual\"`\n  * `casa/ventana/horario/*` → configuración de horarios\n  * `casa/ventana/peso/*` → parámetros del algoritmo\n\n* **Suscripción**:\n\n  * `casa/ventana/estado` → posición actual\n  * `casa/ventana/modo/estado` → estado del modo\n  * `casa/ventana/evento` → eventos o notificaciones desde el ESP32\n\n---\n\n##  Ejecución del proyecto\n\n1. Instalar dependencias:\n\n   ```bash\n   npm install\n   ```\n\n2. Iniciar Expo:\n\n   ```bash\n   npx expo start\n   ```\n\n3. Escanear el código QR con la app **Expo Go** en el móvil o ejecutar en un emulador.\n\n---\n\n## Requisitos\n\n* Node.js \u003e= 16\n* Expo CLI\n* Un broker MQTT (p. ej. [Mosquitto](https://test.mosquitto.org/) o [HiveMQ Cloud](https://www.hivemq.com/cloud/)) activo.\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedialabuniovi%2Fventanaiotapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmedialabuniovi%2Fventanaiotapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedialabuniovi%2Fventanaiotapp/lists"}