{"id":18821674,"url":"https://github.com/goto-eof/elisys-esp32-alarm-clock-rust","last_synced_at":"2026-05-03T07:42:22.456Z","repository":{"id":210970190,"uuid":"727882388","full_name":"goto-eof/elisys-esp32-alarm-clock-rust","owner":"goto-eof","description":"Elisys ESP32 Alarm Clock (Rust), as can be understood, is an alarm clock developed using Rust programming language for ESP32 devices. ","archived":false,"fork":false,"pushed_at":"2023-12-22T21:51:46.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T03:43:46.461Z","etag":null,"topics":["alarm","alarmclock","esp32","home-automation","remote-control","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/goto-eof.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}},"created_at":"2023-12-05T19:14:19.000Z","updated_at":"2023-12-05T22:20:35.000Z","dependencies_parsed_at":"2023-12-15T00:32:08.440Z","dependency_job_id":null,"html_url":"https://github.com/goto-eof/elisys-esp32-alarm-clock-rust","commit_stats":null,"previous_names":["goto-eof/elisys-esp32-alarm-clock-rust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-eof%2Felisys-esp32-alarm-clock-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-eof%2Felisys-esp32-alarm-clock-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-eof%2Felisys-esp32-alarm-clock-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goto-eof%2Felisys-esp32-alarm-clock-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goto-eof","download_url":"https://codeload.github.com/goto-eof/elisys-esp32-alarm-clock-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239758900,"owners_count":19692041,"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":["alarm","alarmclock","esp32","home-automation","remote-control","rust"],"created_at":"2024-11-08T00:45:12.006Z","updated_at":"2026-01-18T09:30:18.816Z","avatar_url":"https://github.com/goto-eof.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elisys ESP32 Alarm Clock (Rust)\n\nElisys ESP32 Alarm Clock (Rust), as can be understood, is an alarm clock software, developed using Rust programming language for ESP32 devices. This project belongs to the suite of softwares called Elisys Home Automation. Take a look to [Elisys Home Automation server (Java)](https://github.com/goto-eof/elisys-home-automation-server-java) for more information.\n\nIn order to run the project please take a look to the `Configuration` section (else, it will not compile).\n\n# How it works?\n\nThe final project involves the following behavior:\nthe application tries to connect to the WiFi network, in case of error, it will try until succeeds. Then it tries to synchronize the system clock, if error occurs, then it will retry to reconnect to the WiFi and re-synchronize the system clock. If the device is connected to the WiFi network, and the clock is synchronized with the server, then Elisys ESP32 Alarm Clock, after registering the device on server and after downloading the configuration from the [Elisys Home Automation server (Java)](https://github.com/goto-eof/elisys-home-automation-server-java), will choose the nearest date time in a list of configuration chron strings and wait until the current time is equal to the nearest date time. In this case 2 GPIOs will be set to hight and to low in alternation (on the GPIOs could be connected 2 buzzers or 2 LEDs). Every day at 00:00 the application will try to synchronize the system clock with an NTP server. Moreover, Every 3 seconds the application will download the configuration from the server. Every 30 seconds the application will send an Ack to inform the server that it is alive.\n\n# Configuration\n\nThe project contains a configuration file called `config.sample.rs`. Rename it to `config.rs`. Then change your preferences in that file and run the project.\nI used the wonderful [`cron`](https://crates.io/crates/cron) crate, witch allows to customize the alarm date time.\nFor example here:\n\n```\npub const DEFAULT_CRONTAB: \u0026[\u0026str; 2] = \u0026[\n    \"0   45   8     1-31       Jan-Dec  Mon,Tue,Wed,Thu,Fri  2023-2100\",\n    \"0    30   9     1-31       Jan-Dec  Mon,Tue,Wed,Thu,Fri  2023-2100\",\n];\npub const DEFAULT_TIMEZONE: i32 = 1 * 60 * 60;\n```\n\nwe are saying that there are 2 alarms, the first one is at 9:45 (**nine** because the DEFAULT_TIMEZONE is +1h = 1 x 60 x 60) and occurs from Monday to Friday, every month, and every day of month, from 2023 to 2100 (i tried 2999, but cron throws an error).\n\n# Hardware configuration\n\nHere are the GPIOs and their description:\n\n| GPIO | Description       |\n| ---- | ----------------- |\n| 5    | first buzzer/led  |\n| 15   | second buzzer/led |\n\n# Run it\n\nIf you are running Linux (Ubuntu) like me and have some configuration issues, please take a look [here](https://dodu.it/esp32-rust-configure-environment-linux-ubuntu/) for setting up the environment. Else, just execute:\n\n```\ncargo run\n```\n\nand hold the Boot button of your ESP32 DevKitC to install the software.\n\n# Moreover\n\nDuring my tests I had some issues with my WiFi network, so that i tried to adapt the code in a way to make the device always connected to internet.\n\nI tested on ESP32-DevKitC and developed on Ubuntu. If you have environment configuration issues, take a look [here](https://dodu.it/esp32-rust-configure-environment-linux-ubuntu/).\n\n\n\nIf you found a bug, please ping me [here](https://andre-i.eu/#contactme).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-eof%2Felisys-esp32-alarm-clock-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoto-eof%2Felisys-esp32-alarm-clock-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoto-eof%2Felisys-esp32-alarm-clock-rust/lists"}