diff --git a/docs/plans/2026-06-04-pve-fan-control-design.md b/docs/plans/2026-06-04-pve-fan-control-design.md index 004cafff..6dc0bc31 100644 --- a/docs/plans/2026-06-04-pve-fan-control-design.md +++ b/docs/plans/2026-06-04-pve-fan-control-design.md @@ -111,6 +111,20 @@ presence open/recent/stale, temperature parsing, jq-free JSON field extraction, and percent→hex. 36 assertions, no hardware needed. The daemon also supports `DRY_RUN=1` and `RUN_ONCE=1` for integration checks. +## HA control (added 2026-06-05, on the host daemon) + +Delivered ahead of the cron migration (which is Vault-gated) by teaching the +**host daemon** to poll two ha-sofia helpers each loop (`fc_resolve`): +`input_select.r730_fan_mode` (auto/cool/quiet/manual) + +`input_number.r730_fan_manual_pct`. `auto` = the garage-presence curve above; +cool/quiet force that curve; manual holds a fixed %; `CEILING` still overrides. +HA owns the setpoint + a 60-min auto-revert-to-auto automation +(`automation.r730_fan_mode_auto_revert`) — the daemon just polls and actuates. +Monitoring + control live on the dashboard-it "Server" view (REST sensors: fan +RPM from the redfish exporter; mode/target-% from the Pushgateway). The same +logic already exists in the Python controller (`r730-fan-control/`) for the +eventual in-cluster CronJob; when that deploys it supersedes the host daemon. + ## Rollback `systemctl disable --now fan-control && ipmitool raw 0x30 0x30 0x01 0x01` on the diff --git a/docs/runbooks/fan-control.md b/docs/runbooks/fan-control.md index cb28dfa2..1f5d2ea7 100644 --- a/docs/runbooks/fan-control.md +++ b/docs/runbooks/fan-control.md @@ -10,6 +10,27 @@ CPU cool when the garage is empty, quiet when someone's in the garage. Design: - `fan-control.service` — systemd unit (`Type=simple`, restarts on failure). - `/etc/fan-control.env` — config incl. the ha-sofia token (chmod 600, not in git). +## HA control (Home Assistant) + +The daemon polls two ha-sofia helpers each loop, so you can drive the fans from +HA — **dashboard-it → "Server" view → Fans**: +- `input_select.r730_fan_mode` — **auto** (garage-presence curve, default), + **cool** / **quiet** (force that curve), **manual** (hold a fixed %). +- `input_number.r730_fan_manual_pct` — the % used in `manual` mode (slider). + +Any non-`auto` override **auto-reverts to `auto` after 60 min** +(`automation.r730_fan_mode_auto_revert` on ha-sofia), so a forgotten override +can't run the fans wrong indefinitely. `CEILING` (83 °C) still overrides +everything → Dell auto. An HA change is applied within one daemon loop (~15 s). + +Monitoring sensors on the same view: `sensor.r730_fan_speed` (redfish exporter), +`sensor.r730_fan_control_target` + `sensor.r730_fan_control_mode` (Pushgateway). + +The HA objects (helpers, the auto-revert automation, the REST sensors in +`rest_resources/{idrac_redfish_exporter,fan_control}.yaml`, and the dashboard +cards) live on **ha-sofia** and are auto-git-tracked there by the version-control +add-on — they are NOT in this repo. + ## Quick status ```bash @@ -17,7 +38,8 @@ ssh root@192.168.1.127 systemctl status fan-control ssh root@192.168.1.127 'journalctl -u fan-control -n 30 --no-pager' ssh root@192.168.1.127 'ipmitool sdr type fan | grep ^Fan1; ipmitool sdr type temperature | grep "^Temp "' ``` -Log lines look like `temp=63C mode=cool fan=65% (was 45%)`. +Log lines look like `temp=60C ha_mode=auto eff=cool fan=50% (was 70%)` +(`ha_mode` = the HA setpoint; `eff` = the effective curve applied). ## Disable / roll back to stock firmware control