This document defines how the system should respond to various failure scenarios. The middleware is responsible for implementing these fallback behaviors to ensure safe, continuous operation even when components fail.
Normal operation. Enexa cloud sends optimized dispatch commands in real-time. Full telemetry reporting. All features enabled.
Cloud unreachable. Middleware uses cached day-ahead schedule or falls back to reactive BMS rules. Buffers telemetry for later sync.
Critical failure or E-stop. All active operations stopped. Equipment held in safe configuration. Requires manual intervention.
Degradation path: System progressively falls back to safer modes as failures accumulate
Loss of communication with Enexa cloud services
Detection
No heartbeat response from cloud for 30 seconds
Response required within: 30 seconds
Recovery
Resume cloud commands immediately upon reconnection. Replay buffered telemetry.
Fallback Actions (in order)
Detection
3+ failed requests in 60-second window OR latency >2000ms
Recovery
Gradually return to real-time dispatch as connection stabilizes.
Fallback Actions (in order)
Detection
HTTP 401/403 responses from cloud API
Recovery
Require manual credential re-provisioning by authorized personnel.
Fallback Actions (in order)
Issues with the local control box software or hardware
Detection
Watchdog timer expiry (no heartbeat for 10 seconds)
Response required within: 10 seconds
Recovery
Middleware auto-recovers state from persistent storage on restart.
Fallback Actions (in order)
Detection
Memory usage >90% OR disk usage >95%
Recovery
Restore normal operation after resource cleanup or hardware upgrade.
Fallback Actions (in order)
Detection
NTP sync failure for >1 hour OR time delta >30 seconds
Recovery
Re-sync via NTP and recalibrate schedule offsets.
Fallback Actions (in order)
Issues with battery, BMS, or energy storage components
Detection
No CAN/Modbus response for 5 seconds
Response required within: 5 seconds
Recovery
Manual inspection required before resuming battery operations.
Fallback Actions (in order)
Detection
SOC <0% OR >100% OR delta >10% per minute without corresponding power flow
Recovery
Recalibrate SOC after full charge cycle or manual verification.
Fallback Actions (in order)
Detection
Cell temperature >45C OR <0C OR delta >5C between cells
Response required within: Immediate
Recovery
Automatic resume after thermal stabilization. Log event for analysis.
Fallback Actions (in order)
Detection
Command vs feedback state mismatch for >2 seconds
Recovery
Physical inspection and contactor replacement required.
Fallback Actions (in order)
Issues with utility grid connection or power quality
Detection
Grid voltage <180V OR frequency outside 47-53Hz for >100ms
Response required within: 100 milliseconds
Recovery
Wait for stable grid (5 minutes), then soft reconnection with ramp-up.
Fallback Actions (in order)
Detection
Voltage outside 207-253V OR THD >8% OR frequency outside 49.5-50.5Hz
Recovery
Resume normal operation when quality metrics return to acceptable range.
Fallback Actions (in order)
Detection
No meter response for 10 seconds OR CRC errors
Recovery
Restore meter communication and verify accuracy before resuming.
Fallback Actions (in order)
Issues with solar generation or inverters
Detection
Inverter fault code OR production <5% of expected for irradiance
Recovery
Automatic retry after inverter self-clears, or manual reset.
Fallback Actions (in order)
Detection
No inverter data for 30 seconds
Recovery
Resume actual readings when communication restored.
Fallback Actions (in order)
Issues with charging stations or vehicle communication
Detection
Charger fault code OR no heartbeat for 30 seconds
Recovery
Manual fault clear and test charge before returning to service.
Fallback Actions (in order)
Detection
Measured current >110% of setpoint for >5 seconds
Recovery
Gradual power increase if vehicle behaves correctly.
Fallback Actions (in order)
Detection
SOC 100% OR power <0.5kW for >10 minutes with connector locked
Recovery
Manual intervention or vehicle departure.
Fallback Actions (in order)
Emergency stops and protective device activations
Detection
E-stop input active OR safety relay open
Response required within: Immediate
Recovery
Physical E-stop reset + authorized personnel confirmation.
Fallback Actions (in order)
Detection
RCD trip OR ground fault monitor alarm
Response required within: Immediate
Recovery
Professional inspection and repair required.
Fallback Actions (in order)
Detection
AFCI trip OR arc signature in current waveform
Response required within: Immediate
Recovery
Professional inspection and repair required.
Fallback Actions (in order)
Sensor failures, stale data, or measurement conflicts
Detection
Data timestamp >30 seconds old
Recovery
Resume normal operation when fresh data arrives.
Fallback Actions (in order)
Detection
Value outside defined min/max bounds OR NaN/Inf
Recovery
Sensor recalibration or replacement.
Fallback Actions (in order)
Detection
Delta between redundant sensors >10% of range
Recovery
Sensor alignment or replacement.
Fallback Actions (in order)
Authentication failures, attacks, and unauthorized access
Detection
SSL handshake failure OR certificate expiry warning
Recovery
Install new valid certificate. Verify chain of trust before resuming.
Fallback Actions (in order)
Detection
Command timestamp >60s old OR sequence number already seen
Recovery
Investigate source of replayed commands. May indicate network MITM.
Fallback Actions (in order)
Detection
Invalid API key OR command signed with unknown key
Recovery
Security audit required. Re-provision credentials if compromised.
Fallback Actions (in order)
Detection
Request rate >10x normal OR memory/CPU exhaustion
Recovery
Block attacking sources. Review firewall rules.
Fallback Actions (in order)
Update failures, version mismatches, and configuration issues
Detection
Update process timeout OR checksum mismatch OR boot failure
Recovery
Manual firmware re-installation via local interface.
Fallback Actions (in order)
Detection
API returns 426 Upgrade Required OR schema validation failures
Recovery
Update middleware firmware to compatible version.
Fallback Actions (in order)
Detection
Config parse failure OR CRC mismatch
Recovery
Re-provision site configuration from Enexa admin portal.
Fallback Actions (in order)
Before deploying the middleware, Amperio Team must demonstrate successful handling of: