{"id":24955407,"url":"https://github.com/fernandosilvot/app-iot_genai","last_synced_at":"2026-05-04T02:33:10.052Z","repository":{"id":274520242,"uuid":"920137284","full_name":"fernandosilvot/App-IoT_GenAI","owner":"fernandosilvot","description":"Este proyecto muestra cómo conectar un ESP8266 con AWS IoT Core y usar MQTT para enviar datos de un sensor DHT22. Además, aprovecha Amazon Bedrock para generar chistes en respuesta a la temperatura.","archived":false,"fork":false,"pushed_at":"2025-01-27T19:23:00.000Z","size":10912,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T20:15:47.843Z","etag":null,"topics":["aws","aws-iot-core","aws-lambda","esp8266-projects","ino","python-lambda"],"latest_commit_sha":null,"homepage":"https://dev.to/aws-espanol/integracion-iot-y-generative-ai-como-crear-una-app-que-cuenta-chistes-basados-en-la-temperatura-522","language":"C++","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/fernandosilvot.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}},"created_at":"2025-01-21T16:19:12.000Z","updated_at":"2025-01-27T19:25:37.000Z","dependencies_parsed_at":"2025-01-27T20:41:22.638Z","dependency_job_id":null,"html_url":"https://github.com/fernandosilvot/App-IoT_GenAI","commit_stats":null,"previous_names":["fernandosilvot/app-iot_genai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandosilvot%2FApp-IoT_GenAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandosilvot%2FApp-IoT_GenAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandosilvot%2FApp-IoT_GenAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandosilvot%2FApp-IoT_GenAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fernandosilvot","download_url":"https://codeload.github.com/fernandosilvot/App-IoT_GenAI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093179,"owners_count":20722403,"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","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":["aws","aws-iot-core","aws-lambda","esp8266-projects","ino","python-lambda"],"created_at":"2025-02-03T06:00:32.687Z","updated_at":"2026-05-04T02:33:10.020Z","avatar_url":"https://github.com/fernandosilvot.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blog Completo sobre AWS IoT y ESP8266\n\n## Introducción\nEste proyecto muestra cómo conectar un ESP8266 con AWS IoT Core y usar MQTT para enviar datos de un sensor DHT22. Además, aprovecha Amazon Bedrock para generar chistes en respuesta a la temperatura. Para más detalles, consulta el blog en:\n[Dev.to](https://dev.to/aws-espanol/integracion-iot-y-generative-ai-como-crear-una-app-que-cuenta-chistes-basados-en-la-temperatura-522)\n\n## Primera Versión\nhttps://github.com/user-attachments/assets/466705de-48ce-4d27-9cfa-25a68d369923\n\n## Versión Final\nhttps://github.com/user-attachments/assets/ccf6148a-5d03-41e3-996d-c1ffeac1d18d\n\n## Requisitos\n- Módulo ESP8266 (con WiFi)  \n- Sensor DHT22  \n- LED, resistencias y cables  \n- Pantalla OLED opcional (SSD1306)  \n- Arduino IDE con librerías (PubSubClient, ArduinoJson, etc.)  \n- Certificados y llaves provistos por AWS IoT  \n- Cuenta en AWS con IoT Core y Lambda activados  \n\n## Pasos Principales\n1. **Crear un objeto en AWS IoT Core**  \n   - Crear y configurar el objeto.  \n   - Generar certificados y política con acciones esenciales (Connect, Publish, Receive, Subscribe).  \n   - Guardar endpoint, Device Certificate y Private Key.\n\n2. **Configurar Arduino IDE**  \n   - Añadir soporte para ESP8266 en el “Gestor de URLs adicionales”.  \n   - Instalar librerías necesarias.  \n   - Crear “Main.ino” y “env.h” con el código y certificados.\n\n3. **Instalar drivers y subir el sketch**  \n   - Instalar drivers CP210x o CH340.  \n   - Subir el código al ESP8266 con la configuración de WiFi y MQTT.\n\n4. **Crear Lambda e IAM Role**  \n   - Crear función Lambda (Python 3.x).  \n   - Asignar rol con permisos (AmazonBedrockFullAccess, AWSIoTFullAccess).  \n   - Añadir disparador “AWS IoT” con regla para filtrar datos (p.ej., temperatura \u003e 30).\n\n5. **Incluir lógica en el código**  \n   - “Main.ino” maneja publicación y suscripción MQTT.  \n   - “lambda.py” usa Amazon Bedrock para generar chistes y enviarlos por MQTT.\n\n## Funcionamiento\n- El ESP8266 publica temperatura y humedad en “esp8266/pub”.  \n- AWS IoT invoca Lambda si la temperatura supera el umbral.  \n- Lambda genera un chiste y lo envía a “esp8266/joke”.  \n- El ESP8266 muestra el chiste en la pantalla OLED o por monitor serial.\n\n## Conclusiones\nCon MQTT y Lambda, este flujo es confiable y rentable. La clave está en configurar certificados, aprovechar Amazon Bedrock y unir IoT con Generative AI en un solo proyecto.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandosilvot%2Fapp-iot_genai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffernandosilvot%2Fapp-iot_genai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandosilvot%2Fapp-iot_genai/lists"}