Named correctly, and fixed to work with Le Potato
This commit is contained in:
28
README.md
28
README.md
@@ -1,4 +1,4 @@
|
||||
# Sahsa Clock
|
||||
# KH Clock
|
||||
|
||||
A lightweight, boot-persistent clock display for a TV, running on a [Libre Computer AML-S905X-CC ("Le Potato")](https://libre.computer/products/aml-s905x-cc/). Renders directly to the Linux framebuffer — no desktop environment, no browser, no X11. Staff can push announcements to the screen from any phone or laptop on the same network.
|
||||
|
||||
@@ -17,7 +17,7 @@ A lightweight, boot-persistent clock display for a TV, running on a [Libre Compu
|
||||
## File structure
|
||||
|
||||
```
|
||||
sahsa_clock/
|
||||
KH_Clock/
|
||||
├── main.py # Entry point
|
||||
├── display.py # Pygame rendering (clock + messages)
|
||||
├── server.py # aiohttp web server (dashboard + API)
|
||||
@@ -29,7 +29,7 @@ sahsa_clock/
|
||||
│ ├── style.css
|
||||
│ └── app.js
|
||||
├── requirements.txt
|
||||
└── sahsa-clock.service # systemd unit file
|
||||
└── KH-clock.service # systemd unit file
|
||||
```
|
||||
|
||||
---
|
||||
@@ -276,14 +276,14 @@ ls -la /dev/fb0 # should exist, group should be 'video'
|
||||
### 2. Install the application
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /opt/sahsa_clock
|
||||
sudo chown <your-username>: /opt/sahsa_clock
|
||||
sudo mkdir -p /opt/KH_Clock
|
||||
sudo chown <your-username>: /opt/KH_Clock
|
||||
|
||||
# Copy files (from your dev machine):
|
||||
scp -r . <user>@<ip>:/opt/sahsa_clock/
|
||||
scp -r . <user>@<ip>:/opt/KH_Clock/
|
||||
|
||||
# On the Le Potato — create a venv and install dependencies:
|
||||
cd /opt/sahsa_clock
|
||||
cd /opt/KH_Clock
|
||||
python3 -m venv venv
|
||||
venv/bin/pip install -r requirements.txt
|
||||
```
|
||||
@@ -297,7 +297,7 @@ sudo apt install fonts-dejavu
|
||||
### 4. Configure
|
||||
|
||||
```bash
|
||||
nano /opt/sahsa_clock/config.toml
|
||||
nano /opt/KH_Clock/config.toml
|
||||
```
|
||||
|
||||
You only need to verify the `[server]` port and `[rate_limit]` values. Everything else is handled automatically on first run (token generation, password setup).
|
||||
@@ -305,21 +305,21 @@ You only need to verify the `[server]` port and `[rate_limit]` values. Everythin
|
||||
If the username on your device is not `pi`, open the service file and update the `User=` line:
|
||||
|
||||
```bash
|
||||
nano /opt/sahsa_clock/sahsa-clock.service
|
||||
nano /opt/KH_Clock/KH-clock.service
|
||||
```
|
||||
|
||||
### 5. Install and start the systemd service
|
||||
|
||||
```bash
|
||||
sudo cp /opt/sahsa_clock/sahsa-clock.service /etc/systemd/system/
|
||||
sudo cp /opt/KH_Clock/KH-clock.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now sahsa-clock
|
||||
sudo systemctl enable --now KH-clock
|
||||
```
|
||||
|
||||
**Check that it started:**
|
||||
|
||||
```bash
|
||||
sudo systemctl status sahsa-clock
|
||||
sudo systemctl status KH-clock
|
||||
```
|
||||
|
||||
The TV should now show the clock. Open `http://<device-ip>:8080` from a laptop or phone on the same network to reach the dashboard.
|
||||
@@ -340,7 +340,7 @@ The TV should now show the clock. Open `http://<device-ip>:8080` from a laptop o
|
||||
|
||||
**Clock doesn't appear after reboot:**
|
||||
```bash
|
||||
sudo journalctl -u sahsa-clock -n 50
|
||||
sudo journalctl -u KH-clock -n 50
|
||||
```
|
||||
Common causes: wrong `User=` in the service file, user not in the `video` group, `/dev/fb0` not present.
|
||||
|
||||
@@ -354,7 +354,7 @@ sudo usermod -aG video <user> # add if missing, then log out and back in
|
||||
The desktop environment may still be running. Confirm `systemctl get-default` returns `multi-user.target` and that the display manager is disabled.
|
||||
|
||||
**Dashboard unreachable:**
|
||||
Check the service is running (`systemctl status sahsa-clock`) and that `port = 8080` in `config.toml` isn't blocked by a firewall.
|
||||
Check the service is running (`systemctl status KH-clock`) and that `port = 8080` in `config.toml` isn't blocked by a firewall.
|
||||
|
||||
**Font looks pixelated:**
|
||||
DejaVu fonts aren't installed. Run `sudo apt install fonts-dejavu` on the device and restart the service.
|
||||
|
||||
Reference in New Issue
Block a user