
Dashboards are great when you are sitting at a browser, but when you walk past a homelab rack, nothing beats a 16×16 RGB LED matrix that tells you in half a second whether every server, Raspberry Pi, ClusterHAT node, and UPS is healthy.
In our earlier Weave Scope post, we connected four x86_64 servers (nas1 through nas4) into a central Scope topology over Tailscale. Since then, the fleet grew to 13 nodes—adding rpi-1, rpi-4, rpi-5, rpi-rack (which also hosts a USB-attached UPS via NUT), and a ClusterHAT (cbridge + four Pi Zero nodes p1–p4).
Instead of letting rpi-1‘s Pimoroni Unicorn HAT HD sit idle or only scroll Bitcoin prices, we turned it into an always-on systemd display (homelab-matrix.service) that alternates between:
- A 13-node Fleet & 4-UPS Status Grid (10 seconds)
- A Soporului Home Assistant Ambient Ticker (office, server rack, balcony outdoor temperature, and CO₂ concentration)
Architecture: 256 Pixels, Three Data Sources
Every 10-second cycle, homelab_matrix.py pulls live telemetry from three places:
- Weave Scope (
https://<hub-ip>:4040/api/topology/hosts): Returns every active host reporting into our central Scope hub (nas3). All Raspberry Pis—including thearmv6lClusterHAT Pi Zeros (p1–p4) andarmv7lnodes (cbridge,rpi-1,rpi-4,rpi-5,rpi-rack)—run cross-compiled standaloneweavescopeprobe binaries (--mode=probe --probe.ebpf.connections=false) with zero Docker overhead. - Network UPS Tools (NUT, port
3493): Queries four UPSes directly over TCP (GET VAR <ups> ups.status) with a Home Assistant sensor fallback: rack_upsonrpi-rackvolt_upsonnas3rack_ups_1andrack_ups_2onnas1(reached directly over Tailscale oncetailscaledis up onrpi-1)- Home Assistant REST API (
http://<ha-ip>:8123/api/states/...): Fetches Soporului indoor/outdoor temperature and CO₂ sensors.
Pixel Layout on the 16×16 Grid
- Top 12 rows (13 ×
2×2blocks): Each of the 13 hosts (nas1–nas4,cbridge,p1–p4,rpi-1,rpi-4,rpi-5,rpi-rack) lights up green when present in/api/topology/hostsor red if missing. - Bottom 2 rows (4 ×
3×2bars with a 1-pixel gap): Each bar represents one of the four fleet UPSes: - Blue:
OL(Online / Utility Power) - Flashing Red:
OB(On Battery — also interrupts the ambient ticker withUPS ON BATTERY!) - Amber: Offline /
upsdunreachable - Ambient Ticker: Scrolls
OFF <temp>C RACK <temp>C OUT <temp>C CO2 <ppm>usingPILandFreeSansBold.ttf, colored green (< 800 ppm), yellow (800–1200 ppm), or red (> 1200 ppm).
Hardware & OS Gotchas We Hit Along the Way
Getting rpi-1 and the Unicorn HAT HD to this state turned up four real-world pitfalls worth documenting:
- A Bad USB SD Card Reader (
14cd:1212): Three consecutive microSD flashes through a cheap14cd:1212USB reader ended inAttempted to kill init! exitcode=0x0000000borInode ... contains garbageonresize2fs. Switching to the laptop’s built-in SD controller (/dev/mmcblk0) passed all fivee2fsck -fnpasses on the first try at18.7 MB/s. - Unicorn HAT HD Needs a Cold 5V Power-Cycle After Enabling SPI: Enabling
dtparam=spi=onviaraspi-configand soft-rebooting (sudo reboot) left/dev/spidev0.0active andGPIO 9/10/11inALT0, yet the LEDs stayed dark. Pulling the 5V power cable for 5 seconds reset the HAT’s onboard STM32 controller, and the display lit up immediately. - Compete-Free SPI Ownership: Our old
show_btc.servicewas still enabled inauto-restartmode; every time it exited,unicornhathd‘satexithandler wiped the matrix. Disablingshow_btc.servicebefore startinghomelab-matrix.serviceeliminated the flicker. - Stale NUT
upsdAccept Queues: Two UPS bars stayed amber even though the USB cables were plugged in—ss -tlnshowedRecv-Q=17 / Send-Q=16on port3493becauseupsdhad deadlocked on a stale driver poll. Restartingnut-driver@*andnut-serverbrought all four UPSes back toOL.
Running It as a systemd Service
Store the Home Assistant long-lived token and Weave Scope basic-auth password in /etc/homelab_matrix.env (chmod 600):
HA_TOKEN=<your-home-assistant-token>
SCOPE_PASS=<your-weavescope-password>
And create /etc/systemd/system/homelab-matrix.service:
[Unit]
Description=Homelab Fleet + Ambient Matrix on Unicorn HAT HD
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
EnvironmentFile=/etc/homelab_matrix.env
ExecStart=/usr/bin/python3 /opt/homelab-matrix/homelab_matrix.py
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Enable and start it with:
sudo systemctl disable --now show_btc.service 2>/dev/null || true
sudo systemctl daemon-reload
sudo systemctl enable --now homelab-matrix.service
With homelab_matrix.py running in rotation(270) to match the rack mounting, a single glance at rpi-1 now confirms all 13 hosts, all 4 UPSes, and Soporului room/rack/outdoor comfort without opening a single tab.