The SD-based boot history (logBootEvent() -> /telemetry_boot_log.json)
was write-only: nothing in the firmware ever read it back, and its
"boot" field was a locally-tallied counter (only advanced on the
NTP-gated write path) that could silently drift from the new
lifetime_boot_count added in the previous commit.
- logBootEvent() now stamps each entry with getLifetimeBootCount()
directly instead of its own total_boots tally, so the SD history's
"boot" numbers always agree with what MQTT boot_report and
telemetry.get_metrics/system.get_telemetry report. The old
total_boots JSON key is no longer written (old files may still have
it; current firmware ignores it).
- Each entry now also carries crash detail (task/pc/exc_cause/
exc_vaddr) when a coredump was captured for that boot, same shape
as the MQTT boot_report's crash object.
- New Telemetry::getBootHistory() + telemetry.get_boot_history command
actually exposes the file: optional {"limit": N} (clamped 1-200),
returns {"count", "boots": [...]}. Returns an error response (not a
crash or empty success) when there's no SD/FileManager or the file
doesn't exist yet — expected on agnus (no-SD) variants or before a
device's first NTP sync.
Full request/response contract documented in Telemetry's README and
feature-catalog.md F-053, written for direct consumption by whoever
builds the console-side retrieval UI.
Verified: pio run on vesper-std-v1 and agnus-v1 (no-SD variant).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Project Vesper — Documentation
Bell automation firmware for ESP32 (Kincony KC868-A6).
Reference
| File | Description |
|---|---|
| reference/api-reference.md | Firmware API v2 — all commands, transports, envelope format |
| reference/firmware-variants.md | PlatformIO environments, partition tables, build flags, OTA URLs |
| reference/api-reference-v1-legacy.md | Old v1 API (pre-refactor) — kept for historical reference |
Architecture
| File | Description |
|---|---|
| architecture/communication-refactor-plan.md | Full design doc for the v2 Communication subsystem (CommandBus, Handlers, Transports) |
Features
| File | Description |
|---|---|
| features/feature-catalog.md | Feature catalog — index + details for every feature on the device |
| features/heartbeat.md | MQTT heartbeat — retained 30s status publish (detail doc, also in catalog as F-008) |
Development
| File | Description |
|---|---|
| dev/platformio-commands.md | PlatformIO CLI reference |
| dev/common-commands.md | Common v1 command snippets (scratch/lab use) |
| dev/features-scratch.md | Feature notes and todo scratch pad |
Other
| File | Description |
|---|---|
| roadmap.md | Product roadmap |
| SentDevices/ | Records of deployed devices |
Working Rules (enforced in every session)
Context
This is ESP32 firmware (C++/Arduino/PlatformIO) for a bell automation controller.
It is maintained by a single developer over a long time, with AI assistance.
That means both of us can forget what was built weeks ago — so we need hard process rules to compensate.
Rules — non-negotiable
1. Feature catalog is mandatory.
Every feature added or changed must be logged in docs/features/feature-catalog.md.
Format: a short one-line entry in the index at the top, plus a detailed section below.
This is the single source of truth for "what does this device actually do?"
2. Commit every meaningful step.
Nothing stays uncommitted for long. Each logical unit of work (a fix, a feature, a refactor) gets its own commit with a clear message. Stacked uncommitted changes are a liability — they blur what changed and why.
3. Commit messages are descriptive.
fix(InputManager): add medium-press tier at 5s for WiFi-only reset
is better than fix button. The message must make sense to a reader in 6 months who has never seen this codebase.
4. Feature catalog entry before (or with) the commit.
When committing a feature or significant fix, the catalog entry is part of the same commit or committed immediately after. Never leave a feature undocumented.
5. At the start of every session, check what is uncommitted.
Before writing any new code, surface any dirty working tree and deal with it first — commit, discard, or document why it stays pending.
Feature catalog location
docs/features/feature-catalog.md
What counts as a "feature" for the catalog
- Any new user-facing behaviour (commands, button gestures, network modes, playback options)
- Any significant internal mechanism a future developer would need to know (e.g. two-tier factory reset, NTP UTC correction, builtin melody aliases)
- Bug fixes that change observable behaviour (e.g. default version fallback changed from 2→1)
What does NOT need a catalog entry
- Pure refactors with no behaviour change
- Log message tweaks
- Doc-only commits