{"id":28079016,"url":"https://github.com/justinh-rahb/piclock","last_synced_at":"2026-05-05T11:37:39.538Z","repository":{"id":292701180,"uuid":"981672477","full_name":"justinh-rahb/piclock","owner":"justinh-rahb","description":"A simple clock for Raspberry Pi + Adafruit 16x2 Character LCD Plate","archived":false,"fork":false,"pushed_at":"2025-05-26T05:16:54.000Z","size":1988,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-26T06:30:25.000Z","etag":null,"topics":["adafruit","flask","pi-plate","python","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","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/justinh-rahb.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}},"created_at":"2025-05-11T16:33:35.000Z","updated_at":"2025-05-26T05:16:54.000Z","dependencies_parsed_at":"2025-05-26T06:27:29.188Z","dependency_job_id":null,"html_url":"https://github.com/justinh-rahb/piclock","commit_stats":null,"previous_names":["justinh-rahb/piclock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justinh-rahb/piclock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinh-rahb%2Fpiclock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinh-rahb%2Fpiclock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinh-rahb%2Fpiclock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinh-rahb%2Fpiclock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinh-rahb","download_url":"https://codeload.github.com/justinh-rahb/piclock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinh-rahb%2Fpiclock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263832484,"owners_count":23517350,"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","flask","pi-plate","python","raspberry-pi"],"created_at":"2025-05-13T04:31:08.640Z","updated_at":"2026-05-05T11:37:39.499Z","avatar_url":"https://github.com/justinh-rahb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🕰️ PiClock 2.0\n\nA minimalist, web-controlled information clock for Raspberry Pi with an Adafruit Character LCD Plate. Designed for household use and inspired by embedded systems UI simplicity.\n\n![Web UI Screenshot](assets/screenshot.png)\n\n![PiClock Build](assets/piclock.jpg)\n\n![Weather Display](assets/weather.jpg)\n\n---\n\n## ✨ Features\n\n- ⌚ Displays time and date on a 16x2 LCD\n- 🌤️ Shows local weather (Open-Meteo API)\n- 📝 Custom message display (e.g. reminders, greetings)\n- 💡 Backlight color selection via physical buttons or web interface\n- 🌐 Simple Flask-based web UI for remote control\n- 📁 Local file-based state persistence\n- 🔁 Runs persistently with systemd\n\n---\n\n## 📦 Requirements\n\n- Raspberry Pi with Python 3\n- [Adafruit_CharLCDPlate](https://github.com/adafruit/Adafruit_Python_CharLCD)\n- Flask\n- Requests\n\nInstall dependencies:\n\n```bash\npip install flask requests\n````\n\n---\n\n## 📂 Project Structure\n\n```\n/opt/piclock/\n├── main.py               # Main clock loop\n├── web_control.py        # Flask-based web controller\n├── backlight.txt         # Persisted color state\n├── msg.txt               # Optional user message\n├── location.txt          # Location string for weather\n├── weather_cache.json    # 1-hour weather cache\n├── static/\n│   └── style.css         # Web UI styles\n├── templates/\n│   └── index.html        # Web UI layout\n```\n\n---\n\n## 🚀 Usage\n\n### Start the clock\n\n```bash\npython3 main.py\n```\n\n### Start the web UI\n\n```bash\npython3 web_control.py\n```\n\n### Systemd (example)\n\nCreate `/etc/systemd/system/piclock.service`:\n\n```ini\n[Unit]\nDescription=PiClock Service\nAfter=network.target\n\n[Service]\nExecStart=/opt/piclock/start_all.sh\nWorkingDirectory=/opt/piclock\nStandardOutput=inherit\nStandardError=inherit\nRestart=on-failure\nUser=pi\nEnvironment=PYTHONUNBUFFERED=1\n\n[Install]\nWantedBy=multi-user.target\n```\n\n---\n\n## 🌐 Web Interface\n\nAccess via:\n\n```\nhttp://\u003cyour-pi-ip\u003e:8080\n```\n\n* Set or clear the custom display message\n* Select a backlight color\n* Changes persist across reboots\n\n---\n\n## ⚙️ Configuration\n\n* **Message file**: `/opt/piclock/msg.txt`\n* **Color file**: `/opt/piclock/backlight.txt`\n* **Weather**: Automatically geocoded from `/opt/piclock/location.txt`\n\n---\n\n## 🧰 Customization Ideas\n\n* Live ambient sensor display (temperature, CO₂, etc)\n* Scheduled messages via cron\n* OTA updates using Git\n* Light/dark mode switch for web UI\n* PiCamera snapshot and upload panel\n\n---\n\n## 📜 License\n\nMIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinh-rahb%2Fpiclock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinh-rahb%2Fpiclock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinh-rahb%2Fpiclock/lists"}