Technical note · Haus and luxd

HAIG: why settings screens limit features

Systems
Haus (home lighting, climate, and shade hub + iOS app) and luxd (ESP32 LED strip controllers, host daemon, and app)
Audience
Software engineers
Thesis
An AI configures through a rich API; people watch
Style
Short sentences, after ASD-STE100
Abstract

Settings screens do not just make software harder to use. They decide which features get built. A feature ships only if a form can explain it. HAIG (Human-AI Interface Guidelines) removes settings screens and moves configuration to an AI working over a documented HTTP API. Once nothing has to fit on a form, the data model can express real complexity. This note shows the result in two live systems from one house: a morning routine in Haus and a 3D light show in luxd.

1Settings screens limit features

Every option needs a UI control, a label, a default value, input validation, and help text. As options grow, screens multiply until nobody wants to touch them.

People do not want to operate a configuration tool. They want the software to do the right thing. To keep forms simple, product teams cut options and flatten the underlying model. Once those options are gone, the software can do only what its screens can show (Figure 1).

Figure 1. One setting, "morning lights", as the house's real needs grow.
(a) Morning lights
Turn on at7:00 AM
Easy to use. Too simple for the house.
(b) Morning lights
StartSunrise
Offset−30 min
Fade duration75 min
Target40%, 2200 K
Better. All rooms still start at the same time.
(c) Morning lights
StartFirst of
Edge 1Trigger
Sensors2 selected
Window5:30–9:00
Edge 2Sunrise −30
Override manual changeNo
Applies toRoutine
Matches what the house needs. No product team would ship this form.

Form (c) is not a usability failure. It is a feature that disappears whenever configuration must fit on a screen. Haus runs form (c) today, not as a form, but as data: start.first_of plus a shared trigger.

2Configuration via AI unlocks richer data models

Most settings UI is a translation layer between human intent and stored data. An AI does that translation well. It reads the API (GET /api) and current state, maps plain words onto nested schemas, checks the result, and reports back in words. It does not guess what it cannot know. Behavior has no hidden defaults, so when a spoken request leaves a choice open, the AI asks.

Once humans no longer fill out forms, the data model stops bending around screen layouts. Nested structures, shared triggers, field-level inheritance, ranked rules, and even compiled programs become normal configuration. When a household needs a new capability, engineers add one reusable part to the model instead of building another screen (Table 1).

Table 1. Data-model features that work cleanly through an API but break down on settings screens.
PartWhat it lets the system express
start.first_ofStart at the earliest of several edges: a clock time, a sun offset, or a trigger.
Shared triggerName one condition ("first motion on these sensors between 5:30 AM and 9:00 AM") and reuse it across routines.
followsLet one routine inherit unset fields from another routine, field by field.
daysLayer all, weekdays or weekends, and single days. The most specific match wins per field.
Ranked rulesExpress conditional behavior with explicit priority: "garage lights on with motion, off 5 minutes after the last motion, even after a manual switch".
Programs as dataStore a luxd light show as compiled bytecode that reads 3D house coordinates, roof slope, and tree angle (Section 4).

3Example: a morning routine in Haus

Haus runs one real house's lights, thermostats, shades, and living-room TV. Its morning behavior starts from two spoken sentences.

Spoken statement "Slowly turn up the house lights starting 30 minutes before sunrise. If I get up earlier, but after 5:30 AM, kick off the kitchen and foyer lights early, turn on the TV and make sure the volume is low."

Two sentences contain seven separate decisions (Table 2). No consumer settings screen holds all seven cleanly.

Table 2. The seven decisions inside the spoken statement.
IDWordsDecision
D1"Slowly turn up"Use a fade, not a switch. It needs a target brightness, a warmth, and a duration.
D2"30 minutes before sunrise"Start relative to sunrise. The clock time shifts every day.
D3"If I get up earlier"Watch the two motion sensors that see Andy first. Count only the first motion in the window. If it happens before the house's start, the kitchen and foyer start early. Whenever it happens in the window, the TV turns on.
D4"but after 5:30 AM"Open the trigger window at 5:30 AM. Ignore motion at 3:00 AM.
D5"kick off the kitchen and foyer lights early"Place the kitchen drop lights and foyer chandelier in their own routine. Start it on motion, or at the house's time if no motion happens.
D6"turn on the TV"Turn the TV on only after motion in the window. Leave it off if no motion happens. Send power-on once, then let people use the remote.
D7"make sure the volume is low"Set the soundbar volume before the TV turns on. Hold that volume for 30 s after the TV reports on, because TV audio startup can raise it.

3.1Why visual flow tools do not solve it

Power-user tools such as Node-RED lift the limits of a form, but they trade missing features for hand-wired state plumbing. An illustrative Node-RED flow for the same two sentences takes about 14 nodes, with four fragile points (Table 3). The fourth is not illustrative: this house's former Node-RED flow really set the Sonos volume seven times, one second apart.

Table 3. The four fragile points in an illustrative 14-node Node-RED reconstruction.
StepWhat the flow must wire by handFailure mode
Manual fade stopStop the 75-minute fade when someone flips a switchHard to tell a manual change from the flow's own writes
First-motion flagRemember the day's first motion in flow context and reset it at midnightA restart erases the flag
Dual-start guardSkip the sunrise start for kitchen and foyer if motion already started themTwo flows share mutable state
TV volume holdWait for TV on, then set Sonos volume again over 30 sThis house's old flow set it seven times, 1 s apart

3.2What the AI writes in Haus

In Haus, the AI writes one shared trigger and three moment settings (Listing 1). The hub runs the shared mechanics in every house. It steps the fade, detects a manual change at a switch, keeps the day's first trigger across a restart, and holds the soundbar volume while the TV starts.

Listing 1. Live Haus configuration: one trigger and three moments. Scroll sideways to read long lines.
// The trigger. The hub reads it back as its own sentence.
{"name": "Morning motion",
 "words": "The first motion on Eye of Sauron or Bedroom Office Sensor between 5:30 AM and 9:00 AM"}

// D1, D2. House: slowly, 30 min before sunrise (and the thermostat's band).
{"place": "routine:house", "moment": "morning", "days": "all",
 "start": {"first_of": [{"sun": "sunrise", "offset": -1800}]},
 "brightness": 40, "kelvin": 2200, "duration": 4500,
 "thermostat": {"low": 68, "high": 77}, "overrides": true}

// D3, D4, D5. Good Morning: the kitchen and foyer. Its id is "test".
{"place": "routine:test", "moment": "morning", "days": "all",
 "start": {"first_of": [{"trigger": "t_0d6c15ca"}, {"sun": "sunrise", "offset": -1800}]}}

// D6, D7. The TV: motion only, once, the volume low.
{"place": "routine:wake-up-tv", "moment": "morning", "days": "all",
 "start": {"first_of": [{"trigger": "t_0d6c15ca"}]},
 "tv": {"power": "on", "volume": 5, "once": true, "hold": 30},
 "overrides": true}

The hold field shows how dropping settings screens changes what features exist. On one real morning, TV audio startup pushed the Sonos volume from 5 to 10 for 11 seconds. Andy said: "It seemed louder." No product team would add a "hold volume for N seconds after TV reports on" field to a settings screen for one complaint. Because Haus has no settings screens, hold became one reusable word in the model that works in every house. The AI added hold: 30. The next morning, Andy said: "No loud sound this morning!"

NoteListing 1 is this house's live configuration from GET /api/plan and GET /api/triggers, with setting IDs and unused fields omitted. Both the raw routine ID (routine:test) and the sensor name (Eye of Sauron) are verbatim from the hub.

4Example: a light show in luxd

luxd runs a fleet of custom ESP32 controllers driving exterior and indoor WS281x LED strips, managed by a host daemon (luxd-host). Most LED controllers ship a fixed list of firmware effects with two or three sliders for speed, intensity, and palette. Those sliders exist because no human will program 3D house geometry on a phone screen.

Removing that UI ceiling changed the product itself. In luxd, a look is a small program written in a dedicated effect language [4]. The AI writes the program, compiles it to VM bytecode, and sends it to the controllers over the API as data. Each controller stores the physical layout of its strip. A look can read every LED's 3D position on the house in feet (hx, hy, hz), its roof slope, and its angle around a tree (Table 4).

Table 4. Fireworks in a slider-driven firmware effect versus an AI-written luxd program.
AspectStrip-based firmware effectHouse Fireworks in luxd
Controls2 or 3 sliders: speed, burst rate, palette3 parameters: burst period (s), shell radius (ft), second-shell brightness (%)
Space1D pixel index along each strip; roof and tree run apartShared 3D house coordinates in feet (hx, hy, hz) across roof and tree
MotionFixed burst pattern compiled into firmwareA rocket moves up the house to a 3D launch point. A shell expands to 16 ft and drops under gravity. Each LED lights when the shell crosses it. A dimmer second shell expands elsewhere.
DeliveryBuilt into firmware; new effects need a firmware update511 bytes of VM bytecode (format 7; 438 bytes in format 9), sent to boards as data

