Round display and charmlab-status
Wiring in Hardware.
- Find the spidev overlay:
ls /boot/dtb/rockchip/overlay/ | grep -i spi(also listed inarmbian-config, under device tree overlays). The exact name depends on the Armbian release. - In
/boot/armbianEnv.txt, with the overlay name without prefix and without.dtbo:
overlays=<spidev-overlay>param_spidev_spi_bus=2- Reboot and check:
ls /dev/spidev2.0gpioinfo gpiochip4- Lines 3, 28 and 29 of
gpiochip4show as unused.
User and permissions
Section titled “User and permissions”sudo useradd --system --user-group --home /opt/charmlab-status --shell /usr/sbin/nologin charmlabsudo install -d -o charmlab -g charmlab /var/lib/charmlabsudo install -d -o root -g charmlab -m 0750 /etc/charmlabsudo install -m 0644 deploy/udev/90-charmlab.rules /etc/udev/rules.d/sudo udevadm control --reload && sudo udevadm triggercharmlab-status
Section titled “charmlab-status”| Item | Value |
|---|---|
| Code | node/charmlab-status/ |
| Installed in | /opt/charmlab-status (eMMC), with its own virtualenv |
| Unit | charmlab-status.service, user charmlab, Restart=always, no dependency on /srv or Docker |
| Configuration | /etc/charmlab/charmlab-status.toml and /etc/charmlab/services.toml |
| Secrets | /etc/charmlab/secrets.env, owner root:charmlab, mode 0640 |
| State | /var/lib/charmlab |
| HTTP | Port 8080: /status and /health (Status API) |
Checks:
| Every | What |
|---|---|
| 5 s | SSD (/srv mounted and the disk present by UUID), temperature, CPU, RAM, disk usage, uptime, Ethernet IP |
| 30 s | docker and cloudflared active, ping to 1.1.1.1 and 8.8.8.8, Tailscale status |
| 60 s | Each service in services.toml, age of /var/lib/charmlab/last-backup |
| 5 min | New line in /var/lib/charmlab/temperature.csv |
services.toml, one block per service:
[[service]]name = "web-app"type = "http" # http: any answer below 500; tcp: port opentarget = "http://127.0.0.1:8081/"exposed = true # shown on the panel; alerts come from UptimeFlareDisplay:
- SPI mode 0 at 40 MHz, RGB565, 240 x 240, initialization sequence from the Waveshare
LCD_1inch28example. - Temperature arc, CPU and RAM, IP and an outer ring with the LED color and blink mode; with a problem, its text in the center.
- Backlight (BLK) off from 23:00 to 07:00, turned on by any red problem. Hours set in
charmlab-status.toml.
Alerts: problem table in Alerts, sent with POST /alerts to the charmlab-alerts Worker.