Repository navigation
Dim the status LED and create the SD log at the first sample - #28
Merged
Merged
Conversation
The LED drives the WS2812 linearly, so even the "low" settings were glaring in a dark room: the heartbeat lit all three channels at 20/255 and a solid alarm at 64/255. Heartbeat drops to 2%, alarms (solid and pulse peak) to 4% and the boot strobe to 3%. Alarms stop at 4% because amber is red plus half green and drifts to red below that. Identify keeps its brightness so a unit can be found in a rack. sd_create ran on time sync and on mount, so a unit in a boot loop left an empty log per boot, thousands a day, until the card's directory slowed the unit into a loop of its own. Only sensor_sample runs it now, just before the first row, which it already did as a retry. A file exists only if a row goes into it; the filename carries the first sample's time and the header the tags then in force. The samba deploy gate accepts an empty card after an erase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The component remounts on its own after a removal or two failed writes, and sd_logfile survived it, so a swapped card had the old log name recreated headerless by append_file. on_mount now keeps the latch only if sd_filename exists on the card just mounted. A tag change clears the latch and leaves the new log to the next sample, like every other path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
LED
Linear drive (
gamma_correct: 1.0) made the existing levels glaring in a dark room.Alarms floor at 4% so amber (red + half green) stays distinguishable.
SD log
sd_createno longer runs onon_time_sync(rtc.yaml) oron_mount(sd.yaml);sensor_sample's existing retry path creates the log just before the first row. A boot-looping unit now writes no empty logs.samba deploy's erase gate (sd_logs.py) accepts an empty card;samba_calibration/tests/fake_device.py:640still models a log appearing immediately after erase, so the fake is now slightly optimisticChecks
esphome config/esphome compilepass on 2026.9.0manifest.jsonchange🤖 Generated with Claude Code