Sky and ISS views
Two new views, picked from mockups. `sky`: a star chart of the sky over Zlín as seen lying on your back, with the planets, the moon in its phase, tonight's darkness, cloud for the next 12 hours and the next visible ISS pass. `iss`: a dotted world map with day and night, the ISS and its ground track, and the next pass over Zlín with the cloud cover for that hour. Positions are calculated locally with ephem; only the ISS orbit (CelesTrak, every 6 h, retried gently) and cloud cover (Open-Meteo) are fetched. The poller gained a per-source retry delay for that. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
6c9a1420d2
commit
2132262896
28 files changed
+1342
-18
No files matched your search
@@ -2,12 +2,14 @@
|
||||
|
||||
A second 3.5" Turing Smart Screen (Rev A) on the Coolify home server, next to the bus board
|
||||
(`bus-department-schedule`). One Docker container shows **one view at a time**: a Casio digital watch (slanted
|
||||
7-segment digits, pale LCD green) for the weather, and a Cyberpunk 2077 look (yellow/cyan on black, chamfered
|
||||
shapes, glitch numbers) for the server stats:
|
||||
7-segment digits, pale LCD green) for the weather, a Cyberpunk 2077 look (yellow/cyan on black, chamfered
|
||||
shapes, glitch numbers) for the server stats, a star chart of tonight's sky and an ISS tracker:
|
||||
|
||||
| `VIEW` | Shows |
|
||||
|---|---|
|
||||
| `weather` | The week ahead in the Czech weekday strip (today first and inverted: icon, max and min for each day), big `HH:MM` with seconds, date, current temperature and feels-like (`POCIT`) for Zlín, and a 12-hour rain probability bar graph with the hour under every bar and the total mm. From sunset to sunrise the whole screen turns into a reverse LCD (light segments on black) |
|
||||
| `sky` | Star chart of the sky over Zlín right now, as seen lying on your back (north up, east left): bright stars, a few constellations, the planets, the Moon in its real phase, and the sun by day. Beside it: the clock, tonight's full darkness, what is up (height and direction) or rising soon, the next 12 hours of cloud with a one-line summary, and the next visible ISS pass. Redrawn every minute |
|
||||
| `iss` | Dotted world map with day and night: where the ISS is now, its ground track 40 minutes back and 95 ahead, Zlín, height, speed and position, and the next pass visible from Zlín with the cloud cover for that hour. Redrawn every 10 s |
|
||||
| `server` | Cyberpunk style: CPU / RAM / disk gauges (red from 80 %), load, CPU temperature, uptime, Docker containers (readable names and status chips) and the busiest processes. Refreshed every second; the container list every 5 s and the process ranking over 3 s windows |
|
||||
|
||||
Design: `docs/superpowers/specs/2026-10-22-second-screen-design.md`.
|
||||
@@ -30,7 +32,7 @@ Edit `VIEW:` in `docker-compose.yml`, commit, `git push`, then in Coolify press
|
||||
|
||||
python3 -m venv .venv && .venv/bin/pip install -r requirements-dev.txt
|
||||
.venv/bin/pytest
|
||||
.venv/bin/python preview.py # writes docs/previews/weather.png and server.png
|
||||
.venv/bin/python preview.py # writes docs/previews/weather.png, server.png, sky.png and iss.png
|
||||
|
||||
## Deployment (Coolify)
|
||||
|
||||
@@ -64,14 +66,15 @@ else keeps working.
|
||||
(the screen library's own exit is caught); if the port disappears mid-run the app exits after about a minute of
|
||||
failed draws and Docker restarts it. With the cable out *before* the container starts, Docker itself refuses to
|
||||
start it (the compose `devices:` entry). Check the cable and `ls -l /dev/serial/by-id/`. ModemManager can interfere (`systemctl status ModemManager`).
|
||||
- **`STARÉ` tag:** the data is old (weather older than 1 h, server stats older than 30 s). The clock keeps running.
|
||||
- **`STARÉ` tag:** the data is old (weather or clouds older than 1 h, server stats older than 30 s, the ISS orbit
|
||||
older than 3 days). The clock keeps running.
|
||||
- **Error screen at startup:** `VIEW` is not one of the valid views.
|
||||
|
||||
## Config (env vars)
|
||||
|
||||
| Variable | Default | |
|
||||
|---|---|---|
|
||||
| `VIEW` | none (must be set) | `weather` or `server` |
|
||||
| `VIEW` | none (must be set) | `weather`, `server`, `sky` or `iss` |
|
||||
| `SCREEN_DEVICE` | `/dev/serial/by-id/usb-Turing_UsbMonitor_USB35INCHIPSV2-if00` | serial device, also passed into the container |
|
||||
| `SCREEN_ORIENTATION` | `LANDSCAPE` | `REVERSE_LANDSCAPE` flips it |
|
||||
| `SCREEN_BRIGHTNESS` | `50` | 0–100 |
|
||||
@@ -87,6 +90,11 @@ The screen library is pinned to one upstream commit in the `Dockerfile` (`LCD_CO
|
||||
days), the closest day's times are used; with no forecast at all (right after a start) the screen stays in day
|
||||
mode. Switching day/night redraws the whole screen once (about 2 s).
|
||||
- The weather graph is the next 12 hours from now, so late in the day it runs into tomorrow.
|
||||
- Sky and ISS: positions of the sun, moon, planets, stars and the ISS are calculated in the container (`ephem`,
|
||||
`astro.py`), nothing is asked of a service. Only the ISS orbit (CelesTrak, every 6 hours, a failed download is
|
||||
retried after 30 minutes because CelesTrak blocks eager clients) and the cloud cover (Open-Meteo, every 15 minutes)
|
||||
come from the network. An ISS pass counts as visible when the station is sunlit while the sun here is more than 6°
|
||||
below the horizon. By day the star chart still shows the stars where they stand.
|
||||
- Server stats: process CPU is a share of the whole machine and grouped by command name; temperature is the CPU
|
||||
package sensor if the host has one, else the hottest thermal zone.
|
||||
- The screen's link moves about 150 KB/s (measured 2026-10-22: a full 480x320 frame takes 1.96 s, a 96x52 box 65 ms),
|
||||
@@ -97,4 +105,8 @@ The screen library is pinned to one upstream commit in the `Dockerfile` (`LCD_CO
|
||||
## Fonts
|
||||
|
||||
`assets/fonts/Roboto-Bold.ttf` (Apache 2.0, from the screen library) is used by the weather view;
|
||||
`Rajdhani-Bold.ttf` / `Rajdhani-SemiBold.ttf` (SIL Open Font License, see `Rajdhani-OFL.txt`) by the server view.
|
||||
`Rajdhani-Bold.ttf` / `Rajdhani-SemiBold.ttf` (SIL Open Font License, see `Rajdhani-OFL.txt`) by the server view;
|
||||
`Inter.ttf` (SIL Open Font License, see `Inter-OFL.txt`) by the sky and ISS views.
|
||||
|
||||
`assets/world_land.png` (the ISS map) is baked from Natural Earth's 1:110m land polygons (public domain) by
|
||||
`tools/bake_world_map.py`.
|
||||
Reference in new issue
Block a user