Skip to content

Round display and charmlab-status

Wiring in Hardware.

  1. Find the spidev overlay: ls /boot/dtb/rockchip/overlay/ | grep -i spi (also listed in armbian-config, under device tree overlays). The exact name depends on the Armbian release.
  2. In /boot/armbianEnv.txt, with the overlay name without prefix and without .dtbo:
overlays=<spidev-overlay>
param_spidev_spi_bus=2
  1. Reboot and check:
Terminal window
ls /dev/spidev2.0
gpioinfo gpiochip4
  1. Lines 3, 28 and 29 of gpiochip4 show as unused.
Terminal window
sudo useradd --system --user-group --home /opt/charmlab-status --shell /usr/sbin/nologin charmlab
sudo install -d -o charmlab -g charmlab /var/lib/charmlab
sudo install -d -o root -g charmlab -m 0750 /etc/charmlab
sudo install -m 0644 deploy/udev/90-charmlab.rules /etc/udev/rules.d/
sudo udevadm control --reload && sudo udevadm trigger
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 open
target = "http://127.0.0.1:8081/"
exposed = true # shown on the panel; alerts come from UptimeFlare

Display:

  • SPI mode 0 at 40 MHz, RGB565, 240 x 240, initialization sequence from the Waveshare LCD_1inch28 example.
  • 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.