Skip to content

feat: Fan failure detection and alerting #13

@cursor

Description

@cursor

Feature Description

Detect when fans fail or stall and provide alerts.

Detection Methods

1. RPM Monitoring

  • Fan should be running but RPM = 0
  • Stalled fan (RPM below threshold despite PWM > 0)
  • Disconnected fan (no tach signal)

2. Threshold-Based

  • Minimum RPM per fan configurable
  • Timeout for detection (avoid false positives)
  • Distinguish between stopped vs. failed

Alert Mechanisms

USB Notifications

  • Status Report (0x10) includes error flags
  • Error codes per fan
  • Host software can show notifications

Visual Alerts

  • Status LED blinks pattern
  • RGB LEDs flash red
  • Display shows error (if OLED present)

Audible Alert (Optional)

  • Buzzer on GPIO
  • Beep pattern for critical failures

Actions on Failure

Safety Actions:

  • Other fans → 100% (compensate)
  • Log event in flash
  • Keep trying to restart failed fan
  • Report to host

User Notification:

  • Desktop notification (Linux)
  • System tray icon change
  • Log to syslog

Configuration

pico-fan-ctl config alert --enable
pico-fan-ctl config alert --min-rpm 300
pico-fan-ctl config alert --timeout 10s
pico-fan-ctl config alert --action compensate

Priority

High - Safety critical feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions