|
Aquarium Cooling Controller
ESP32 firmware for aquarium cooling fan control, monitoring, telemetry, and fault handling.
|
Converts sensor and fan health into alarms, severity, and responses. More...


Go to the source code of this file.
Classes | |
| struct | FaultPolicySnapshot |
| Complete policy decision for diagnostics and telemetry. More... | |
Namespaces | |
| namespace | FaultPolicy |
| Fault classification and telemetry labeling helpers. | |
Enumerations | |
| enum class | AlarmCode : uint8_t { kNone , kWaterSensorFault , kFanFault , kWaterSensorAndFanFault } |
| Stable alarm identifiers for telemetry and diagnostics. More... | |
| enum class | FaultSeverity : uint8_t { kNone , kWarning , kCritical } |
| Severity assigned to the current fault state. More... | |
| enum class | FaultResponse : uint8_t { kNormalControl , kWaterFallback , kReportFanFault , kWaterFallbackAndReportFanFault } |
| Control response selected for the current fault state. More... | |
Functions | |
| FaultPolicySnapshot | FaultPolicy::evaluate (const ControlSnapshot &controlSnapshot, const FaultMonitorSnapshot &faultSnapshot) |
| Evaluates alarms and fault response from control and fan-monitor state. | |
| const char * | FaultPolicy::alarmCodeLabel (AlarmCode alarmCode) |
| Converts an alarm code to a telemetry-safe label. | |
| const char * | FaultPolicy::severityLabel (FaultSeverity severity) |
| Converts a severity value to a telemetry-safe label. | |
| const char * | FaultPolicy::responseLabel (FaultResponse response) |
| Converts a fault response to a telemetry-safe label. | |
Converts sensor and fan health into alarms, severity, and responses.
The policy layer keeps fault interpretation separate from control calculation and raw fan plausibility checks. It turns those lower-level snapshots into user-facing alarm codes and high-level response categories for telemetry.
|
strong |
Stable alarm identifiers for telemetry and diagnostics.
Alarm codes are deliberately coarse and stable. They describe the externally relevant fault combination instead of exposing every internal counter or plausibility detail from the monitor.
| Enumerator | |
|---|---|
| kNone | No active alarm. |
| kWaterSensorFault | Water sensor is invalid. |
| kFanFault | Fan RPM plausibility fault is active. |
| kWaterSensorAndFanFault | Water sensor and fan faults are active together. |
|
strong |
Control response selected for the current fault state.
The response is a compact explanation of how the firmware should behave under the current fault combination. It is also published to MQTT so external integrations can react without duplicating firmware policy logic.
|
strong |
Severity assigned to the current fault state.
Severity expresses how much attention the fault needs. Water-sensor and fan faults are critical because cooling quality or cooling capacity is degraded.
| Enumerator | |
|---|---|
| kNone | No service action required. |
| kWarning | Degraded input but cooling can continue. |
| kCritical | Cooling is degraded or requires service attention. |