feat: add addressable RGB LED status display system#4
Merged
Conversation
Add WS2812B (NeoPixel) LED strip support as a background daemon with animated scenes that reflect bench state (idle, flashing, testing, error, etc.). Any process can trigger scene changes via Unix socket IPC. - LedConfig model with led_count, gpio_pin, brightness, fps, socket_path - LedStrip Protocol with Ws281xStrip (hardware) and StubStrip (testing) - 10 built-in scenes: idle, flashing, testing, error, success, booting, off, solid, rainbow, progress — all time-based animations - Single-threaded daemon with selectors-based event loop at 30 FPS - LedClient for short-lived Unix socket IPC - CLI commands: set-scene, off, list-scenes, status, daemon - Publisher hooks trigger LED scenes on flash/health events - Health check for LED daemon (only when enabled) - Systemd unit and bootstrap/update scripts for deployment - 69 new tests (155 total), all passing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The pyproject.toml mypy override already handles missing imports for rpi_ws281x, so inline ignore comments are redundant and cause CI errors with --ignore-missing-imports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers quick start, built-in scenes, Python/CLI/workflow usage, socket protocol, how to add custom scenes, hardware wiring, and troubleshooting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cache rpi_ws281x.Color in Ws281xStrip.__init__ to avoid per-pixel import overhead in the 30 FPS render loop. Deduplicate scene-switching by having _cmd_set_scene delegate to _set_scene. Hoist contextlib import to module level. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Architecture
New files
src/hilbench/led/_models.pysrc/hilbench/led/_strip.pysrc/hilbench/led/_scenes.pysrc/hilbench/led/_daemon.pysrc/hilbench/led/_client.pysrc/hilbench/cli/led_cmd.pysystemd/hil-bench-led.servicebootstrap/install_led_service.shModified files
src/hilbench/config.pyLedConfigmodel +ledfield onBenchConfigsrc/hilbench/exceptions.pyLedErrorsrc/hilbench/cli/main.pyledcommand groupsrc/hilbench/publisher/_hooks.pysrc/hilbench/health.pyled_daemonhealth checkpyproject.tomlledoptional dep group, mypy overrideconfigs/config.template.yamlled:sectionconfigs/bench-config.example.yamlled:examplebootstrap/bootstrap_pi.shbootstrap/update.shTest plan
systemctl start hil-bench-led,benchctl led set-scene rainbow🤖 Generated with Claude Code