Commit Graph
7 Commits
Author SHA1 Message Date
bonaminandClaude Sonnet 4.6 0ac63e82ed feat(F-040,F-041,F-042): relay.set_config, output numbering fix, clock batch commands
Enforce 1-based output numbering throughout the entire stack. Stored values,
MQTT wire format, and console UI are all 1-based; the single 0-based conversion
happens only in OutputManager::getPhysicalOutput(). Fixed createDefaultBellConfig
(was setting identity 0-based map instead of 0=disabled), updateBellDurations and
updateBellOutputs (support both v2 0/1 and v1 b1/b2 keys), all call
sites that bypassed getPhysicalOutput, and fireClockOutput conversion.

New commands:
- relay.set_config: combined durations + outputs in one round trip (F-040)
- clock.set_config: enabled/c1/c2/pulse_duration/pause_duration in one call (F-042)
- clock.set_alerts_config: alert type, bells, and silence windows in one call (F-042)

Feature catalog updated with F-040, F-041, F-042 detail sections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 18:44:52 +03:00
bonaminandClaude Sonnet 4.6 07d5b2fb81 feat(F-038,F-039): bell and clock test fire commands
relay.test_bell  — fire bell N using configured output + duration, non-blocking
relay.test_batch — fire a list of bells simultaneously (single melody step)
clock.test_c1    — fire C1 (ODD) clock output using pulse_duration
clock.test_c2    — fire C2 (EVEN) clock output using pulse_duration

All four bypass bellsEnabled guard intentionally — test commands always fire.
ClockHandler now accepts an optional OutputManager* for the test commands.
CommunicationRouter passes _outputManager to ClockHandler.
Feature catalog updated: F-038 and F-039 added.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-10 19:53:54 +03:00
bonaminandClaude Sonnet 4.6 e90771a539 feat(comms): bidirectional device control — bells master switch, guard toggle, runtime tracking, system aggregate commands
Adds full bidirectional remote control across all major subsystems,
establishing the device as the single source of truth for all settings.

New firmware features (F-029 to F-037):
- bells.enable / bells.disable: master ON/OFF for all playback and clock
  alerts (relay.test_output intentionally unaffected)
- telemetry.set_guard_enabled: enable/disable thermal protection at runtime
  without touching thresholds
- telemetry.set_max_loads: set bellMaxLoad per-bell or globally via command
- Device runtime tracking: lifetime seconds flushed to SD every 10 min,
  boot log (up to 200 entries, rotating) written after first NTP sync
- Total playback counter persisted to SD, increments on every play()
- telemetry.get_metrics / telemetry.reset_metrics: new aggregate read + reset
- system.get_config (replaces system.get_settings, old name still accepted),
  system.get_all (everything in one call), system.get_telemetry
- log.get_config, mqtt.get_config, bells.get_config: new getters for
  previously write-only subsystems
- network.status now includes ssid, mac, hostname
- BellsHandler: new handler registered on CommandBus
- LegacyAdapter updated with all new command mappings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-10 18:46:18 +03:00
bonaminandClaude Sonnet 4.6 825ffce5f5 docs(catalog): add F-028 logging calibration, expand F-014 NVS migration
F-014 updated from scaffold stub to full description: key rename table
(device_uid/hw_type/hw_version → serial/hw_family/hw_revision), hw_family
lookup table, idempotency behaviour.

F-028 new entry: default channel levels (Serial INFO, MQTT WARNING, SD
WARNING), per-subsystem MQTT caps table, and all secondary fixes from the
refactor(Logging) commit (early setLevel removal, heartbeat to VERBOSE,
HealthMonitor polling noise, FirmwareValidator boot lines, ConfigManager
VERBOSE cleanup).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-09 10:09:03 +03:00
bonaminandClaude Sonnet 4.6 9e415de7bc refactor(FileManager): drop HTTPS support — melody downloads over plain HTTP only
The ESP32 mbedTLS TLS handshake requires ~40KB of contiguous heap, which is
not reliably available after runtime heap fragmentation. Melody .bsm files
carry no credentials so plain HTTP is acceptable.

Removed: WiFiClientSecure, esp_task_wdt WDT disable/re-enable around the GET,
SSL heap guard, and all secureClient cleanup paths. HTTPS URLs are now rejected
immediately with a clear error log (F-027).

Also fixed: ensureDirectoryExists now strips trailing slashes instead of
appending one — SD.exists() returns false for directories when a trailing
slash is present.

Docs: feature-catalog.md F-027 added, FileManager README updated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 10:42:46 +03:00
bonaminandClaude Sonnet 4.6 9f33f90ea9 feat(Player): V2 playback command namespace + segment_duration fix + mode field
F-024 — V1 single-segment fix: when continuous_loop=false, total_duration is
now always overwritten with segment_duration regardless of what the client
sent. Sending total_duration:0 explicitly no longer bypasses the stop timer.
The play-once fallback in onMelodyLoopCompleted is tightened to only fire when
both segment_duration and total_duration are zero.

F-025 — V2 command namespace: PlaybackHandler now registers playback.play and
playback.stop instead of the old root-level playback command. LegacyAdapter
maps V1 { cmd:playback, action:play/stop } to the new V2 names so all deployed
clients keep working without changes.

F-026 — V2 mode field: setMelodyAttributes accepts a mode string (single /
timed / interval / infinite) with a duration field, replacing the ambiguous
continuous_loop + segment_duration + total_duration triplet. V1 timing fields
are still parsed when mode is absent.

Docs: feature-catalog.md entries F-024, F-025, F-026 added.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-07 10:30:05 +03:00
bonaminandClaude Sonnet 4.6 ee73d4d2c4 docs: add feature catalog and working rules to README
Establishes the production workflow:
- docs/features/feature-catalog.md: index + detail entries for all 23
  known features (F-001 through F-023), seeded from git history and
  current uncommitted changes
- docs/README.md: replaced loose notes with enforced Working Rules
  section (feature catalog mandate, commit discipline, session startup)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 09:52:01 +03:00