How to read Listing 2:

Listing 2. House Fireworks, verbatim 32-line source (tools/looks/show-off/house-fireworks.dsl). Scroll sideways to read long lines.
// House Fireworks: a glow climbs the house to a point in the air before it, then a shell of light
// grows from there in feet, glittering and fading as it grows, a new color and place each burst; a
// fainter second shell blooms elsewhere as the first fades. Reads house positions (VM 7).
// No sqrt: d² − r² ≈ 2r(d − r) near the shell, so bump(d² − r², 3r + 1) is a ~1.5 ft band.
param pace = 6 [4..15]           // s per burst: climb, bloom, fade, dark
param size = 16 [6..40]          // ft the shell grows to
param echo = 45 [0..100]         // % brightness of the fainter second shell
let e = floor(tick(1000, 65535) / pace)
let s = phase(pace * 1000)
let up = min(s * 5, 1)                                     // the climb, 0..1
let tau = clamp(s * 2 - 0.4, 0, 1)                         // the first shell, 0..1
let tau2 = clamp(s * 2.5 - 1, 0, 1)                        // the second, from as the first fades
let cx = 2 + 46 * hash2(e, 1)                              // burst points, ft
let cy = 3 + 5 * hash2(e, 2)
let cz = 3 + 5 * hash2(e, 3)
let bx = 2 + 46 * hash2(e, 4)
let by = 3 + 5 * hash2(e, 5)
let r = size * (1 - exp2(-6 * tau))
let r2 = 0.6 * size * (1 - exp2(-6 * tau2))
let dz = (hz - cz) * (hz - cz)
let dx = (hx - cx) * (hx - cx)
let dxz = dx + dz
let gy = hy - cy + 2 * tau * tau                           // it sags a little as it grows
let gy2 = hy - by + 2 * tau2 * tau2
let ry = hy - cy * up * (2 - up)
let rocket = (up < 1) * 0.6 * bump(dx + ry * ry, 5)        // any depth: the lights at its x, up the house
let one = (up >= 1) * (1 - tau) * (1 - tau) * bump(dxz + gy * gy - r * r, 3 * r + 1)
let two = sign(tau2) * (1 - tau2) * (1 - tau2) * (echo / 100) * bump((hx - bx) * (hx - bx) + dz + gy2 * gy2 - r2 * r2, 3 * r2 + 1)
let glint = 0.4 + 0.6 * noise2(i, s * pace * 5)            // each light glitters on its own
color      = frac(e * 0.618034 + 0.4 * (two > one))
brightness = 1
alpha      = max(rocket, max(one, two) * glint)

4.1Checks and schedules as data

Every look passes three checks before the house shows it:

  1. luxc compiles the source through the shared verifier. It rejects syntax errors and programs over size or work limits.
  2. Each ESP32 controller verifies incoming bytecode again before running it. A bad program never runs and cannot stall the 10 ms render tick.
  3. GET /api/render runs the shared Rust VM and returns exact frames. The AI checks those frames before scheduling the look.

Schedules work the same way. Seasons, holidays, and game days live as schedule data alongside each look's notes. For example, Blue Wave's stored notes read: "For election nights — the Tuesday after the first Monday in November, every even year (next: Nov 7, 2028) — and the night after." A tap on "calmer" or "warmer" in the app never edits a look. It records a request for the next session with the AI.

5Why it stays safe in practice

Letting an AI configure works only when the server enforces the guard rails instead of the prompt. Five mechanisms keep both systems predictable:

6References

  1. [1]HAIG: Human-AI Interface Guidelines, the full thesis and adoption architecture.
  2. [2]Two truths and pure functions, the companion runtime architecture note.
  3. [3]tkhaus, docs/HAIG.md, docs/PRINCIPLES.md, and docs/MODEL.md: Haus hub design and HAIG rules.
  4. [4]luxd, DSL.md and README.md: the effect language, VM limits, and fleet host.
  5. [5]API contracts: tkhaus docs/API.md and GET /api on both hubs.
End of technical note