{"id":21559564,"url":"https://github.com/lily-osp/esp01-relay-controller","last_synced_at":"2025-03-18T04:25:54.427Z","repository":{"id":264035159,"uuid":"892141472","full_name":"lily-osp/Esp01-Relay-Controller","owner":"lily-osp","description":"This project provides a versatile WiFi-controlled relay module for the ESP-01 using the ESP8266 microcontroller. The device offers remote relay control through a web interface, WebSocket, and optional Adafruit IO integration.","archived":false,"fork":false,"pushed_at":"2025-02-26T13:16:39.000Z","size":6833,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-26T14:26:53.934Z","etag":null,"topics":["adafruit-io","esp01","iot","mdns","mqtt","websocket"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lily-osp.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-21T15:23:57.000Z","updated_at":"2025-02-26T13:16:42.000Z","dependencies_parsed_at":"2025-02-26T14:24:46.207Z","dependency_job_id":"50a0c8e4-ade2-4946-a230-df36abdde07a","html_url":"https://github.com/lily-osp/Esp01-Relay-Controller","commit_stats":null,"previous_names":["lily-osp/esp01-relay-controller"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lily-osp%2FEsp01-Relay-Controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lily-osp%2FEsp01-Relay-Controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lily-osp%2FEsp01-Relay-Controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lily-osp%2FEsp01-Relay-Controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lily-osp","download_url":"https://codeload.github.com/lily-osp/Esp01-Relay-Controller/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244155501,"owners_count":20407362,"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":["adafruit-io","esp01","iot","mdns","mqtt","websocket"],"created_at":"2024-11-24T09:07:44.446Z","updated_at":"2025-03-18T04:25:54.406Z","avatar_url":"https://github.com/lily-osp.png","language":"C++","readme":"# ESP8266 WiFi Relay Controller\n\n## Overview\nThis project provides a versatile WiFi-controlled relay module for the ESP-01 using the ESP8266 microcontroller. The device offers remote relay control through a web interface, WebSocket, and optional Adafruit IO integration.\n\n## Features\n- WiFi-enabled relay control\n- Captive portal for easy device configuration\n- Persistent device state storage\n- Web-based user interface\n- WebSocket real-time control\n- Optional Adafruit IO cloud integration\n- mDNS support for easy device discovery\n\n## Hardware Requirements\n- ESP-01 module\n- Relay module\n- Power supply (3.3V recommended)\n\n### Pin Configuration\n- `RELAY_PIN`: GPIO0 (Controls relay)\n- `LED_PIN`: GPIO1 (Status indicator)\n\n## Setup and Configuration\n\n### Initial Setup\n1. Power on the device\n2. If no WiFi credentials are configured, the device will create a captive portal\n3. Connect to `ESP8266-Setup` WiFi network (password: `configme123`)\n4. Open `http://192.168.4.1` in your web browser\n\n### Configuration Options\n- WiFi SSID and Password\n- Custom mDNS name (e.g., `my-relay.local`)\n- Optional Adafruit IO integration\n  - Adafruit IO Username\n  - Adafruit IO Key\n  - Relay Feed Name\n  - IP Feed Name\n\n## Control Methods\n\n### Web Interface\n- Access via `http://[device-mdns-name].local`\n- Toggle relay on/off directly from the web page\n\n### WebSocket\n- Real-time relay control\n- Supports `ON` and `OFF` commands\n\n### Adafruit IO (Optional)\n- Cloud-based control and monitoring\n- Publish and subscribe to relay state\n- Periodic IP address updates\n\n## Connectivity Features\n- Automatic WiFi reconnection\n- Configurable connection timeout\n- Fallback to setup mode after multiple connection failures\n- mDNS support for easy local network discovery\n\n## Configuration Storage\n- Device settings stored in EEPROM\n- Persistent relay state memory\n- Supports default configuration if no valid config found\n\n## Debugging\n- Serial output at 115200 baud\n- Detailed logging for WiFi and Adafruit IO connections\n\n## Troubleshooting\n- If WiFi connection fails, device enters captive portal mode\n- Reset device or reconfigure WiFi credentials if needed\n\n## Dependencies\n- ESP8266WiFi\n- ESP8266WebServer\n- ESP8266mDNS\n- WebSocketsServer\n- EEPROM\n- DNSServer\n- AdafruitIO_WiFi\n\n## Recommended Power Supply\n- 3.3V, minimum 500mA\n- Stable power source recommended for reliable operation\n\n## Flashing the Device\n1. Use Arduino IDE or PlatformIO\n2. Select \"Generic ESP8266 Module\"\n3. Configure appropriate flash settings\n4. Upload the firmware\n\n## Security Considerations\n- Change default AP password\n- Use strong WiFi credentials\n- Consider using Adafruit IO's security features\n\n## License\n[MIT License](LICENSE)\n\n## Contributing\nPull requests and issues are welcome. Please follow standard GitHub contribution guidelines.\n\n## Support\nFor issues or questions, please open a GitHub issue or contact the maintainer.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flily-osp%2Fesp01-relay-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flily-osp%2Fesp01-relay-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flily-osp%2Fesp01-relay-controller/lists"}