Edge street lighting · Huế, Việt Nam

Street lighting, engineered and operated with Claude

StreetLight Edge times every lamp from the sun and the weather, runs on an Arduino UNO Q inside the cabinet, and meters every watt-hour. Claude writes, tests, releases and audits the system. A person approves every step that touches the street.

Tonight in Huế

—
Sky brightness from noon to noon in Huế with the cabinet's lamp schedule.
--:--Sunset
--:--Civil dusk
--:--Civil dawn
--:--Sunrise
The sky is computed live in your browser for Huế (16.46° N, 107.59° E). The lamp bars show the schedule now running on field cabinet HS-001: all three lamps on at 17:30, off at 05:50.

Measured in the field, October 2026

2,222 WhLamp energy per night on the legacy timer, mean of four metered nights
3 / 3Lamps with their own energy meter, read noon to noon
0.83 msp99 time to plan one night on the UNO Q (dry-run benchmark)
≤ 1 sCabinet clock offset against an independent reference, checked daily

Claude in the system

One AI engineer across firmware, web, data and paperwork

Claude works through Claude Code on the same repository, servers and device the team uses. Each card below is work it has already shipped on this project.

Firmware

Releases to the cabinet

Wrote and tested the per-lamp metering release and the truthful schedule-label fix for the UNO Q. Each one shipped only after owner approval, with lamps off, a backup and a rollback ready.

APP_VERSION 1.4.1-truthful-schedule-origin
Web platform

A dashboard that tells the truth

Built the schedule-origin card and a decision table that separates applied schedules from model proposals. Every change was checked on an isolated staging copy before it could reach production.

scheduleOrigin: operator_schedule
Automation

An autopilot that runs without it

Wrote the daily checks that run on the server and on the cabinet by themselves and alert the team on Telegram. Nobody has to keep a Claude window open.

unoq14d-daily.timer · 15:45
Evaluation

Model tests with locked rules

Froze the pass criteria and the evaluation code, then let the cabinet open the held-out test set exactly once and record the verdict unchanged.

D7_DECISION.json
Operations

Read-only audits of production

Reads the production database through a read-only role to reconcile commands, meter registers and clocks night by night, without the power to change them.

role claude_ro · SELECT only
Documentation

Bilingual by default

Drafts runbooks, figures and the research manuscript in English and Vietnamese, then checks that both versions carry the same numbers.

MANUSCRIPT_EN.md ⇄ MANUSCRIPT_VI.md

Who decides what

Claude builds. The cabinet executes. People approve.

Claude

  • Writes and reviews code, firmware and tests
  • Prepares releases with backup and rollback
  • Audits data, clocks and command logs
  • Writes reports in English and Vietnamese

The cabinet

  • Stores and runs the night's schedule locally
  • Keeps switching inside civil-twilight limits
  • Falls back to fixed margins when inputs are unreliable
  • Meters each lamp and logs every relay change

People

  • Approve every release and field change
  • Set the rules a model must pass before deployment
  • Hold the only write access to production
  • Decide what the project claims in public

How Claude works

Every task leaves a receipt

Claude cannot start work it has not declared. A guard script checks each task against the research plan before and after.

  1. Declare the intent

    Scope, files, plan section and pass criteria go into an immutable receipt, registered by hash.

  2. Pass the guard

    The guard rejects tasks outside the approved scope, protected files, or actions the plan does not allow.

  3. Change and test

    Remote commands run from hashed scripts. Tests and a bilingual review run before anything is called done.

  4. Close with evidence

    The closure lists every file actually changed, including untracked ones, and the guard checks it once more.

20261005-14d-device-pull.intent.json
{
  "schema": "unoq-task/v1",
  "task_id": "UNOQ-14D-WP5-DEVICE-PULL-20261005",
  "work_package": "WP5",
  "action": "local_audit",
  "requirements": ["U05", "U07", "U10", "U11"],
  "acceptance_checks": [
    "guard_check_task",
    "readonly_scope_manual_review"
  ],
  "production_effects": false
}
A real receipt from 5 Oct 2026: Claude pulled the cabinet's daily reports read-only, then closed the task with check-close passing.

Autopilot

Claude wrote the night shift, then stepped away

The checks Claude wrote run on the server and the cabinet every day. They report to the team's phone and stop safely when something looks wrong.

Night energy from each meter's register, noon to noon, with missing readings never counted as zero.

Firmware hashes, the installed schedule and AI flags, compared with the approved release.

Clock drift against an independent HTTPS time reference, flagged above 120 s.

UNO Q · 15:45OK
daily 2026-10-04 · app running · hashes ✓ · AUTO|17:30,CLOSE_100|05:50,OPEN_100 · clock +0.8 s · pzem_meters 3/3
VPS · 15:40OK
night 2026-10-03 · TIMER · admissible · 561 + 838 + 824 = 2,223 Wh · CLOSE_100 17:30:02 · OPEN_100 05:50:02
UNO Q · 09:00D7
model gate · support ✓ · G1 ✗ · G2 ✗ · DO_NOT_RETAIN · TIMER continues

Values from the project's own reports, condensed for display.

At the cabinet

Three states, two relays, three meters

Relay K1 feeds lamps 1 and 2. Relay K2 feeds lamp 3. Each lamp has its own PZEM energy meter.

K1ON
Lamps 1 + 2
K2ON
Lamp 3
L1 · PZEM 1
L2 · PZEM 2
L3 · PZEM 3

Mode codes name relay states, not dimming percentages. Turning lamp 3 off changes how light falls on the street, so it is reported as a lighting change, not only as energy.

Evidence

We publish what the data says, including a no

Before a learned schedule may run on a street, it has to beat a well-tuned rule on a year of unseen data, under criteria fixed in advance. Our first compact model matched the rule on forecast skill but kept the extra lighting margin far more often. It did not pass, so it stays off the street.

The field keeps running a transparent two-state schedule while the model improves. Energy figures on this page come from the meters, never from nameplate power multiplied by hours.

Model gate, 4 Oct 2026750 windows
Enough dark events to judge30/30 · 80/80
Forecast skill, Brier score (model vs rule)0.1131 vs 0.1134
Skill clearly above zeroNo (−0.041)
Optional margins kept (model vs rule)550 vs 448
DecisionNot deployed

Pilot with us

Start with meters and an honest baseline

We fit per-lamp metering and an edge controller to your cabinets, measure the schedule you run today, and test any change against it. Claude handles the engineering paperwork; your team keeps the keys.