Skip to content

TreeHouse controllers: run standalone, add the Garage welder - #154

Open
ii-impy wants to merge 2 commits into
mainfrom
treehouse-standalone-garage
Open

ii-impy wants to merge 2 commits into
mainfrom
treehouse-standalone-garage

Conversation

@ii-impy

@ii-impy ii-impy commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

What

Re-works the TreeHouse location firmware so every controller holds a fixed look instead of reacting to Garden State, and adds a fifth controller for the Garage welding effect. Rationale is in the new ADR-0021.

Garden State ignored, not removed. Animators run from cg::fullyActive(), so every channel sits at its max_level. Controllers still join WiFi, parse OSC and log it (the heartbeat shows (standalone)). Setting kFollowGardenState in src/main.cpp to true restores the old behaviour.

Location Look
Dormer Breathe: a 12.5 s breath between 40% and 80%
Julia Wander (new): a drunk walk between 40% and 80%, about 60 s per full sweep
Jess patterns unchanged, now permanently at full drive
Swannatopia fireplace unchanged; the Chandelier now uses the same warm incandescent spec as the Overhead (it was green)
Garage (new) arc + 16 px glow, see below

Garage.

  • Arc channel. The arc is a new ChannelKind::Trigger: each tap is a 5 ms high pulse on the MOSFET gate, and the cap decides how long the flash lasts.
  • Welder timing. lib/Weld's Welder fires taps in three nested random ranges: sessions 8–25 s apart, bursts 1–5 s apart (2–6 per session), taps 20–50 ms apart (1–4 per burst).
  • Polling. The Welder is polled every loop() rather than every frame.
  • Recharge guarantee. Gaps are measured from the moment a tap actually fires, so a stalled loop can never out-run the cap's recharge.
  • Seeding. It is seeded from esp_random() once the radio is up, so the rhythm differs on every boot.
  • Glow strip. The new Weld pattern flashes violet-white under each tap, then cools through orange to dark. Each tap adds heat, so long bursts glow longer.
  • Pins. kArcPin and kGlowPin in garage.h are placeholders.
  • Self-test. garage-selftest taps once at the start of each colour phase, then fires a four-tap, 40 ms burst at the start of white.
  • Network. treehouse_garage is at 192.168.1.64 in network.json, net_config.h is regenerated, and the Garage is added to the Pi's locations.controllers.

Related to #44 (Pi-side reactivity); this PR doesn't close any issue.

Verification

  • pio test -e native: 47/47 pass (14 new: test_weld, plus breathe, wander, weld-glow and fully-active cases)
  • pio run for all 10 hardware envs (5 locations + 5 self-tests): all build, no warnings
  • make test in .venv: 266 passed
  • Not yet run on hardware: the pins, the 5 ms pulse width and the cap recharge timing all need bench confirmation

🤖 Generated with Claude Code

ii-impy and others added 2 commits October 1, 2026 15:09
Every controller now animates from a fully-active Garden State instead
of what the Pi sends, so each channel holds its max_level permanently.
The plumbing stays: state is still received and logged, and
kFollowGardenState in main.cpp hands control back (ADR-0021).

- Garage (new): a cap-discharge arc on a Trigger channel, fired by a
  Welder in random sessions (8-25 s apart), bursts (1-5 s) and taps
  (20-50 ms); 16 SK6812 pixels flash violet-white under each tap and
  cool through orange to dark. Pins are placeholders. garage-selftest
  added.
- Dormer: 12.5 s breath between 40% and 80%.
- Julia: drunk walk between 40% and 80%, about a minute per sweep.
- Swannatopia: Chandelier now matches the warm incandescent Overhead.
- network.json gains treehouse_garage (192.168.1.64).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant