infra/scripts/fan-control.env.example
Viktor Barzin 90ad6b9125 fan-control: presence-aware IPMI fan curve for the R730 PVE host
The iDRAC stock curve runs the CPU at ~72°C on the 7080 RPM floor even
under load (optimises for quiet, not cool). Add a bash daemon + systemd
unit that drives the chassis fans from CPU temp on two curves, picked by
garage occupancy (the server is in the garage): COOL when empty
(measured ~58-65°C under load), QUIET near the silent floor when the
ha-sofia garage door shows someone is there (open, or <15min since last
activity).

Manual fan mode is backstopped: bash EXIT trap + systemd ExecStopPost
hand fans back to Dell auto on stop/crash; CPU>=83°C or repeated IPMI
failures do the same. Pushgateway metrics (job=fan_control). 36 unit
tests cover the pure curve/hysteresis/presence/parse logic; DRY_RUN +
RUN_ONCE for integration checks. Deployed and verified on 192.168.1.127
(CPU 70->58°C in cool mode, hysteresis stepping confirmed).

Design:  docs/plans/2026-06-04-pve-fan-control-design.md
Runbook: docs/runbooks/fan-control.md

[ci skip]

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 09:19:11 +00:00

21 lines
871 B
Text

# /etc/fan-control.env — config for the fan-control daemon (chmod 600).
# Deployed manually to the PVE host; the real file holds a secret token and is
# NOT committed. Copy this template, fill HA_TOKEN, scp to /etc/fan-control.env.
# Long-lived ha-sofia access token (Home Assistant -> Profile -> Security ->
# Long-lived access tokens). Empty => presence disabled, daemon runs COOL-only.
HA_TOKEN=
# --- optional overrides (defaults shown) ---
# HA_URL=http://192.168.1.8:8123
# GARAGE_ENTITY=sensor.garage_door_state_bg
# GARAGE_OPEN_STATE=Отворена
# HOLD_SECS=900 # quiet-mode hold after last garage activity (15 min)
# LOOP_INTERVAL=15
# PRESENCE_INTERVAL=30
# DEADBAND=3
# CEILING=83 # degC: hand back to Dell auto at/above this
# RESUME_BELOW=75
# RESUME_STABLE=120
# MAX_IPMI_FAILS=3
PUSHGATEWAY_URL=http://10.0.20.100:30091