{"id":49868414,"url":"https://github.com/ripaaf/buzz-clock","last_synced_at":"2026-05-15T04:06:32.209Z","repository":{"id":294128814,"uuid":"986012879","full_name":"ripaaf/buzz-clock","owner":"ripaaf","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-01T03:23:01.000Z","size":843,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-03T13:57:45.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ripaaf.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-19T01:15:00.000Z","updated_at":"2025-12-01T03:23:05.000Z","dependencies_parsed_at":"2025-05-19T02:28:40.174Z","dependency_job_id":"3d71e150-b397-4fb0-b4b6-befab85b1ebf","html_url":"https://github.com/ripaaf/buzz-clock","commit_stats":null,"previous_names":["ripaaf/buzz-clock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ripaaf/buzz-clock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripaaf%2Fbuzz-clock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripaaf%2Fbuzz-clock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripaaf%2Fbuzz-clock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripaaf%2Fbuzz-clock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ripaaf","download_url":"https://codeload.github.com/ripaaf/buzz-clock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ripaaf%2Fbuzz-clock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33053169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"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":"2026-05-15T04:06:31.283Z","updated_at":"2026-05-15T04:06:32.197Z","avatar_url":"https://github.com/ripaaf.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BuzzClock ESP8266\n\n**NanaClock** is a digital alarm clock project based on ESP8266, featuring Wi-Fi setup, OLED animations (with anime and default themes!), Web API, alarm music via buzzer, and now supports **DHT22 temperature \u0026 humidity sensor**! Easily configured through a web browser, it displays animated bitmaps and real-time environment data at specific times.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/README/1747626032650.png\" width=\"700\" alt=\"NanaClock Schematic\"\u003e\n\u003c/p\u003e\n\n**i forgot to updated the images with the dht22..*\n\n\u003e [!NOTE]\n\u003e The OLED shown in the image is a different model, but the pinout is the same.\n\n\n## ✨ Main Features\n\n- **WiFi Manager:** Setup WiFi via portal if not yet connected.\n- **Web API:** Control alarm, time, WiFi, \u0026 now read DHT22 data via HTTP endpoints.\n- **NTP Client:** Automatic time sync from the internet, supports timezone (UTC offset).\n- **Buzzer Music:** Plays \"Hedwig's Theme\" \u0026 \"We Wish You a Merry Christmas\".\n- **Bitmap Animation:** Display animation on OLED during specific minute ranges.\n- **OLED Display:** Shows digital clock, IP address, and environment data.\n- **Themed Display:** Switch between default and anime-themed clock UI!\n- **Persistent Configuration:** All settings are saved in `LittleFS` (internal flash).\n- **DHT22 Support:** Shows real-time temperature \u0026 humidity on the OLED and via API.\n\n---\n\n## 🛠️ Hardware Needed\n\n- **ESP8266 board:** NodeMCU/WeMos D1 Mini/etc.\n- **OLED SSD1306 128x64 I2C**\n- **Active buzzer**\n- **DHT22 (AM2302) sensor** (for temperature \u0026 humidity)\n- **WiFi connection**\n\n\n## 📦 Required Arduino Libraries\n\nMake sure to install the following libraries:\n\n- [ESP8266 Core](https://github.com/esp8266/Arduino)\n- [WiFiManager](https://github.com/tzapu/WiFiManager)\n- [ArduinoJson](https://github.com/bblanchon/ArduinoJson)\n- [Adafruit SSD1306](https://github.com/adafruit/Adafruit_SSD1306)\n- [Adafruit GFX](https://github.com/adafruit/Adafruit-GFX-Library)\n- [ESP8266WebServer](https://arduino-esp8266.readthedocs.io/en/latest/esp8266webserver.html)\n- [LittleFS](https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html)\n- [DHT sensor library](https://github.com/adafruit/DHT-sensor-library)\n\n\n## ⚡ Wiring\n\n### OLED ↔️ ESP8266\n\n| OLED | ESP8266 |\n| ---- | ------- |\n| SDA  | D2      |\n| SCL  | D1      |\n| VCC  | 3V3     |\n| GND  | GND     |\n\n### Buzzer ↔️ ESP8266\n\n| Buzzer | ESP8266 |\n| ------ | ------- |\n| VCC    | D5      |\n| GND    | GND     |\n\n### DHT22 ↔️ ESP8266\n\n| DHT22 | ESP8266 |\n| ----- | ------- |\n| VCC   | 3V3     |\n| DATA  | D6      |\n| GND   | GND     |\n\n\u003e [!NOTE]\n\u003e A 10k resistor between VCC and DATA is recommended for the DHT22, but in some cases it working perfectly fine without it.\n\n## 🖼️ OLED Bitmap, Themed UI \u0026 Client UI\n\n**Example of bitmap image (its black \u0026 white) for the OLED:**\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/README/1747623066183.png\" width=\"192\" alt=\"OLED Bitmap Example\"\u003e\n\u003c/p\u003e\n\n### Themed Display\n\nYou can now switch between the **default** and **anime-themed** digital clock UI!\n\n| Theme Name      | Preview                                           | API Command             |\n| --------------- | ------------------------------------------------- | ----------------------- |\n| **Anime Theme** | ![anime theme](images/README/1748785444584.png)   | `/displaytheme?theme=1` |\n| **Default**     | ![default theme](images/README/1748785463489.png) | `/displaytheme?theme=0` |\n\n- The anime theme gives your clock a cute, unique look, perfect for fans.\n- Change the theme via the web UI or the API.\n\n**Web client interface screenshot:**\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/README/1747623244983.png\"  alt=\"NanaClock Web UI\"\u003e\n\u003c/p\u003e\n\n\n## 🚀 How to Use\n\n### 1. Flash firmware to ESP8266\n\nUpload the source code to your board using Arduino IDE.\n\n### 2. Setup WiFi\n\n- On first boot, NanaClock will create a WiFi AP: `NanaClock Setup`.\n- Connect your phone/laptop to this AP, then open `192.168.4.1` in your browser.\n- Enter your home WiFi SSID \u0026 password, and the UTC offset (e.g., 7 for GMT+7/WIB).\n\n### 3. API Endpoints\n\nOnce connected, access the ESP8266 IP address from your browser to configure:\n\n```\nhttp://\u003cesp-ip\u003e/\n```\n\n| Endpoint                            | Function                               |\n| ----------------------------------- | -------------------------------------- |\n| `/settime?utc=7`                    | Set UTC offset                         |\n| `/gettime`                          | Get current UTC offset                 |\n| `/buzztime?add=06:30[\u0026song=hedwig]` | Add 6:30 alarm, optional song          |\n| `/buzztime?remove=06:30`            | Remove alarm                           |\n| `/buzztime?set=06:30\u0026song=merry`    | Change alarm song for 6:30             |\n| `/buzztime`                         | List active alarms                     |\n| `/setwifi?ssid=xxx\u0026pass=xxx`        | Change WiFi, takes effect after reboot |\n| `/getwifi`                          | Show current WiFi SSID                 |\n| `/bitmapwindow?start=20\u0026end=30`     | Set bitmap animation minute window     |\n| `/bitmapwindow`                     | Show bitmap window settings            |\n| `/ipaddress`                        | Get ESP IP address                     |\n| `/getdht`                           | Get current temperature \u0026 humidity     |\n| `/displaytheme?theme=1`             | Switch OLED display to anime theme     |\n| `/displaytheme?theme=0`             | Switch OLED display to default theme   |\n| `/displaytheme`                     | Show current theme                     |\n\n---\n\n## 🎨 Customization\n\n- **Bitmap Animation:** Modify the `epd_bitmap_allArray` in the code for your own bitmap images (`PROGMEM`), you can use this [link](https://javl.github.io/image2cpp/) to convert image to bitmap and use [Lopaka](https://lopaka.app/) for the UI Designer.\n- **Alarm Songs:** Add new songs to the `buzzNow` function.\n- **Number of Alarms:** To support more than 7 alarms, change `MAX_BUZZ` in the code.\n  ```\n  #define MAX_BUZZ 7 //\u003c-- change here\n  ```\n- **Theme:** Add more themes by expanding the `drawThemedClock()` function.\n\n---\n\n## 🌡️ DHT22 Sensor\n\n- **OLED display will show temperature and humidity** in real time.\n- Access sensor data through `/getdht` endpoint for remote monitoring.\n- If sensor is missing or not responding, it will show \"N/A\" on the display and API.\n\n---\n\n## 🖼️ When Does the Bitmap Animation Show?\n\nThe OLED bitmap animation is displayed **only during the minute range you set** using the `/bitmapwindow` API endpoint.\nFor example, if you set:\n\n```\n/bitmapwindow?start=20\u0026end=30\n```\n\nthe animation will show **every hour, from minute 20 to 30** (e.g., 10:20–10:30, 11:20–11:30, etc.).\nAt all other times, the OLED shows the normal clock display.\n\nYou can configure this from the UI browser Interface or directly from your browser:\n\n```\nhttp://\u003cesp-ip\u003e/bitmapwindow?start=XX\u0026end=YY\n```\n\nReplace `XX` and `YY` with the minute values you want.\n\n\u003e **Tip:**\n\u003e If you want your mascot or animation to appear at a special moment (like every :00 to :05 for a \"hello\" at the top of each hour), just set `start=0\u0026end=5`.\n\u003e The rest of the time, Nana will just show you the clock—so it’s up to you, when you want to make things cute or dramatic! 🐾\n\n\n## ℹ️ Notes\n\n\u003e [!IMPORTANT]\n\u003e If WiFi connection fails, the device will automatically return to setup mode.\n\n\u003e [!IMPORTANT]\n\u003e Temporary API server: `http://localhost:2000/nanaclock.php` (can be changed).\n\n\u003e [!IMPORTANT]\n\u003e The code for sending IP automaticly to the server only works if we served the server on plain HTTP and have no TLS (somehow i cannot figure it out with HTTPS😭).\n\n\u003e [!IMPORTANT]\n\u003e OLED in schematic is for illustration.\n\n\n## 🐾 Credits\n\n- **Arduino Songs** [by robsoncouto](https://github.com/robsoncouto/arduino-songs)\n\n## 📄 License\n\nMIT License — feel free to modify, use, and share.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripaaf%2Fbuzz-clock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fripaaf%2Fbuzz-clock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fripaaf%2Fbuzz-clock/lists"}