~/work/solar-installation-monitor.md
Case study

Solar Installation Monitor

A Pi-based status box for a US solar installer — four red/green LEDs that mirror whether the installation's networked devices are answering, plus a Django admin for configuration. Shipped end-to-end in 48 hours and built to sit unattended in the field for years.

role
Solo · hardware spec · software · provisioning installer
client
US-based solar installer · name withheld
sector
Solar · installation monitoring · at-a-glance status
stack
Raspberry Pi · Raspbian · Django · Celery · systemd · mDNS · GPIO · Bash
surface
Physical LED strips · Django admin for configuration · one-line SD-image installer
delivery
48 hours from brief to deployable solution (2020)
01 / Problem

Confidence, not a dashboard

A US solar installer wanted to give clients a simple, physical answer to "is my system running?" — not another tab in a browser. Each installation has four networked devices, and the right signal is the one you can read from across the room: green means talking, dark means something's wrong. The installer also needed a way to configure each box per site — device IPs, ping intervals, network settings — without complexities of logging in over SSH.

02 / The box

Pi, hat, LEDs

diagram · data flowdevices · Pi · LEDs and admin
devices on LAN inverter gateway router …up to 4 targets Pi + StatusBoard Pro Celery · ping · threshold Django admin systemd · tmpfs logs static IP · mDNS LED strips 5 × red / green installer browser no SSH needed ping · ICMP GPIO HTTP
Pi + PiHut StatusBoard Pro hat at the centre · pings the networked devices on a configurable interval, drives up to five red/green LED strips over GPIO, and serves the Django admin so the installer configures each box over HTTP — no SSH

The box is a Raspberry Pi fitted with a PiHut StatusBoard Pro hat, driving up to five red/green LED strips through GPIO. A Celery worker handles the background pinging. Each device has its own ping interval and failure threshold — for example, three missed pings at 30 seconds before the LED flips red — and those thresholds are tuned per installation from the admin. Everything lives in one off-the-shelf enclosure that the installer opens, plugs in, and leaves.

03 / Admin-configurable

Django admin is the UI

The web interface is the Django admin with minimal visual polish — function over form. Network config (DHCP or static), per-device IPs and thresholds, which LED strip represents which device — all of it lives in admin screens the installer reaches on the box's mDNS hostname. No custom front-end, no SSH, no developer in the loop when a site needs retuning.

04 / Hardened for the field

One-line installer, years of life

One-line installer. curl ... | bash on a fresh Raspbian image provisions the whole box end-to-end: compiles Python 3.8, installs the Django app as a systemd service, sets up a static IP with mDNS discovery, and starts everything. Going from a blank SD card to a working monitor takes one command.

tmpfs logs. Logs live in RAM, not on the SD card. When a box sits unattended in the field for years, log churn is what kills the card first; moving it to tmpfs pushes that failure mode off the table.

Pluggable reader. The active device-reader class is a dotted Python path in Django settings and is dynamically imported at startup — the same pattern Django uses for middleware. A fake reader runs during local development; the real one runs on hardware. Swapping readers for a different monitoring surface (not just ICMP) is a settings change.

48 hours from brief to shippable box — because the hardware was off-the-shelf, the UI was the admin, and the field-hardening was already patterns I'd used before.
05 / Tech stack

Tools

  • Raspberry Pi · PiHut StatusBoard Pro
  • Raspbian · systemd · tmpfs
  • Python 3.8 · Django (admin as UI)
  • Celery (background pinging)
  • mDNS (zero-config hostname discovery)
  • Bash (one-line remote installer)
  • GPIO · RPi.GPIO (LED control)
~/work
01 / 01 navigate · Esc close