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>
This commit is contained in:
@@ -217,10 +217,11 @@ public:
|
||||
* All clock settings are loaded from SD card at startup.
|
||||
*/
|
||||
struct GeneralConfig {
|
||||
uint8_t serialLogLevel = 3; // INFO
|
||||
uint8_t sdLogLevel = 2; // WARNING (inactive until SD callback is wired)
|
||||
uint8_t mqttLogLevel = 2; // WARNING
|
||||
uint8_t serialLogLevel = 3; // INFO
|
||||
uint8_t sdLogLevel = 2; // WARNING (inactive until SD callback is wired)
|
||||
uint8_t mqttLogLevel = 2; // WARNING
|
||||
bool mqttEnabled = true; // MQTT enabled by default
|
||||
bool bellsEnabled = true; // Master bell mechanism ON/OFF (blocks playback + clock alerts)
|
||||
String otaChannel = "stable"; // OTA release channel: "stable" | "beta" | "development"
|
||||
};
|
||||
|
||||
@@ -441,6 +442,8 @@ public:
|
||||
uint8_t getMqttLogLevel() const { return generalConfig.mqttLogLevel; }
|
||||
void setMqttEnabled(bool enabled) { generalConfig.mqttEnabled = enabled; mqttConfig.enabled = enabled; }
|
||||
bool getMqttEnabled() const { return generalConfig.mqttEnabled; }
|
||||
void setBellsEnabled(bool enabled) { generalConfig.bellsEnabled = enabled; }
|
||||
bool getBellsEnabled() const { return generalConfig.bellsEnabled; }
|
||||
String getOtaChannel() const { return generalConfig.otaChannel; }
|
||||
void setOtaChannel(const String& channel) { generalConfig.otaChannel = channel; }
|
||||
bool loadGeneralConfig();
|
||||
|
||||
Reference in New Issue
Block a user