{"id":15048895,"url":"https://github.com/drkblog/alarm","last_synced_at":"2026-01-21T10:02:06.599Z","repository":{"id":252883961,"uuid":"797994748","full_name":"drkblog/alarm","owner":"drkblog","description":"Google calendar physical alarm","archived":false,"fork":false,"pushed_at":"2024-08-14T03:29:51.000Z","size":186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T19:32:59.650Z","etag":null,"topics":["c-language","electronics","esp32-idf","google-ca","java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/drkblog.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-05-08T22:12:08.000Z","updated_at":"2024-08-14T03:29:54.000Z","dependencies_parsed_at":"2024-08-13T04:47:13.069Z","dependency_job_id":"d8c34ba9-1f75-4223-bdb9-0d97b764c546","html_url":"https://github.com/drkblog/alarm","commit_stats":null,"previous_names":["drkblog/alarm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/drkblog/alarm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drkblog%2Falarm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drkblog%2Falarm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drkblog%2Falarm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drkblog%2Falarm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drkblog","download_url":"https://codeload.github.com/drkblog/alarm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drkblog%2Falarm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28631936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c-language","electronics","esp32-idf","google-ca","java"],"created_at":"2024-09-24T21:17:03.274Z","updated_at":"2026-01-21T10:02:06.580Z","avatar_url":"https://github.com/drkblog.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Calendar alarm\n\nA physical alarm for Google Calendar.\n\n## Background\n\nSometimes it's handy to be alerted of incoming meetings in **Calendar**.\nSpecially if for any reason you cannot hear the notification sound from your computer.\nIn such situations an external device that you can sit on your desktop and produces some sort of alarm can be a good solution.\nFor this reason I've built a small device based on a `XH-C2X` module powered by a `ESP32C2`/`ESP8684H4` 2.4GHz WiFi/BLE module.\n\nThis is a personal project and I've done my best to document everything.\nIf you try to build this project yourself you may find out there are documentation gaps.\nPlease feel free to create a ticket and I'll respond whenever possible.\n\n## Concept\n\n![concept](doc/concept.png)\n\nThe `client` periodically requests for the calendar status to the `server`. Which makes a request to **Google Calendar API** for the events in the next five minutes (or a different configured time window). If there are events in such timeframe the `server` returns **true** to the `client` and the alarm goes off for the configured time.\n\nSubsequent requests won't return true unless **new events** appear in the time window. Those events for which an alarm was triggered won't make the alarm go off again.\n\n## Server\n\nIt's a **Java Spring boot** application acting as a *RESTful* server exposing one endpoint.\nThe client can query the endpoint in order to know if the alarm should be enabled.\nOnce the server returns a `true` for a calendar event it won't take the event into account in the following requests.\nThe events for which a `true` is returned depend on the server logic.\n\n\u003e You need to create a **Google API client** with **Google Calendar** access and provide the secret file to the server [as documented here](server/README.md).\n\n## Client\n\nIt's a C application built using **ESP-IDF framework**.\nIt's configured during the build with a server hostname and a _WiFi_ network and password.\nOn start up the client connects to the network, resolves the hostname using **mDNS** and starts polling the server.\nIf the server returns `true` the client activates the alarm for some (configurable) time.\n\n## Hardware\n\nThe schematic [can be viewed here](hardware/schematic.png). It consists of the following high-level modules:\n- XH-C2X module containing the ESP32C2 chip, antenna, crystal oscillator and a few other passives\n- TP4056 battery charger (with protection)\n- HT7333 low-dropout 3.3v regulator\n- A transistor, LED and a couple of resistors to activate the vibration motor\n\nNo PCB has been designed, instead components were mounted into a perfboard and connected with enameled wire. \n\n## Acknowledgment\n\nThank you [Gzalo](https://github.com/gzalo) for all the help with the hardware (designing, buying, soldering).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrkblog%2Falarm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrkblog%2Falarm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrkblog%2Falarm/lists"}