Named correctly, and fixed to work with Le Potato
This commit is contained in:
14
PLAN.md
14
PLAN.md
@@ -1,4 +1,4 @@
|
||||
# Plan: Sahsa Clock — Lightweight Boot-Persistent Display with Webhook Support
|
||||
# Plan: KH Clock — Lightweight Boot-Persistent Display with Webhook Support
|
||||
|
||||
## Context
|
||||
|
||||
@@ -27,7 +27,7 @@ Pygame can render directly to `/dev/fb0` (the Linux framebuffer) without any dis
|
||||
## Architecture
|
||||
|
||||
```
|
||||
sahsa_clock/
|
||||
KH_Clock/
|
||||
├── main.py # Entry point: asyncio event loop + pygame render loop
|
||||
├── display.py # Pygame rendering: clock face, message overlay
|
||||
├── server.py # aiohttp server: dashboard routes + API routes
|
||||
@@ -37,7 +37,7 @@ sahsa_clock/
|
||||
│ └── app.js
|
||||
├── config.toml # Screen resolution, colors, fonts, port, token, timeout
|
||||
├── requirements.txt
|
||||
└── sahsa-clock.service # systemd unit file
|
||||
└── KH-clock.service # systemd unit file
|
||||
```
|
||||
|
||||
### Runtime flow
|
||||
@@ -117,11 +117,11 @@ session_timeout_hours = 8
|
||||
|
||||
**No TLS required** — LAN-only. If ever internet-facing, add nginx in front with TLS.
|
||||
|
||||
### systemd service (`/etc/systemd/system/sahsa-clock.service`)
|
||||
### systemd service (`/etc/systemd/system/KH-clock.service`)
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Sahsa Clock Display
|
||||
Description=KH Clock Display
|
||||
After=network.target
|
||||
DefaultDependencies=no
|
||||
|
||||
@@ -130,7 +130,7 @@ Type=simple
|
||||
User=pi # or whatever the device user is
|
||||
Environment=SDL_VIDEODRIVER=fbcon
|
||||
Environment=SDL_FBDEV=/dev/fb0
|
||||
ExecStart=/usr/bin/python3 /opt/sahsa_clock/main.py
|
||||
ExecStart=/usr/bin/python3 /opt/KH_Clock/main.py
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
@@ -259,4 +259,4 @@ The TV should show a plain text console at this point — that's expected. The c
|
||||
5. Status bar in dashboard reflects the current message within 5 seconds
|
||||
6. `curl -X POST http://<device-ip>:8080/api/message -H 'Authorization: Bearer <token>' -H 'Content-Type: application/json' -d '{"text":"API test", "duration": 30}'` — message appears
|
||||
7. Same curl without the header → `401 Unauthorized`
|
||||
8. `sudo systemctl enable --now sahsa-clock` → service starts, reboot device, clock appears without intervention
|
||||
8. `sudo systemctl enable --now KH-clock` → service starts, reboot device, clock appears without intervention
|
||||
|
||||
Reference in New Issue
Block a user