{"id":29448426,"url":"https://github.com/dchoi98/iot-water-valve","last_synced_at":"2026-04-15T05:31:37.538Z","repository":{"id":303020817,"uuid":"1014016250","full_name":"dchoi98/iot-water-valve","owner":"dchoi98","description":"This repository provides hardware designs and software for an ESP32-based water-valve controller and its Android companion app. It utilizes secure MQTT communication via Adafruit IO for real-time control of the valve from anywhere, with built-in leak detection and emergency shutoff.","archived":false,"fork":false,"pushed_at":"2025-10-21T03:31:48.000Z","size":5524,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-21T05:32:53.494Z","etag":null,"topics":["android","arduino","cpp","esp32","home-automation","iot","kotlin","mqtt"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cern-ohl-s-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dchoi98.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-CERN-OHL-S.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-04T22:08:02.000Z","updated_at":"2025-10-21T03:31:51.000Z","dependencies_parsed_at":"2025-10-21T05:34:40.835Z","dependency_job_id":null,"html_url":"https://github.com/dchoi98/iot-water-valve","commit_stats":null,"previous_names":["dchoi98/iot-water-valve-software","dchoi98/iot-water-valve"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dchoi98/iot-water-valve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchoi98%2Fiot-water-valve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchoi98%2Fiot-water-valve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchoi98%2Fiot-water-valve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchoi98%2Fiot-water-valve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dchoi98","download_url":"https://codeload.github.com/dchoi98/iot-water-valve/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dchoi98%2Fiot-water-valve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31828530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"online","status_checked_at":"2026-04-15T02:00:06.175Z","response_time":63,"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":["android","arduino","cpp","esp32","home-automation","iot","kotlin","mqtt"],"created_at":"2025-07-13T19:01:28.390Z","updated_at":"2026-04-15T05:31:37.528Z","avatar_url":"https://github.com/dchoi98.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoT Water Valve\nThis project includes an ESP32-based water-valve controller and its Android companion app. It utilizes secure MQTT communication via Adafruit IO for real-time control of the valve from anywhere, with built-in leak detection and emergency shutoff. Design decisions and FMEA are explained in ```design_decisions.md``` and ```reliability_and_safety.md``` in ```docs/```.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/external_view.jpg\" alt=\"Assembled water valve controller\" width=\"400\"/\u003e\n  \u003cimg src=\"images/internal_view.jpg\" alt=\"Internal view of the water valve controller\" width=\"400\"/\u003e\n\u003c/p\u003e\n\n## Key Features\n- ESP32-C3 SuperMini microcontroller\n- Remote control via Android app over WiFi\n- Adafruit IO MQTT integration over TLS\n- OTA (Over-The-Air) firmware updates\n- Water leak detection with push notifications and automatic shutoff\n- Solar-powered with 18650 Li-ion battery\n- Low-power design for continuous operation\n- 30-minute auto-shutoff timer when valve opened\n- Soft-latching circuit with manual power-off capability\n- Weatherproof enclosure with sunshade\n\n## Specifications\n- ~60 mA average current draw\n- 200 mA maximum charge rate from solar panel; 1 A charge rate from USB cable\n- 2500 mAh battery\n- Operating temperature: 4–40 °C\n\n## Quick Start Guide\n### 1. Adafruit IO Configuration\n1. Create an account at https://io.adafruit.com\n2. Navigate to Feeds and create three new feeds:\n    - ```valve-ack```\n    - ```valve-control```\n    - ```water-sensor```\n3. Note your username and active key (yellow key icon in header)\n\n### 2. Hardware Assembly\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/cad_exploded_view.jpg\" alt=\"Exploded view of the water valve controller\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n1. Order PCB from JLCPCB using provided gerber files\n2. 3D print required parts (frame, valve coupler, sunshade, gasket)\n3. Drill enclosure holes per specifications\n4. Assemble components following detailed instructions in hardware_assembly.md\n\n### 3. Firmware Flashing\n1. Create ```esp32-firmware/esp32_secrets.h```\n    ```\n    #define SECRET_AIO_USER \"your_username\"\n    #define SECRET_AIO_KEY \"your_key\"\n    constexpr const char* SECRET_WIFI_SSID = \"your_ssid\";\n    constexpr const char* SECRET_WIFI_PASS = \"your_password\";\n    ```\n2. Configure Arduino IDE:\n    - Add ESP32 board URL: ```https://espressif.github.io/arduino-esp32/package_esp32_index.json```\n    - Install __esp32__ platform by Espressif Systems\n    - Install required libraries: Adafruit MQTT Library, ArduinoOTA, ESP32Servo\n3. Connect ESP32-C3 SuperMini via USB\n4. Select board: __MakerGO ESP32 C3 SuperMini__\n5. Upload ```esp32-firmware.ino```\n\n### 4. App Installation\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/app_screenshot.png\" alt=\"Android companion app\" width=\"250\"/\u003e\n\u003c/p\u003e\n\n1. Open project in Android Studio\n2. Create ```local.properties``` in project root:\n    ```\n    secretAioUser=\"your_username\"\n    secretAioKey=\"your_key\"\n    ```\n3. Change build variant to __release__\n4. Set up device:\n    - __Virtual:__ Create device via Device Manager\n    - __Physical:__ Enable USB debugging in Developer Options\n5. Select device and click __Run__\n\n### Verification\n- Device should connect to WiFi and Adafruit IO\n- App should display \"Water Sensor Active\" notification\n- Test valve control using app buttons\n- Verify sensor readings in Adafruit IO dashboard\n\n### Support\nFor detailed assembly and troubleshooting, refer to the full documentation files.\n\n## Future Enhancements\n- Battery-level monitoring\n- Charge-rate adjustment based on battery temperature\n- Cut power to water sensor when not measuring to save battery\n- Improve water sensor positioning for more robust leak detection\n\n## Licensing\n\nThe contents of `hardware/` are licensed under CERN-OHL-S-2.0. This document and the contents of `docs/` are licensed under CC BY-SA 4.0. All other content in this repository is licensed under GPL-3.0-or-later.\n##\n© 2026. This work is openly licensed via [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdchoi98%2Fiot-water-valve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdchoi98%2Fiot-water-valve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdchoi98%2Fiot-water-valve/lists"}